mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
WARNING: **NEW** raylib code CONVENTION: Comments do not end with '.'
This commit is contained in:
@ -18,9 +18,9 @@
|
||||
*
|
||||
* CONFIGURATION:
|
||||
* #define SUPPORT_SSH_KEYBOARD_RPI (Raspberry Pi only)
|
||||
* Reconfigure standard input to receive key inputs, works with SSH connection.
|
||||
* Reconfigure standard input to receive key inputs, works with SSH connection
|
||||
* WARNING: Reconfiguring standard input could lead to undesired effects, like breaking other
|
||||
* running processes orblocking the device if not restored properly. Use with care.
|
||||
* running processes orblocking the device if not restored properly. Use with care
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* - DRM and GLM: System libraries for display initialization and configuration
|
||||
@ -744,11 +744,11 @@ void SwapScreenBuffer()
|
||||
}
|
||||
|
||||
// Attempt page flip
|
||||
// NOTE: rmModePageFlip() schedules a buffer-flip for the next vblank and then notifies us about it.
|
||||
// It takes a CRTC-id, fb-id and an arbitrary data-pointer and then schedules the page-flip.
|
||||
// This is fully asynchronous and when the page-flip happens, the DRM-fd will become readable and we can call drmHandleEvent().
|
||||
// This will read all vblank/page-flip events and call our modeset_page_flip_event() callback with the data-pointer that we passed to drmModePageFlip().
|
||||
// We simply call modeset_draw_dev() then so the next frame is rendered... returns immediately.
|
||||
// NOTE: rmModePageFlip() schedules a buffer-flip for the next vblank and then notifies us about it
|
||||
// It takes a CRTC-id, fb-id and an arbitrary data-pointer and then schedules the page-flip
|
||||
// This is fully asynchronous and when the page-flip happens, the DRM-fd will become readable and we can call drmHandleEvent()
|
||||
// This will read all vblank/page-flip events and call our modeset_page_flip_event() callback with the data-pointer that we passed to drmModePageFlip()
|
||||
// We simply call modeset_draw_dev() then so the next frame is rendered... returns immediately
|
||||
if (drmModePageFlip(platform.fd, platform.crtc->crtc_id, fbId, DRM_MODE_PAGE_FLIP_EVENT, platform.prevBO))
|
||||
{
|
||||
if (errno == EBUSY) errCnt[3]++; // Display busy - skip flip
|
||||
@ -824,9 +824,9 @@ double GetTime(void)
|
||||
}
|
||||
|
||||
// Open URL with default system browser (if available)
|
||||
// NOTE: This function is only safe to use if you control the URL given.
|
||||
// A user could craft a malicious string performing another action.
|
||||
// Only call this function yourself not with user input or make sure to check the string yourself.
|
||||
// NOTE: This function is only safe to use if you control the URL given
|
||||
// A user could craft a malicious string performing another action
|
||||
// Only call this function yourself not with user input or make sure to check the string yourself
|
||||
// Ref: https://github.com/raysan5/raylib/issues/686
|
||||
void OpenURL(const char *url)
|
||||
{
|
||||
@ -863,7 +863,7 @@ void SetMouseCursor(int cursor)
|
||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
// Get physical key name
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||
@ -897,7 +897,7 @@ void PollInputEvents(void)
|
||||
PollKeyboardEvents();
|
||||
|
||||
#if defined(SUPPORT_SSH_KEYBOARD_RPI)
|
||||
// NOTE: Keyboard reading could be done using input_event(s) or just read from stdin, both methods are used here.
|
||||
// NOTE: Keyboard reading could be done using input_event(s) or just read from stdin, both methods are used here
|
||||
// stdin reading is still used for legacy purposes, it allows keyboard input trough SSH console
|
||||
if (!platform.eventKeyboardMode) ProcessKeyboard();
|
||||
#endif
|
||||
@ -1003,8 +1003,8 @@ int InitPlatform(void)
|
||||
drmModeConnector *con = drmModeGetConnector(platform.fd, res->connectors[i]);
|
||||
TRACELOG(LOG_TRACE, "DISPLAY: Connector modes detected: %i", con->count_modes);
|
||||
|
||||
// In certain cases the status of the conneciton is reported as UKNOWN, but it is still connected.
|
||||
// This might be a hardware or software limitation like on Raspberry Pi Zero with composite output.
|
||||
// In certain cases the status of the conneciton is reported as UKNOWN, but it is still connected
|
||||
// This might be a hardware or software limitation like on Raspberry Pi Zero with composite output
|
||||
if (((con->connection == DRM_MODE_CONNECTED) || (con->connection == DRM_MODE_UNKNOWNCONNECTION)) && (con->encoder_id))
|
||||
{
|
||||
TRACELOG(LOG_TRACE, "DISPLAY: DRM mode connected");
|
||||
@ -1160,7 +1160,7 @@ int InitPlatform(void)
|
||||
// Initialize the EGL device connection
|
||||
if (eglInitialize(platform.device, NULL, NULL) == EGL_FALSE)
|
||||
{
|
||||
// If all of the calls to eglInitialize returned EGL_FALSE then an error has occurred.
|
||||
// If all of the calls to eglInitialize returned EGL_FALSE then an error has occurred
|
||||
TRACELOG(LOG_WARNING, "DISPLAY: Failed to initialize EGL device");
|
||||
return -1;
|
||||
}
|
||||
@ -1644,7 +1644,7 @@ static void ConfigureEvdevDevice(char *device)
|
||||
return;
|
||||
}
|
||||
|
||||
// At this point we have a connection to the device, but we don't yet know what the device is.
|
||||
// At this point we have a connection to the device, but we don't yet know what the device is
|
||||
// It could be many things, even as simple as a power button...
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user