GS: Move input recording shutdown to VMManager

This commit is contained in:
Stenzek 2024-02-05 00:49:05 +10:00 committed by Connor McLaughlin
parent 8ffd920700
commit 56b54e0e17
2 changed files with 4 additions and 7 deletions

View File

@ -15,7 +15,6 @@
#include "GS/MultiISA.h"
#include "Host.h"
#include "Input/InputManager.h"
#include "Recording/InputRecording.h"
#include "MTGS.h"
#include "pcsx2/GS.h"
#include "GS/Renderers/Null/GSRendererNull.h"
@ -338,9 +337,6 @@ void GSclose()
if (GSCapture::IsCapturing())
GSCapture::EndCapture();
if (g_InputRecording.isActive())
g_InputRecording.stop();
CloseGSRenderer();
CloseGSDevice(true);
Host::ReleaseRenderWindow();
@ -503,9 +499,6 @@ void GSGameChanged()
if (!VMManager::HasValidVM() && GSCapture::IsCapturing())
GSCapture::EndCapture();
if (!VMManager::HasValidVM() && g_InputRecording.isActive())
g_InputRecording.stop();
}
bool GSHasDisplayWindow()

View File

@ -1496,6 +1496,10 @@ void VMManager::Shutdown(bool save_resume_state)
Console.Error("Failed to save resume state");
}
// end input recording before clearing state
if (g_InputRecording.isActive())
g_InputRecording.stop();
SaveSessionTime(s_disc_serial);
s_elf_override = {};
ClearELFInfo();