input-rec: Remove `DISABLE_RECORDING` usages

This commit is contained in:
Tyler Wilding 2022-04-03 19:41:41 -04:00 committed by Tyler Wilding
parent bf899022d7
commit 655939147a
21 changed files with 24 additions and 181 deletions

View File

@ -50,7 +50,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>PrecompiledHeader.h</PrecompiledHeaderFile>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;LZMA_API_STATIC;BUILD_DX=1;ENABLE_OPENGL;ENABLE_VULKAN;DIRECTINPUT_VERSION=0x0800;PCSX2_CORE;DISABLE_RECORDING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;LZMA_API_STATIC;BUILD_DX=1;ENABLE_OPENGL;ENABLE_VULKAN;DIRECTINPUT_VERSION=0x0800;PCSX2_CORE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="$(Configuration.Contains(Debug))">PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="$(Configuration.Contains(Devel))">PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="$(Configuration.Contains(Release))">NDEBUG;_SECURE_SCL_=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -9,7 +9,6 @@ else()
add_library(PCSX2)
target_compile_definitions(PCSX2_FLAGS INTERFACE
"PCSX2_CORE"
"DISABLE_RECORDING"
)
endif()
target_link_libraries(PCSX2 PRIVATE PCSX2_FLAGS)

View File

@ -940,9 +940,8 @@ struct Pcsx2Config
EnableCheats : 1, // enables cheat detection and application
EnablePINE : 1, // enables inter-process communication
EnableWideScreenPatches : 1,
#ifndef DISABLE_RECORDING
// TODO - Vaser - where are these settings exposed in the Qt UI?
EnableRecordingTools : 1,
#endif
#ifdef PCSX2_CORE
EnableGameFixes : 1, // enables automatic game fixes
SaveStateOnShutdown : 1, // default value for saving state on shutdown

View File

@ -39,9 +39,7 @@
#include "VMManager.h"
#endif
#ifndef DISABLE_RECORDING
# include "Recording/InputRecordingControls.h"
#endif
#include "Recording/InputRecordingControls.h"
using namespace Threading;
@ -556,14 +554,12 @@ static __fi void frameLimit()
static __fi void VSyncStart(u32 sCycle)
{
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
if (EmuConfig.EnableRecordingTools)
{
// 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
g_InputRecordingControls.HandlePausingAndLocking();
}
#endif
#ifdef PCSX2_CORE
// Update vibration at the end of a frame.
@ -620,12 +616,10 @@ static __fi void GSVSync()
static __fi void VSyncEnd(u32 sCycle)
{
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
if (EmuConfig.EnableRecordingTools)
{
g_InputRecordingControls.CheckPauseStatus();
}
#endif
if(EmuConfig.Trace.Enabled && EmuConfig.Trace.EE.m_EnableAll)
SysTrace.EE.Counters.Write( " ================ EE COUNTER VSYNC END (frame: %d) ================", g_FrameCount );

View File

@ -1039,9 +1039,7 @@ void Pcsx2Config::LoadSave(SettingsWrapper& wrap)
SettingsWrapBitBool(EnableCheats);
SettingsWrapBitBool(EnablePINE);
SettingsWrapBitBool(EnableWideScreenPatches);
#ifndef DISABLE_RECORDING
SettingsWrapBitBool(EnableRecordingTools);
#endif
#ifdef PCSX2_CORE
SettingsWrapBitBool(EnableGameFixes);
SettingsWrapBitBool(SaveStateOnShutdown);
@ -1190,9 +1188,7 @@ void Pcsx2Config::CopyConfig(const Pcsx2Config& cfg)
EnableCheats = cfg.EnableCheats;
EnablePINE = cfg.EnablePINE;
EnableWideScreenPatches = cfg.EnableWideScreenPatches;
#ifndef DISABLE_RECORDING
EnableRecordingTools = cfg.EnableRecordingTools;
#endif
UseBOOT2Injection = cfg.UseBOOT2Injection;
PatchBios = cfg.PatchBios;
PatchRegion = cfg.PatchRegion;

View File

@ -285,9 +285,7 @@ SaveStateBase& SaveStateBase::FreezeInternals()
// to merit an HLE Bios sub-section... yet.
deci2Freeze();
#ifndef DISABLE_RECORDING
InputRecordingFreeze();
#endif
return *this;
}

View File

@ -24,10 +24,8 @@
#include "PAD/Gamepad.h"
#include "common/Timer.h"
#include "Recording/InputRecording.h"
#ifndef DISABLE_RECORDING
# include "Recording/InputRecording.h"
#endif
_sio sio;
_mcd mcds[2][4];
@ -207,16 +205,11 @@ SIO_WRITE sioWriteController(u8 data)
default:
sio.buf[sio.bufCount] = PADpoll(data);
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
// Only examine controllers 1 / 2
if (sio.slot[sio.port] == 0 || sio.slot[sio.port] == 1)
{
// Only examine controllers 1 / 2
if (sio.slot[sio.port] == 0)
{
g_InputRecording.ControllerInterrupt(data, sio.port, sio.bufCount, sio.buf);
}
g_InputRecording.ControllerInterrupt(data, sio.port, sio.bufCount, sio.buf);
}
#endif
break;
}
//Console.WriteLn( "SIO: sent = %02X From pad data = %02X bufCnt %08X ", data, sio.buf[sio.bufCount], sio.bufCount);

