mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-08 12:35:48 +00:00
GPUThread: Fix order of updating state
Fixes unoverwritten textures not dumping on system shutdown.
This commit is contained in:
parent
8eaa1f312d
commit
f045a1742d
@ -805,12 +805,6 @@ bool GPUThread::CreateGPUBackendOnThread(GPURenderer renderer, bool upload_vram,
|
|||||||
|
|
||||||
void GPUThread::ReconfigureOnThread(GPUThreadReconfigureCommand* cmd)
|
void GPUThread::ReconfigureOnThread(GPUThreadReconfigureCommand* cmd)
|
||||||
{
|
{
|
||||||
// Store state.
|
|
||||||
s_state.requested_vsync = cmd->vsync_mode;
|
|
||||||
s_state.requested_allow_present_throttle = cmd->allow_present_throttle;
|
|
||||||
s_state.requested_fullscreen_ui = cmd->start_fullscreen_ui.value_or(s_state.requested_fullscreen_ui);
|
|
||||||
s_state.game_serial = std::move(cmd->game_serial);
|
|
||||||
|
|
||||||
// Are we shutting down everything?
|
// Are we shutting down everything?
|
||||||
if (!cmd->renderer.has_value() && !s_state.requested_fullscreen_ui)
|
if (!cmd->renderer.has_value() && !s_state.requested_fullscreen_ui)
|
||||||
{
|
{
|
||||||
@ -820,6 +814,11 @@ void GPUThread::ReconfigureOnThread(GPUThreadReconfigureCommand* cmd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Store state.
|
||||||
|
s_state.requested_vsync = cmd->vsync_mode;
|
||||||
|
s_state.requested_allow_present_throttle = cmd->allow_present_throttle;
|
||||||
|
s_state.requested_fullscreen_ui = cmd->start_fullscreen_ui.value_or(s_state.requested_fullscreen_ui);
|
||||||
|
s_state.game_serial = std::move(cmd->game_serial);
|
||||||
g_gpu_settings = g_settings;
|
g_gpu_settings = g_settings;
|
||||||
|
|
||||||
// Readback old VRAM for hardware renderers.
|
// Readback old VRAM for hardware renderers.
|
||||||
|
@ -4185,9 +4185,6 @@ void System::UpdateRunningGame(const std::string& path, CDImage* image, bool boo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!booting)
|
|
||||||
GPUThread::SetGameSerial(s_state.running_game_serial);
|
|
||||||
|
|
||||||
if (!IsReplayingGPUDump())
|
if (!IsReplayingGPUDump())
|
||||||
{
|
{
|
||||||
if (booting)
|
if (booting)
|
||||||
@ -4204,7 +4201,10 @@ void System::UpdateRunningGame(const std::string& path, CDImage* image, bool boo
|
|||||||
ApplySettings(true);
|
ApplySettings(true);
|
||||||
|
|
||||||
if (s_state.running_game_serial != prev_serial)
|
if (s_state.running_game_serial != prev_serial)
|
||||||
|
{
|
||||||
|
GPUThread::SetGameSerial(s_state.running_game_serial);
|
||||||
UpdateSessionTime(prev_serial);
|
UpdateSessionTime(prev_serial);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateRichPresence(booting);
|
UpdateRichPresence(booting);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user