Minor format tweaks

This commit is contained in:
Ray
2025-07-26 12:06:24 +02:00
parent 4da399141a
commit 7262be85fd
2 changed files with 7 additions and 8 deletions

View File

@@ -252,8 +252,7 @@ static const int CursorsLUT[] = {
//SDL_SYSTEM_CURSOR_WAITARROW, // No equivalent implemented on MouseCursor enum on raylib.h //SDL_SYSTEM_CURSOR_WAITARROW, // No equivalent implemented on MouseCursor enum on raylib.h
}; };
// SDL3 Migration Layer made to avoid 'ifdefs' inside functions when we can.
// SDL3 Migration Layer made to avoid `ifdefs` inside functions when we can.
#if defined(PLATFORM_DESKTOP_SDL3) #if defined(PLATFORM_DESKTOP_SDL3)
// SDL3 Migration: // SDL3 Migration:
@@ -304,13 +303,13 @@ int SDL_GetNumVideoDisplays(void)
int monitorCount = 0; int monitorCount = 0;
SDL_DisplayID *displays = SDL_GetDisplays(&monitorCount); SDL_DisplayID *displays = SDL_GetDisplays(&monitorCount);
// Safe because If `mem` is NULL, SDL_free does nothing // Safe because If 'mem' is NULL, SDL_free does nothing
SDL_free(displays); SDL_free(displays);
return monitorCount; return monitorCount;
} }
// SLD3 Migration: To emulate SDL2 this function should return `SDL_DISABLE` or `SDL_ENABLE` // SLD3 Migration: To emulate SDL2 this function should return 'SDL_DISABLE' or 'SDL_ENABLE'
// representing the *processing state* of the event before this function makes any changes to it // representing the *processing state* of the event before this function makes any changes to it
Uint8 SDL_EventState(Uint32 type, int state) Uint8 SDL_EventState(Uint32 type, int state)
{ {
@@ -581,7 +580,7 @@ void SetWindowState(unsigned int flags)
if (flags & FLAG_WINDOW_UNFOCUSED) if (flags & FLAG_WINDOW_UNFOCUSED)
{ {
// NOTE: To be able to implement this part it seems that we should // NOTE: To be able to implement this part it seems that we should
// do it ourselves, via `Windows.h`, `X11/Xlib.h` or even `Cocoa.h` // do it ourselves, via 'windows.h', 'X11/Xlib.h' or even 'Cocoa.h'
TRACELOG(LOG_WARNING, "SetWindowState() - FLAG_WINDOW_UNFOCUSED is not supported on PLATFORM_DESKTOP_SDL"); TRACELOG(LOG_WARNING, "SetWindowState() - FLAG_WINDOW_UNFOCUSED is not supported on PLATFORM_DESKTOP_SDL");
} }
if (flags & FLAG_WINDOW_TOPMOST) if (flags & FLAG_WINDOW_TOPMOST)
@@ -1169,13 +1168,13 @@ Image GetClipboardImage(void)
image = LoadImageFromMemory(imageExtensions[i], fileData, dataSize); image = LoadImageFromMemory(imageExtensions[i], fileData, dataSize);
if (IsImageValid(image)) if (IsImageValid(image))
{ {
TRACELOG(LOG_INFO, "Clipboard image: Got image from clipboard as a `%s` successfully", imageExtensions[i]); TRACELOG(LOG_INFO, "Clipboard: Got image from clipboard successfully: %s", imageExtensions[i]);
return image; return image;
} }
} }
} }
if (!IsImageValid(image)) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data. Error: %s", SDL_GetError()); if (!IsImageValid(image)) TRACELOG(LOG_WARNING, "Clipboard: Couldn't get clipboard data. ERROR: %s", SDL_GetError());
#endif #endif
return image; return image;

View File

@@ -539,7 +539,7 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
#pragma message ("WARNING: Getting image from the clipboard might not work without SUPPORT_FILEFORMAT_PNG or SUPPORT_FILEFORMAT_JPG") #pragma message ("WARNING: Getting image from the clipboard might not work without SUPPORT_FILEFORMAT_PNG or SUPPORT_FILEFORMAT_JPG")
#endif #endif
// Not needed because `rtexture.c` will automatically defined STBI_REQUIRED when any SUPPORT_FILEFORMAT_* is defined // Not needed because 'rtexture.c' will automatically defined STBI_REQUIRED when any SUPPORT_FILEFORMAT_* is defined
// #if !defined(STBI_REQUIRED) // #if !defined(STBI_REQUIRED)
// #pragma message ("WARNING: "STBI_REQUIRED is not defined, that means we can't load images from clipbard" // #pragma message ("WARNING: "STBI_REQUIRED is not defined, that means we can't load images from clipbard"
// #endif // #endif