View File

@ -108,13 +108,9 @@ static const TraceLogDescriptor
TLD_Pgif = {"PGIFout", "&PGIF Console", "Shows output from pgif the emulated ps1 gpu"}
#ifndef DISABLE_RECORDING
,
TLD_recordingConsole = {"Input Recording", "Input Recording Console", "Shows recording related logs and information."},
TLD_controlInfo = {"Controller Info", "Controller Info", "Shows detailed controller input values for port 1, every frame."}
#endif
; // End init of TraceLogDescriptors
SysConsoleLogPack::SysConsoleLogPack()
@ -125,10 +121,8 @@ SysConsoleLogPack::SysConsoleLogPack()
, eeConsole(&TLD_eeConsole)
, iopConsole(&TLD_iopConsole)
, deci2(&TLD_deci2)
#ifndef DISABLE_RECORDING
, recordingConsole(&TLD_recordingConsole)
, controlInfo(&TLD_controlInfo)
#endif
{
}

View File

@ -30,9 +30,7 @@
#include "RecentIsoList.h"
#include "DriveList.h"
#ifndef DISABLE_RECORDING
#include "Recording/NewRecordingFrame.h"
#endif
class DisassemblyDialog;
struct HostKeyEvent;
@ -72,9 +70,7 @@ enum TopLevelMenuIndices
TopLevelMenu_Config,
TopLevelMenu_Window,
TopLevelMenu_Capture,
#ifndef DISABLE_RECORDING
TopLevelMenu_InputRecording,
#endif
TopLevelMenu_Help
};
@ -186,7 +182,6 @@ enum MenuIdentifiers
MenuId_Capture_Screenshot_Screenshot,
MenuId_Capture_Screenshot_Screenshot_As,
#ifndef DISABLE_RECORDING
// Input Recording Subsection
MenuId_Recording_New,
MenuId_Recording_Play,
@ -198,7 +193,6 @@ enum MenuIdentifiers
MenuId_Recording_ToggleRecordingMode,
MenuId_Recording_VirtualPad_Port0,
MenuId_Recording_VirtualPad_Port1,
#endif
// Subsection
MenuId_PINE,
@ -481,10 +475,7 @@ protected:
wxWindowID m_id_GsFrame;
wxWindowID m_id_ProgramLogBox;
wxWindowID m_id_Disassembler;
#ifndef DISABLE_RECORDING
wxWindowID m_id_NewRecordingFrame;
#endif
wxKeyEvent m_kevt;
@ -510,7 +501,7 @@ public:
MainEmuFrame* GetMainFramePtr() const { return (MainEmuFrame*)wxWindow::FindWindowById(m_id_MainFrame); }
DisassemblyDialog* GetDisassemblyPtr() const { return (DisassemblyDialog*)wxWindow::FindWindowById(m_id_Disassembler); }
#ifndef DISABLE_RECORDING
#ifndef PCSX2_CORE
NewRecordingFrame* GetNewRecordingFramePtr() const
{
return (NewRecordingFrame*)wxWindow::FindWindowById(m_id_NewRecordingFrame);

View File

@ -682,9 +682,7 @@ void AppConfig::LoadSave(IniInterface& ini, SettingsWrapper& wrap)
Folders.LoadSave(ini);
GSWindow.LoadSave(ini);
#ifndef DISABLE_RECORDING
inputRecording.loadSave(ini);
#endif
AudioCapture.LoadSave(ini);
Templates.LoadSave(ini);
@ -908,7 +906,6 @@ void AppConfig::GSWindowOptions::LoadSave(IniInterface& ini)
SanityCheck();
}
#ifndef DISABLE_RECORDING
AppConfig::InputRecordingOptions::InputRecordingOptions()
: VirtualPadPosition(wxDefaultPosition)
, m_frame_advance_amount(1)
@ -922,7 +919,6 @@ void AppConfig::InputRecordingOptions::loadSave(IniInterface& ini)
IniEntry(VirtualPadPosition);
IniEntry(m_frame_advance_amount);
}
#endif
AppConfig::CaptureOptions::CaptureOptions()
{
@ -948,9 +944,7 @@ AppConfig::UiTemplateOptions::UiTemplateOptions()
OutputInterlaced = L"Interlaced";
Paused = L"<PAUSED> ";
TitleTemplate = L"Slot: ${slot} | Speed: ${speed} (${vfps}) | ${videomode} | Limiter: ${limiter} | ${gsdx} | ${omodei} | ${cpuusage}";
#ifndef DISABLE_RECORDING
RecordingTemplate = L"Slot: ${slot} | Frame: ${frame}/${maxFrame} | Rec. Mode: ${mode} | Speed: ${speed} (${vfps}) | Limiter: ${limiter}";
#endif
}
void AppConfig::UiTemplateOptions::LoadSave(IniInterface& ini)
@ -967,9 +961,7 @@ void AppConfig::UiTemplateOptions::LoadSave(IniInterface& ini)
IniEntry(OutputInterlaced);
IniEntry(Paused);
IniEntry(TitleTemplate);
#ifndef DISABLE_RECORDING
IniEntry(RecordingTemplate);
#endif
}
int AppConfig::GetMaxPresetIndex()

