Skip to content

Commit 74ad9d7

Browse files
committed
Add implementation for FLAG_WINDOW_ALWAYS_RUN on PLATFORM_DESKTOP_SDL
1 parent 5711d2c commit 74ad9d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/platforms/rcore_desktop_sdl.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ void SetWindowState(unsigned int flags)
571571
}
572572
if (flags & FLAG_WINDOW_ALWAYS_RUN)
573573
{
574-
TRACELOG(LOG_WARNING, "SetWindowState() - FLAG_WINDOW_ALWAYS_RUN is not supported on PLATFORM_DESKTOP_SDL");
574+
CORE.Window.flags |= FLAG_WINDOW_ALWAYS_RUN;
575575
}
576576
if (flags & FLAG_WINDOW_TRANSPARENT)
577577
{
@@ -658,7 +658,7 @@ void ClearWindowState(unsigned int flags)
658658
}
659659
if (flags & FLAG_WINDOW_ALWAYS_RUN)
660660
{
661-
TRACELOG(LOG_WARNING, "ClearWindowState() - FLAG_WINDOW_ALWAYS_RUN is not supported on PLATFORM_DESKTOP_SDL");
661+
CORE.Window.flags &= ~FLAG_WINDOW_ALWAYS_RUN;
662662
}
663663
if (flags & FLAG_WINDOW_TRANSPARENT)
664664
{
@@ -1378,6 +1378,8 @@ void PollInputEvents(void)
13781378

13791379
CORE.Window.resizedLastFrame = false;
13801380

1381+
if (((CORE.Window.flags & FLAG_WINDOW_MINIMIZED) > 0) && ((CORE.Window.flags & FLAG_WINDOW_ALWAYS_RUN) == 0)) SDL_WaitEvent(NULL);
1382+
13811383
SDL_Event event = { 0 };
13821384
while (SDL_PollEvent(&event) != 0)
13831385
{

0 commit comments

Comments
 (0)