From 3f4aa2a75fb66a4927cbc24bc20b79a6e9dc19fd Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 31 Jan 2022 18:41:36 +0000 Subject: [PATCH] sdlwindow: Do nothing for title or PushUpdate when nested Waste of cycles. --- src/sdlwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sdlwindow.cpp b/src/sdlwindow.cpp index cb0f7c3..7bef9ac 100644 --- a/src/sdlwindow.cpp +++ b/src/sdlwindow.cpp @@ -260,6 +260,9 @@ void sdlwindow_update( void ) void sdlwindow_title( const char* title ) { + if ( !BIsNested() ) + return; + title = title ? title : DEFAULT_TITLE; g_SDLWindowTitleLock.lock(); if ( g_SDLWindowTitle != title ) @@ -273,5 +276,8 @@ void sdlwindow_title( const char* title ) void sdlwindow_pushupdate( void ) { + if ( !BIsNested() ) + return; + SDL_PushEvent( &g_SDLUserEvent ); }