View File

@ -188,7 +188,6 @@ public:
void SanityCheck();
};
#ifndef DISABLE_RECORDING
struct InputRecordingOptions
{
wxPoint VirtualPadPosition;
@ -197,7 +196,6 @@ public:
InputRecordingOptions();
void loadSave(IniInterface& conf);
};
#endif
struct UiTemplateOptions {
UiTemplateOptions();
@ -213,9 +211,7 @@ public:
wxString OutputInterlaced;
wxString Paused;
wxString TitleTemplate;
#ifndef DISABLE_RECORDING
wxString RecordingTemplate;
#endif
};
struct CaptureOptions
@ -287,9 +283,7 @@ public:
ConsoleLogOptions ProgLogBox;
FolderOptions Folders;
GSWindowOptions GSWindow;
#ifndef DISABLE_RECORDING
InputRecordingOptions inputRecording;
#endif
UiTemplateOptions Templates;
CaptureOptions AudioCapture;

View File

@ -37,9 +37,7 @@
#include "R5900Exceptions.h"
#include "Sio.h"
#ifndef DISABLE_RECORDING
#include "Recording/InputRecordingControls.h"
#endif
alignas(16) SysMtgsThread mtgsThread;
alignas(16) AppCoreThread CoreThread;
@ -238,16 +236,11 @@ void Pcsx2App::SysApplySettings()
void AppCoreThread::OnResumeReady()
{
#ifndef DISABLE_RECORDING
if (!g_InputRecordingControls.IsFrameAdvancing())
{
wxGetApp().SysApplySettings();
wxGetApp().PostMethod(AppSaveSettings);
}
#else
wxGetApp().SysApplySettings();
wxGetApp().PostMethod(AppSaveSettings);
#endif
sApp.PostAppMethod(&Pcsx2App::leaveDebugMode);
_parent::OnResumeReady();

View File

@ -29,9 +29,7 @@
#include "Debugger/DisassemblyDialog.h"
#ifndef DISABLE_RECORDING
#include "Recording/InputRecording.h"
#endif
#include <wx/cmdline.h>
#include <wx/intl.h>
@ -95,12 +93,10 @@ void Pcsx2App::OpenMainFrame()
DisassemblyDialog* disassembly = new DisassemblyDialog(mainFrame);
m_id_Disassembler = disassembly->GetId();
#ifndef DISABLE_RECORDING
NewRecordingFrame* newRecordingFrame = new NewRecordingFrame(mainFrame);
m_id_NewRecordingFrame = newRecordingFrame->GetId();
if (g_Conf->EmuOptions.EnableRecordingTools)
g_InputRecording.InitVirtualPadWindows(mainFrame);
#endif
if (g_Conf->EmuOptions.Debugger.ShowDebuggerOnStart)
disassembly->Show();

View File

@ -32,10 +32,8 @@
#include "Debugger/DisassemblyDialog.h"
#ifndef DISABLE_RECORDING
# include "Recording/InputRecordingControls.h"
# include "Recording/InputRecording.h"
#endif
#include "Recording/InputRecordingControls.h"
#include "Recording/InputRecording.h"
#include "common/FileSystem.h"
#include "common/StringUtil.h"
@ -415,7 +413,6 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent&
{
try
{
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
{
if (g_InputRecordingControls.IsPaused())
@ -433,7 +430,6 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent&
}
g_InputRecordingControls.ResumeCoreThreadIfStarted();
}
#endif
(handler->*func)(event);
}
// ----------------------------------------------------------------------------
@ -448,10 +444,8 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent&
// Saved state load failed prior to the system getting corrupted (ie, file not found
// or some zipfile error) -- so log it and resume emulation.
Console.Warning( ex.FormatDiagnosticMessage() );
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsInitialLoad())
g_InputRecording.FailedSavestate();
#endif
CoreThread.Resume();
}
@ -738,7 +732,6 @@ void Pcsx2App::OpenGsPanel()
pxAssertDev(wi.has_value(), "GS frame has a valid native window");
g_gs_window_info = std::move(*wi);
#ifndef DISABLE_RECORDING
// Enable New & Play after the first game load of the session
sMainFrame.enableRecordingMenuItem(MenuId_Recording_New, !g_InputRecording.IsActive());
sMainFrame.enableRecordingMenuItem(MenuId_Recording_Play, true);
@ -747,7 +740,6 @@ void Pcsx2App::OpenGsPanel()
sMainFrame.enableRecordingMenuItem(MenuId_Recording_FrameAdvance, true);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_TogglePause, true);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_ToggleRecordingMode, g_InputRecording.IsActive());
#endif
}
@ -788,12 +780,10 @@ void Pcsx2App::OnGsFrameDestroyed(wxWindowID id)
m_id_GsFrame = wxID_ANY;
g_gs_window_info = {};
#ifndef DISABLE_RECORDING
// Disable recording controls that only make sense if the game is running
sMainFrame.enableRecordingMenuItem(MenuId_Recording_FrameAdvance, false);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_TogglePause, false);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_ToggleRecordingMode, false);
#endif
}
void Pcsx2App::OnProgramLogClosed( wxWindowID id )
@ -807,12 +797,10 @@ void Pcsx2App::OnProgramLogClosed( wxWindowID id )
void Pcsx2App::OnMainFrameClosed( wxWindowID id )
{
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive())
{
g_InputRecording.Stop();
}
#endif
// Nothing threaded depends on the mainframe (yet) -- it all passes through the main wxApp
// message handler. But that might change in the future.
@ -908,12 +896,10 @@ void Pcsx2App::SysExecute( CDVD_SourceType cdvdsrc, const wxString& elf_override
return;
SysExecutorThread.PostEvent( new SysExecEvent_Execute(cdvdsrc, elf_override) );
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
{
g_InputRecording.RecordingReset();
}
#endif
}
// Returns true if there is a "valid" virtual machine state from the user's perspective. This

