Bladeren bron

Merge c8f0f7c47d into ab83e6dd41

pull/4598/merge
Asdqwe 6 uur geleden
committed by GitHub
bovenliggende
commit
0b91976062
Geen bekende sleutel gevonden voor deze handtekening in de database GPG sleutel-ID: B5690EEEBB952194
2 gewijzigde bestanden met toevoegingen van 12 en 3 verwijderingen
  1. +6
    -1
      src/platforms/rcore_desktop_glfw.c
  2. +6
    -2
      src/platforms/rcore_desktop_sdl.c

+ 6
- 1
src/platforms/rcore_desktop_glfw.c Bestand weergeven

@ -1739,7 +1739,12 @@ static void WindowContentScaleCallback(GLFWwindow *window, float scalex, float s
static void WindowIconifyCallback(GLFWwindow *window, int iconified)
{
if (iconified) CORE.Window.flags |= FLAG_WINDOW_MINIMIZED; // The window was iconified
else CORE.Window.flags &= ~FLAG_WINDOW_MINIMIZED; // The window was restored
else
{
CORE.Window.flags &= ~FLAG_WINDOW_MINIMIZED; // The window was restored
if ((CORE.Window.flags & FLAG_WINDOW_ALWAYS_RUN) == 0) CORE.Time.previous = GetTime();
}
}
// GLFW3 WindowMaximize Callback, runs when window is maximized/restored

+ 6
- 2
src/platforms/rcore_desktop_sdl.c Bestand weergeven

@ -571,7 +571,7 @@ void SetWindowState(unsigned int flags)
}
if (flags & FLAG_WINDOW_ALWAYS_RUN)
{
TRACELOG(LOG_WARNING, "SetWindowState() - FLAG_WINDOW_ALWAYS_RUN is not supported on PLATFORM_DESKTOP_SDL");
CORE.Window.flags |= FLAG_WINDOW_ALWAYS_RUN;
}
if (flags & FLAG_WINDOW_TRANSPARENT)
{
@ -658,7 +658,7 @@ void ClearWindowState(unsigned int flags)
}
if (flags & FLAG_WINDOW_ALWAYS_RUN)
{
TRACELOG(LOG_WARNING, "ClearWindowState() - FLAG_WINDOW_ALWAYS_RUN is not supported on PLATFORM_DESKTOP_SDL");
CORE.Window.flags &= ~FLAG_WINDOW_ALWAYS_RUN;
}
if (flags & FLAG_WINDOW_TRANSPARENT)
{
@ -1378,6 +1378,8 @@ void PollInputEvents(void)
CORE.Window.resizedLastFrame = false;
if (((CORE.Window.flags & FLAG_WINDOW_MINIMIZED) > 0) && ((CORE.Window.flags & FLAG_WINDOW_ALWAYS_RUN) == 0)) SDL_WaitEvent(NULL);
SDL_Event event = { 0 };
while (SDL_PollEvent(&event) != 0)
{
@ -1497,6 +1499,8 @@ void PollInputEvents(void)
if ((CORE.Window.flags & SDL_WINDOW_MAXIMIZED) > 0) CORE.Window.flags &= ~SDL_WINDOW_MAXIMIZED;
}
#endif
if ((CORE.Window.flags & FLAG_WINDOW_ALWAYS_RUN) == 0) CORE.Time.previous = GetTime();
} break;
case SDL_WINDOWEVENT_HIDDEN:

Laden…
Annuleren
Opslaan