Skip to content

Commit

Permalink
android: fix black screen after minimizing window in materialsystem q…
Browse files Browse the repository at this point in the history
…ueue mode
  • Loading branch information
nillerusr committed Aug 18, 2023
1 parent 601cfff commit 5ea9937
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions engine/sys_mainwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ GameMessageHandler_t g_GameMessageHandlers[] =
{ IE_Quit, &CGame::HandleMsg_Close },
};


void CGame::AppActivate( bool fActive )
{
// If text mode, force it to be active.
Expand Down Expand Up @@ -299,8 +298,18 @@ void CGame::AppActivate( bool fActive )
// Clear keyboard states (should be cleared already but...)
// VGui_ActivateMouse will reactivate the mouse soon.
ClearIOStates();

UpdateMaterialSystemConfig();

#ifdef ANDROID
ConVarRef mat_queue_mode( "mat_queue_mode" );

// Hack to reset internal queue buffers
int nSavedQueueMode = mat_queue_mode.GetInt();
mat_queue_mode.SetValue( 0 );
materials->BeginFrame( host_frametime );
materials->EndFrame();
mat_queue_mode.SetValue( nSavedQueueMode );
#endif
}
else
{
Expand Down

0 comments on commit 5ea9937

Please sign in to comment.