mirror of https://github.com/PCSX2/pcsx2.git
Counters: Move input poll to after throttle
This commit is contained in:
parent
5eacab387d
commit
77a6525556
|
@ -707,7 +707,7 @@ int main(int argc, char* argv[])
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void Host::VSyncOnCPUThread()
|
||||
void Host::PumpMessagesOnCPUThread()
|
||||
{
|
||||
// update GS thread copy of frame number
|
||||
MTGS::RunOnGSThread([frame_number = GSDumpReplayer::GetFrameNumber()]() { s_dump_frame_number = frame_number; });
|
||||
|
|
|
@ -1122,7 +1122,7 @@ void Host::OnCreateMemoryCardOpenRequested()
|
|||
emit g_emu_thread->onCreateMemoryCardOpenRequested();
|
||||
}
|
||||
|
||||
void Host::VSyncOnCPUThread()
|
||||
void Host::PumpMessagesOnCPUThread()
|
||||
{
|
||||
g_emu_thread->getEventLoop()->processEvents(QEventLoop::AllEvents);
|
||||
}
|
||||
|
|
|
@ -498,6 +498,9 @@ static __fi void VSyncStart(u32 sCycle)
|
|||
|
||||
gsPostVsyncStart(); // MUST be after framelimit; doing so before causes funk with frame times!
|
||||
|
||||
// Poll input after MTGS frame push, just in case it has to stall to catch up.
|
||||
VMManager::Internal::PollInputOnCPUThread();
|
||||
|
||||
if (EmuConfig.Trace.Enabled && EmuConfig.Trace.EE.m_EnableAll)
|
||||
SysTrace.EE.Counters.Write(" ================ EE COUNTER VSYNC START (frame: %d) ================", g_FrameCount);
|
||||
|
||||
|
|
|
@ -2484,11 +2484,13 @@ void VMManager::Internal::VSyncOnCPUThread()
|
|||
Achievements::FrameUpdate();
|
||||
|
||||
PollDiscordPresence();
|
||||
}
|
||||
|
||||
void VMManager::Internal::PollInputOnCPUThread()
|
||||
{
|
||||
Host::PumpMessagesOnCPUThread();
|
||||
InputManager::PollSources();
|
||||
|
||||
Host::VSyncOnCPUThread();
|
||||
|
||||
if (EmuConfig.EnableRecordingTools)
|
||||
{
|
||||
// This code is called _before_ Counter's vsync end, and _after_ vsync start
|
||||
|
|
|
@ -272,6 +272,7 @@ namespace VMManager
|
|||
void ELFLoadingOnCPUThread(std::string elf_path);
|
||||
void EntryPointCompilingOnCPUThread();
|
||||
void VSyncOnCPUThread();
|
||||
void PollInputOnCPUThread();
|
||||
} // namespace Internal
|
||||
} // namespace VMManager
|
||||
|
||||
|
@ -317,5 +318,5 @@ namespace Host
|
|||
const std::string& disc_serial, u32 disc_crc, u32 current_crc);
|
||||
|
||||
/// Provided by the host; called once per frame at guest vsync.
|
||||
void VSyncOnCPUThread();
|
||||
void PumpMessagesOnCPUThread();
|
||||
} // namespace Host
|
||||
|
|
|
@ -169,7 +169,7 @@ void Host::RequestVMShutdown(bool allow_confirm, bool allow_save_state, bool def
|
|||
{
|
||||
}
|
||||
|
||||
void Host::VSyncOnCPUThread()
|
||||
void Host::PumpMessagesOnCPUThread()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue