sdlwindow: Do nothing for title or PushUpdate when nested

Waste of cycles.
This commit is contained in:
Joshua Ashton 2022-01-31 18:41:36 +00:00 committed by Joshie
parent a5ec3728d9
commit 3f4aa2a75f

View file

@ -260,6 +260,9 @@ void sdlwindow_update( void )
void sdlwindow_title( const char* title ) void sdlwindow_title( const char* title )
{ {
if ( !BIsNested() )
return;
title = title ? title : DEFAULT_TITLE; title = title ? title : DEFAULT_TITLE;
g_SDLWindowTitleLock.lock(); g_SDLWindowTitleLock.lock();
if ( g_SDLWindowTitle != title ) if ( g_SDLWindowTitle != title )
@ -273,5 +276,8 @@ void sdlwindow_title( const char* title )
void sdlwindow_pushupdate( void ) void sdlwindow_pushupdate( void )
{ {
if ( !BIsNested() )
return;
SDL_PushEvent( &g_SDLUserEvent ); SDL_PushEvent( &g_SDLUserEvent );
} }