mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-06 14:23:12 +00:00
Update rcore_desktop_sdl.c (#5332)
This commit is contained in:
parent
cfb43fa999
commit
e92832fc6d
@ -463,7 +463,7 @@ void ToggleFullscreen(void)
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -491,7 +491,7 @@ void ToggleBorderlessWindowed(void)
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -548,7 +548,7 @@ void SetWindowState(unsigned int flags)
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -612,7 +612,7 @@ void SetWindowState(unsigned int flags)
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -833,7 +833,7 @@ void SetWindowMonitor(int monitor)
|
||||
{
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -961,7 +961,7 @@ Vector2 GetMonitorPosition(int monitor)
|
||||
{
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -989,7 +989,7 @@ int GetMonitorWidth(int monitor)
|
||||
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -1010,7 +1010,7 @@ int GetMonitorHeight(int monitor)
|
||||
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -1031,7 +1031,7 @@ int GetMonitorPhysicalWidth(int monitor)
|
||||
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -1055,7 +1055,7 @@ int GetMonitorPhysicalHeight(int monitor)
|
||||
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -1079,7 +1079,7 @@ int GetMonitorRefreshRate(int monitor)
|
||||
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
@ -1099,7 +1099,7 @@ const char *GetMonitorName(int monitor)
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(USING_VERSION_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
if (SDL_GetDisplayProperties(monitor) != 0) // Returns 0 on failure, so a value other than zero indicates that the monitor id is valid
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user