View File

@ -327,10 +327,8 @@ static ConsoleLogSource* const ConLogSources[] =
(ConsoleLogSource*)&pxConLog_Thread,
(ConsoleLogSource*)&SysConsole.sysoutConsole,
(ConsoleLogSource*)&SysConsole.pgifLog,
#ifndef DISABLE_RECORDING
(ConsoleLogSource*)&SysConsole.recordingConsole,
(ConsoleLogSource*)&SysConsole.controlInfo,
#endif
};
// WARNING ConsoleLogSources & ConLogDefaults must have the same size
@ -345,10 +343,8 @@ static const bool ConLogDefaults[] =
false,
false,
false,
#ifndef DISABLE_RECORDING
false,
false,
#endif
false
};
@ -613,10 +609,8 @@ void ConsoleLogFrame::OnLoggingChanged()
{
GetMenuBar()->Check( MenuId_LogSource_Start+i, log->IsActive() );
}
#ifndef DISABLE_RECORDING
GetMenuBar()->Enable( MenuId_LogSource_Start + MenuId_LogSources_Offset_recordingConsole, g_Conf->EmuOptions.EnableRecordingTools);
GetMenuBar()->Enable( MenuId_LogSource_Start + MenuId_LogSources_Offset_controlInfo, g_Conf->EmuOptions.EnableRecordingTools);
#endif
}
}

View File

@ -32,10 +32,8 @@
#include "ConsoleLogger.h"
#ifndef DISABLE_RECORDING
# include "Recording/InputRecording.h"
# include "Recording/Utilities/InputRecordingLogger.h"
#endif
#include "Recording/InputRecording.h"
#include "Recording/Utilities/InputRecordingLogger.h"
#include <wx/utils.h>
#include <wx/graphics.h>
@ -110,7 +108,6 @@ void GSPanel::InitDefaultAccelerators()
m_Accels->Map( FULLSCREEN_TOGGLE_ACCELERATOR_GSPANEL, "FullscreenToggle" );
}
#ifndef DISABLE_RECORDING
void GSPanel::InitRecordingAccelerators()
{
// Note: these override GlobalAccels ( Pcsx2App::InitDefaultGlobalAccelerators() )
@ -180,7 +177,6 @@ void GSPanel::RemoveRecordingAccelerators()
InitDefaultAccelerators();
recordingConLog("Disabled Input Recording Key Bindings\n");
}
#endif
GSPanel::GSPanel( wxWindow* parent )
: wxWindow()
@ -197,12 +193,10 @@ GSPanel::GSPanel( wxWindow* parent )
InitDefaultAccelerators();
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
{
InitRecordingAccelerators();
}
#endif
SetBackgroundColour(wxColour((unsigned long)0));
if( g_Conf->GSWindow.AlwaysHideMouse )
@ -705,9 +699,7 @@ void GSPanel::WaylandDestroySubsurface()
// --------------------------------------------------------------------------------------
static const uint TitleBarUpdateMs = 333;
#ifndef DISABLE_RECORDING
static const uint TitleBarUpdateMsWhenRecording = 50;
#endif
GSFrame::GSFrame( const wxString& title)
: wxFrame(NULL, wxID_ANY, title, g_Conf->GSWindow.WindowPos)
@ -786,7 +778,6 @@ bool GSFrame::ShowFullScreen(bool show, bool updateConfig)
void GSFrame::UpdateTitleUpdateFreq()
{
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
{
m_timer_UpdateTitle.Start(TitleBarUpdateMsWhenRecording);
@ -795,9 +786,6 @@ void GSFrame::UpdateTitleUpdateFreq()
{
m_timer_UpdateTitle.Start(TitleBarUpdateMs);
}
#else
m_timer_UpdateTitle.Start(TitleBarUpdateMs);
#endif
}
void GSFrame::CoreThread_OnResumed()
@ -836,7 +824,6 @@ bool GSFrame::Show( bool shown )
if (!m_timer_UpdateTitle.IsRunning())
{
#ifndef DISABLE_RECORDING
if (g_Conf->EmuOptions.EnableRecordingTools)
{
m_timer_UpdateTitle.Start(TitleBarUpdateMsWhenRecording);
@ -845,9 +832,6 @@ bool GSFrame::Show( bool shown )
{
m_timer_UpdateTitle.Start(TitleBarUpdateMs);
}
#else
m_timer_UpdateTitle.Start(TitleBarUpdateMs);
#endif
}
}
else
@ -916,10 +900,9 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
const u64& smode2 = *(u64*)PS2GS_BASE(GS_SMODE2);
wxString omodef = (smode2 & 2) ? templates.OutputFrame : templates.OutputField;
wxString omodei = (smode2 & 1) ? templates.OutputInterlaced : templates.OutputProgressive;
#ifndef DISABLE_RECORDING
wxString title;
wxString movieMode;
if (g_InputRecording.IsActive())
if (g_InputRecording.IsActive())
{
title = templates.RecordingTemplate;
title.Replace(L"${frame}", pxsFmt(L"%d", g_InputRecording.GetFrameCounter()));
@ -928,10 +911,7 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
} else {
title = templates.TitleTemplate;
}
#else
wxString title = templates.TitleTemplate;
#endif
std::string gsStats;
GSgetTitleStats(gsStats);

View File

@ -53,10 +53,8 @@ public:
void DirectKeyCommand( const KeyAcceleratorCode& kac );
void InitDefaultAccelerators();
wxString GetAssociatedKeyCode(const char* id);
#ifndef DISABLE_RECORDING
void InitRecordingAccelerators();
void RemoveRecordingAccelerators();
#endif
protected:
void AppStatusEvent_OnSettingsApplied();

View File

@ -23,10 +23,8 @@
#include "AppAccelerators.h"
#include "AppSaveStates.h"
#ifndef DISABLE_RECORDING
#include "Recording/InputRecordingControls.h"
#include "Recording/InputRecording.h"
#endif
// Various includes needed for dumping...
#include "GS.h"
@ -345,12 +343,10 @@ namespace Implementations
if (g_Conf->GSWindow.CloseOnEsc)
{
sMainFrame.SetFocus();
#ifndef DISABLE_RECORDING
// Disable recording controls that only make sense if the game is running
sMainFrame.enableRecordingMenuItem(MenuId_Recording_FrameAdvance, false);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_TogglePause, false);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_ToggleRecordingMode, false);
#endif
}
}
@ -462,7 +458,6 @@ namespace Implementations
if (GSFrame* gsframe = wxGetApp().GetGsFramePtr())
gsframe->ShowFullScreen(!gsframe->IsFullScreen());
}
#ifndef DISABLE_RECORDING
void FrameAdvance()
{
if (g_Conf->EmuOptions.EnableRecordingTools)
@ -607,7 +602,6 @@ namespace Implementations
{
States_LoadSlot(9);
}
#endif
} // namespace Implementations
// --------------------------------------------------------------------------------------
@ -782,7 +776,6 @@ static const GlobalCommandDescriptor CommandDeclarations[] =
false,
},
#ifndef DISABLE_RECORDING
{"FrameAdvance", Implementations::FrameAdvance, NULL, NULL, false},
{"TogglePause", Implementations::TogglePause, NULL, NULL, false},
{"InputRecordingModeToggle", Implementations::InputRecordingModeToggle, NULL, NULL, false},
@ -809,7 +802,6 @@ static const GlobalCommandDescriptor CommandDeclarations[] =
{"States_LoadSlot7", Implementations::States_LoadSlot7, NULL, NULL, false},
{"States_LoadSlot8", Implementations::States_LoadSlot8, NULL, NULL, false},
{"States_LoadSlot9", Implementations::States_LoadSlot9, NULL, NULL, false},
#endif
// Command Declarations terminator:
// (must always be last in list!!)
{NULL}};

View File

@ -31,10 +31,8 @@
#include "svnrev.h"
#include "Saveslots.h"
#ifndef DISABLE_RECORDING
#include "Recording/InputRecording.h"
#include "Recording/InputRecordingControls.h"
#endif
// ------------------------------------------------------------------------
wxMenu* MainEmuFrame::MakeStatesSubMenu(int baseid, int loadBackupId) const
@ -71,11 +69,9 @@ void MainEmuFrame::UpdateStatusBar()
{
wxString temp(wxEmptyString);
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive() && g_InputRecording.GetInputRecordingData().FromSaveState())
temp += "Base Savestate - " + g_InputRecording.GetInputRecordingData().GetFilename() + "_SaveState.p2s";
else
#endif
{
if (g_Conf->EnableFastBoot)
temp += "Fast Boot - ";
@ -115,10 +111,10 @@ void MainEmuFrame::UpdateCdvdSrcSelection()
jNO_DEFAULT
}
sMenuBar.Check(cdsrc, true);
#ifndef DISABLE_RECORDING
if (!g_InputRecording.IsActive())
#endif
{
ApplyCDVDStatus();
}
UpdateStatusBar();
}
@ -259,9 +255,7 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_PINE_Enable_Click, this, MenuId_PINE_Enable);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_PINE_Settings_Click, this, MenuId_PINE_Settings);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_EnableWideScreenPatches_Click, this, MenuId_EnableWideScreenPatches);
#ifndef DISABLE_RECORDING
Bind(wxEVT_MENU, &MainEmuFrame::Menu_EnableRecordingTools_Click, this, MenuId_EnableInputRecording);
#endif
Bind(wxEVT_MENU, &MainEmuFrame::Menu_EnableHostFs_Click, this, MenuId_EnableHostFs);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_SysShutdown_Click, this, MenuId_Sys_Shutdown);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Exit_Click, this, MenuId_Exit);
@ -318,7 +312,6 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Capture_Screenshot_Screenshot_Click, this, MenuId_Capture_Screenshot_Screenshot);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Capture_Screenshot_Screenshot_As_Click, this, MenuId_Capture_Screenshot_Screenshot_As);
#ifndef DISABLE_RECORDING
// Recording
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_New_Click, this, MenuId_Recording_New);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_Play_Click, this, MenuId_Recording_Play);
@ -329,7 +322,6 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_ToggleRecordingMode_Click, this, MenuId_Recording_ToggleRecordingMode);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_VirtualPad_Open_Click, this, MenuId_Recording_VirtualPad_Port0);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_VirtualPad_Open_Click, this, MenuId_Recording_VirtualPad_Port1);
#endif
}
void MainEmuFrame::InitLogBoxPosition(AppConfig::ConsoleLogOptions& conf)
@ -400,10 +392,8 @@ void MainEmuFrame::CreatePcsx2Menu()
m_GameSettingsSubmenu.Append(MenuId_EnableWideScreenPatches, _("Enable &Widescreen Patches"),
_("Enabling Widescreen Patches may occasionally cause issues."), wxITEM_CHECK);
#ifndef DISABLE_RECORDING
m_GameSettingsSubmenu.Append(MenuId_EnableInputRecording, _("Enable &Input Recording"),
_("Input Recording for controller/keyboard presses, tools for automation and playback."), wxITEM_CHECK);
#endif
m_GameSettingsSubmenu.Append(MenuId_EnableHostFs, _("Enable &Host Filesystem"),
wxEmptyString, wxITEM_CHECK);
@ -513,7 +503,6 @@ void MainEmuFrame::CreateCaptureMenu()
void MainEmuFrame::CreateInputRecordingMenu()
{
#ifndef DISABLE_RECORDING
m_menuRecording.Append(MenuId_Recording_New, _("New"), _("Create a new input recording."))->Enable(false);
m_menuRecording.Append(MenuId_Recording_Stop, _("Stop"), _("Stop the active input recording."))->Enable(false);
m_menuRecording.Append(MenuId_Recording_Play, _("Play"), _("Playback an existing input recording."))->Enable(false);
@ -532,7 +521,6 @@ void MainEmuFrame::CreateInputRecordingMenu()
m_menuRecording.Append(MenuId_Recording_VirtualPad_Port0, _("Virtual Pad (Port 1)"));
m_menuRecording.Append(MenuId_Recording_VirtualPad_Port1, _("Virtual Pad (Port 2)"));
#endif
}
void MainEmuFrame::CreateHelpMenu()
@ -567,10 +555,8 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
, m_submenuVideoCapture(*new wxMenu())
, m_submenuPINE(*new wxMenu())
, m_submenuScreenshot(*new wxMenu())
#ifndef DISABLE_RECORDING
, m_menuRecording(*new wxMenu())
, m_submenu_recording_settings(*new wxMenu())
#endif
, m_menuHelp(*new wxMenu())
, m_LoadStatesSubmenu(*MakeStatesSubMenu(MenuId_State_Load01, MenuId_State_LoadBackup))
, m_SaveStatesSubmenu(*MakeStatesSubMenu(MenuId_State_Save01))
@ -597,13 +583,11 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
SetMenuBar(&m_menubar);
#ifndef DISABLE_RECORDING
// Append the Recording options if previously enabled and setting has been picked up from ini
if (g_Conf->EmuOptions.EnableRecordingTools)
{
m_menubar.Append(&m_menuRecording, _("&Input Record"));
}
#endif
m_menubar.Append(&m_menuHelp, _("&Help"));
// ------------------------------------------------------------------------
@ -675,9 +659,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
CreateConfigMenu();
CreateWindowsMenu();
CreateCaptureMenu();
#ifndef DISABLE_RECORDING
CreateInputRecordingMenu();
#endif
CreateHelpMenu();
m_MenuItem_Console.Check(g_Conf->ProgLogBox.Visible);
@ -830,13 +812,13 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags)
menubar.Check(MenuId_PINE_Enable, configToApply.EmuOptions.EnablePINE);
menubar.Check(MenuId_EnableWideScreenPatches, configToApply.EmuOptions.EnableWideScreenPatches);
menubar.Check(MenuId_Capture_Video_IncludeAudio, configToApply.AudioCapture.EnableAudio);
#ifndef DISABLE_RECORDING
menubar.Check(MenuId_EnableInputRecording, configToApply.EmuOptions.EnableRecordingTools);
wxString frame_advance_label = wxString(_("Configure Frame Advance"));
frame_advance_label.Append(wxString::Format(" (%d)", configToApply.inputRecording.m_frame_advance_amount));
m_submenu_recording_settings.SetLabel(MenuId_Recording_Config_FrameAdvance, frame_advance_label);
g_InputRecordingControls.setFrameAdvanceAmount(configToApply.inputRecording.m_frame_advance_amount);
#endif
menubar.Check(MenuId_EnableHostFs, configToApply.EmuOptions.HostFs);
menubar.Check(MenuId_Debug_CreateBlockdump, configToApply.EmuOptions.CdvdDumpBlocks);
#if defined(__POSIX__)
@ -866,7 +848,6 @@ void MainEmuFrame::AppendShortcutToMenuOption(wxMenuItem& item, wxString keyCode
item.SetItemLabel(text.Mid(0, tabPos) + L"\t" + keyCodeStr);
}
#ifndef DISABLE_RECORDING
void MainEmuFrame::initializeRecordingMenuItem(MenuIdentifiers menuId, wxString keyCodeStr, bool enable)
{
wxMenuItem& item = *m_menuRecording.FindChildItem(menuId);
@ -881,4 +862,3 @@ void MainEmuFrame::enableRecordingMenuItem(MenuIdentifiers menuId, bool enable)
wxMenuItem& item = *m_menuRecording.FindChildItem(menuId);
item.Enable(enable);
}
#endif

