mirror of https://github.com/PCSX2/pcsx2.git
input-rec: wire up changes to the rest of the project
This commit is contained in:
parent
c98b90a4e2
commit
142a1a392f
|
@ -762,21 +762,33 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="actionInputRecNew">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionInputRecPlay">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Play</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionInputRecStop">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stop</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionInputRecOpenSettings">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
|
|
|
@ -841,7 +841,7 @@ void cdvdReset()
|
|||
|
||||
// If we are recording, always use the same RTC setting
|
||||
// for games that use the RTC to seed their RNG -- this is very important to be the same everytime!
|
||||
#ifndef DISABLE_RECORDING
|
||||
#ifndef PCSX2_CORE
|
||||
if (g_InputRecording.IsActive())
|
||||
{
|
||||
Console.WriteLn("Input Recording Active - Using Constant RTC of 04-03-2020 (DD-MM-YYYY)");
|
||||
|
@ -855,6 +855,20 @@ void cdvdReset()
|
|||
cdvd.RTC.year = 20;
|
||||
}
|
||||
else
|
||||
#else
|
||||
if (g_InputRecording.isActive())
|
||||
{
|
||||
Console.WriteLn("Input Recording Active - Using Constant RTC of 04-03-2020 (DD-MM-YYYY)");
|
||||
// Why not just 0 everything? Some games apparently require the date to be valid in terms of when
|
||||
// the PS2 / Game actually came out. (MGS3). So set it to a value well beyond any PS2 game's release date.
|
||||
cdvd.RTC.second = 0;
|
||||
cdvd.RTC.minute = 0;
|
||||
cdvd.RTC.hour = 0;
|
||||
cdvd.RTC.day = 4;
|
||||
cdvd.RTC.month = 3;
|
||||
cdvd.RTC.year = 20;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// CDVD internally uses GMT+9. If you think the time's wrong, you're wrong.
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
|
||||
#ifndef PCSX2_CORE
|
||||
#include "gui/App.h"
|
||||
#include "Recording/InputRecordingControls.h"
|
||||
#else
|
||||
#include "PAD/Host/PAD.h"
|
||||
#include "Recording/InputRecording.h"
|
||||
#include "VMManager.h"
|
||||
#endif
|
||||
|
||||
#include "Recording/InputRecordingControls.h"
|
||||
|
||||
using namespace Threading;
|
||||
|
||||
extern u8 psxhblankgate;
|
||||
|
@ -612,7 +612,14 @@ static __fi void VSyncStart(u32 sCycle)
|
|||
{
|
||||
// It is imperative that any frame locking that must happen occurs before Vsync is started
|
||||
// Not doing so would sacrifice a frame of a savestate-based recording when loading any savestate
|
||||
#ifndef PCSX2_CORE
|
||||
g_InputRecordingControls.HandlePausingAndLocking();
|
||||
#else
|
||||
if (g_InputRecording.isActive())
|
||||
{
|
||||
g_InputRecording.handleExceededFrameCounter();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PCSX2_CORE
|
||||
|
@ -674,10 +681,18 @@ static __fi void GSVSync()
|
|||
|
||||
static __fi void VSyncEnd(u32 sCycle)
|
||||
{
|
||||
#ifndef PCSX2_CORE
|
||||
if (EmuConfig.EnableRecordingTools)
|
||||
{
|
||||
g_InputRecordingControls.CheckPauseStatus();
|
||||
}
|
||||
#else
|
||||
if (EmuConfig.EnableRecordingTools && g_InputRecording.isActive())
|
||||
{
|
||||
g_InputRecording.getControls().processControlQueue();
|
||||
g_InputRecording.incFrameCounter();
|
||||
}
|
||||
#endif
|
||||
|
||||
if(EmuConfig.Trace.Enabled && EmuConfig.Trace.EE.m_EnableAll)
|
||||
SysTrace.EE.Counters.Write( " ================ EE COUNTER VSYNC END (frame: %d) ================", g_FrameCount );
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "Host.h"
|
||||
#include "HostDisplay.h"
|
||||
#include "IconsFontAwesome5.h"
|
||||
#include "Recording/InputRecordingControls.h"
|
||||
#include "Recording/InputRecording.h"
|
||||
#include "VMManager.h"
|
||||
|
||||
#ifdef ENABLE_ACHIEVEMENTS
|
||||
|
@ -202,7 +202,7 @@ DEFINE_HOTKEY("ResetVM", "System", "Reset Virtual Machine", [](s32 pressed) {
|
|||
})
|
||||
DEFINE_HOTKEY("InputRecToggleMode", "System", "Toggle Input Recording Mode", [](s32 pressed) {
|
||||
if (!pressed && VMManager::HasValidVM())
|
||||
g_InputRecordingControls.RecordModeToggle();
|
||||
g_InputRecording.getControls().toggleRecordMode();
|
||||
})
|
||||
|
||||
DEFINE_HOTKEY("PreviousSaveStateSlot", "Save States", "Select Previous Save Slot", [](s32 pressed) {
|
||||
|
|
|
@ -60,6 +60,8 @@
|
|||
|
||||
#include "IconsFontAwesome5.h"
|
||||
|
||||
#include "Recording/InputRecording.h"
|
||||
|
||||
#include "common/emitter/tools.h"
|
||||
#ifdef _M_X86
|
||||
#include "common/emitter/x86_intrin.h"
|
||||
|
@ -1177,6 +1179,10 @@ bool VMManager::DoLoadState(const char* filename)
|
|||
SaveState_UnzipFromDisk(filename);
|
||||
UpdateRunningGame(false, false);
|
||||
Host::OnSaveStateLoaded(filename, true);
|
||||
if (g_InputRecording.isActive())
|
||||
{
|
||||
g_InputRecording.handleLoadingSavestate();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception::BaseException& e)
|
||||
|
|
Loading…
Reference in New Issue