View File

@ -72,10 +72,8 @@ protected:
wxMenu& m_submenuPINE;
wxMenu& m_submenuScreenshot;
#ifndef DISABLE_RECORDING
wxMenu& m_menuRecording;
wxMenu& m_submenu_recording_settings;
#endif
wxMenu& m_menuHelp;
wxMenu& m_LoadStatesSubmenu;
@ -112,9 +110,7 @@ public:
void CreateConfigMenu();
void CreateWindowsMenu();
void CreateCaptureMenu();
#ifndef DISABLE_RECORDING
void CreateInputRecordingMenu();
#endif
void CreateHelpMenu();
bool Destroy();
@ -126,12 +122,10 @@ public:
void VideoCaptureToggle();
bool IsCapturing() const noexcept { return m_capturingVideo; }
#ifndef DISABLE_RECORDING
void initializeRecordingMenuItem(MenuIdentifiers menuId, wxString keyCodeStr, bool enable = true);
void enableRecordingMenuItem(MenuIdentifiers menuId, bool enable);
void StartInputRecording();
void StopInputRecording();
#endif
protected:
void DoGiveHelp(const wxString& text, bool show);
@ -169,9 +163,7 @@ protected:
void Menu_PINE_Enable_Click(wxCommandEvent& event);
void Menu_PINE_Settings_Click(wxCommandEvent& event);
void Menu_EnableWideScreenPatches_Click(wxCommandEvent& event);
#ifndef DISABLE_RECORDING
void Menu_EnableRecordingTools_Click(wxCommandEvent& event);
#endif
void Menu_EnableHostFs_Click(wxCommandEvent& event);
void Menu_BootCdvd_Click(wxCommandEvent& event);
@ -213,7 +205,6 @@ protected:
void Menu_Capture_Screenshot_Screenshot_Click(wxCommandEvent& event);
void Menu_Capture_Screenshot_Screenshot_As_Click(wxCommandEvent& event);
#ifndef DISABLE_RECORDING
void Menu_Recording_New_Click(wxCommandEvent& event);
void Menu_Recording_Play_Click(wxCommandEvent& event);
void Menu_Recording_Stop_Click(wxCommandEvent& event);
@ -223,7 +214,6 @@ protected:
void Menu_Recording_FrameAdvance_Click(wxCommandEvent& event);
void Menu_Recording_ToggleRecordingMode_Click(wxCommandEvent& event);
void Menu_Recording_VirtualPad_Open_Click(wxCommandEvent& event);
#endif
void _DoBootCdvd();
bool _DoSelectIsoBrowser(wxString& dest);

View File

@ -38,11 +38,9 @@
#include "fmt/core.h"
#include "wx/numdlg.h"
#ifndef DISABLE_RECORDING
#include "Recording/InputRecording.h"
#include "Recording/InputRecordingControls.h"
#include "Recording/VirtualPad/VirtualPad.h"
#endif
using namespace Dialogs;
@ -207,10 +205,8 @@ wxWindowID SwapOrReset_Iso(wxWindow* owner, IScopedCoreThread& core_control, con
dialog += dialog.GetCharHeight();
dialog += dialog.Heading(_("Do you want to swap discs or boot the new image (via system reset)?"));
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive() && g_InputRecording.GetInputRecordingData().FromSaveState())
dialog += dialog.Text(_("\n(Warning: The savestate accompanying the active input recording\nmay not be compatible with the new source)"));
#endif
result = pxIssueConfirmation(dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc"), "swap"));
if (result == wxID_CANCEL)
@ -268,10 +264,8 @@ wxWindowID SwapOrReset_Disc(wxWindow* owner, IScopedCoreThread& core, const wxSt
dialog += dialog.GetCharHeight();
dialog += dialog.Heading(_("Do you want to swap discs or boot the new disc (via system reset)?"));
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive() && g_InputRecording.GetInputRecordingData().FromSaveState())
dialog += dialog.Text(_("\n(Warning: The savestate accompanying the active input recording\nmay not be compatible with the new source)"));
#endif
result = pxIssueConfirmation(dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc"), "swap"));
if (result == wxID_CANCEL)
@ -320,10 +314,8 @@ wxWindowID SwapOrReset_CdvdSrc(wxWindow* owner, CDVD_SourceType newsrc)
dialog += dialog.Heading(changeMsg + L"\n\n" +
_("Do you want to swap discs or boot the new image (system reset)?"));
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive() && g_InputRecording.GetInputRecordingData().FromSaveState())
dialog += dialog.Text(_("\n(Warning: The savestate accompanying the active input recording\nmay not be compatible with the new source)"));
#endif
result = pxIssueConfirmation(dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc"), "swap"));
@ -514,19 +506,19 @@ void MainEmuFrame::Menu_CdvdSource_Click(wxCommandEvent& event)
}
SwapOrReset_CdvdSrc(this, newsrc);
#ifndef DISABLE_RECORDING
if (!g_InputRecording.IsActive())
#endif
{
ApplyCDVDStatus();
}
}
void MainEmuFrame::Menu_BootCdvd_Click(wxCommandEvent& event)
{
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive())
{
g_InputRecording.GoToFirstFrame(this);
}
else
#endif
{
g_Conf->EmuOptions.UseBOOT2Injection = g_Conf->EnableFastBoot;
_DoBootCdvd();
@ -687,7 +679,6 @@ void MainEmuFrame::Menu_EnableWideScreenPatches_Click(wxCommandEvent&)
AppSaveSettings();
}
#ifndef DISABLE_RECORDING
void MainEmuFrame::Menu_EnableRecordingTools_Click(wxCommandEvent& event)
{
bool checked = GetMenuBar()->IsChecked(MenuId_EnableInputRecording);
@ -751,7 +742,6 @@ void MainEmuFrame::Menu_EnableRecordingTools_Click(wxCommandEvent& event)
AppApplySettings();
AppSaveSettings();
}
#endif
void MainEmuFrame::Menu_EnableHostFs_Click(wxCommandEvent&)
{
@ -835,12 +825,10 @@ protected:
if (CoreThread.IsOpen())
{
CoreThread.Suspend();
#ifndef DISABLE_RECORDING
// Disable recording controls that only make sense if the game is running
sMainFrame.enableRecordingMenuItem(MenuId_Recording_FrameAdvance, false);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_TogglePause, false);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_ToggleRecordingMode, false);
#endif
}
else
CoreThread.Resume();
@ -862,7 +850,6 @@ void MainEmuFrame::Menu_SuspendResume_Click(wxCommandEvent& event)
void MainEmuFrame::Menu_SysShutdown_Click(wxCommandEvent& event)
{
bool doShutdown = true;
#ifndef DISABLE_RECORDING
if (!g_InputRecording.IsActive())
{
if (g_InputRecordingControls.IsPaused())
@ -888,7 +875,6 @@ void MainEmuFrame::Menu_SysShutdown_Click(wxCommandEvent& event)
doShutdown = false;
}
}
#endif
if (doShutdown)
{
if (m_capturingVideo)
@ -1063,7 +1049,6 @@ void MainEmuFrame::Menu_Capture_Screenshot_Screenshot_As_Click(wxCommandEvent& e
CoreThread.Resume();
}
#ifndef DISABLE_RECORDING
void MainEmuFrame::Menu_Recording_New_Click(wxCommandEvent& event)
{
const bool emulation_initially_paused = CoreThread.IsPaused();
@ -1196,4 +1181,3 @@ void MainEmuFrame::Menu_Recording_VirtualPad_Open_Click(wxCommandEvent& event)
{
g_InputRecording.ShowVirtualPad(event.GetId() - MenuId_Recording_VirtualPad_Port0);
}
#endif