mirror of https://github.com/PCSX2/pcsx2.git
pcsx2-tas: Adjust TAS code to be properly disabled with macro.
VS complains about errors so isolate the code in each file for TAS with macros. Remove ifndef for m_capturingVideo as it is used for video capture menu.
This commit is contained in:
parent
5afa0e6d20
commit
62dd5d980d
|
@ -28,20 +28,23 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
InputRecording g_InputRecording;
|
|
||||||
|
|
||||||
// Tag and save framecount along with savestate
|
// Tag and save framecount along with savestate
|
||||||
void SaveStateBase::InputRecordingFreeze()
|
void SaveStateBase::InputRecordingFreeze()
|
||||||
{
|
{
|
||||||
FreezeTag("InputRecording");
|
FreezeTag("InputRecording");
|
||||||
Freeze(g_FrameCount);
|
Freeze(g_FrameCount);
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
if (g_FrameCount > 0 && IsLoading())
|
if (g_FrameCount > 0 && IsLoading())
|
||||||
{
|
{
|
||||||
g_InputRecordingData.AddUndoCount();
|
g_InputRecordingData.AddUndoCount();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
|
InputRecording g_InputRecording;
|
||||||
|
|
||||||
// Main func for handling controller input data
|
// Main func for handling controller input data
|
||||||
// - Called by Sio.cpp::sioWriteController
|
// - Called by Sio.cpp::sioWriteController
|
||||||
void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 & bufCount, u8 buf[])
|
void InputRecording::ControllerInterrupt(u8 &data, u8 &port, u16 & bufCount, u8 buf[])
|
||||||
|
@ -231,3 +234,4 @@ bool InputRecording::IsInterruptFrame()
|
||||||
{
|
{
|
||||||
return fInterruptFrame;
|
return fInterruptFrame;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "InputRecordingFile.h"
|
#include "InputRecordingFile.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
enum INPUT_RECORDING_MODE
|
enum INPUT_RECORDING_MODE
|
||||||
{
|
{
|
||||||
INPUT_RECORDING_MODE_NONE,
|
INPUT_RECORDING_MODE_NONE,
|
||||||
|
@ -52,3 +53,4 @@ private:
|
||||||
extern InputRecording g_InputRecording;
|
extern InputRecording g_InputRecording;
|
||||||
static InputRecordingFile& g_InputRecordingData = g_InputRecording.GetInputRecordingData();
|
static InputRecordingFile& g_InputRecordingData = g_InputRecording.GetInputRecordingData();
|
||||||
static InputRecordingHeader& g_InputRecordingHeader = g_InputRecording.GetInputRecordingData().GetHeader();
|
static InputRecordingHeader& g_InputRecordingHeader = g_InputRecording.GetInputRecordingData().GetHeader();
|
||||||
|
#endif
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "InputRecordingFile.h"
|
#include "InputRecordingFile.h"
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
long InputRecordingFile::GetBlockSeekPoint(const long & frame)
|
long InputRecordingFile::GetBlockSeekPoint(const long & frame)
|
||||||
{
|
{
|
||||||
if (savestate.fromSavestate)
|
if (savestate.fromSavestate)
|
||||||
|
@ -396,3 +397,4 @@ const wxString & InputRecordingFile::GetFilename()
|
||||||
{
|
{
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "System.h"
|
#include "System.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
struct InputRecordingHeader
|
struct InputRecordingHeader
|
||||||
{
|
{
|
||||||
u8 version = 1;
|
u8 version = 1;
|
||||||
|
@ -93,3 +94,4 @@ private:
|
||||||
unsigned long MaxFrame = 0;
|
unsigned long MaxFrame = 0;
|
||||||
unsigned long UndoCount = 0;
|
unsigned long UndoCount = 0;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "NewRecordingFrame.h"
|
#include "NewRecordingFrame.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
NewRecordingFrame::NewRecordingFrame(wxWindow *parent)
|
NewRecordingFrame::NewRecordingFrame(wxWindow *parent)
|
||||||
: wxDialog(parent, wxID_ANY, "New Input Recording", wxDefaultPosition, wxDefaultSize, wxSTAY_ON_TOP | wxCAPTION)
|
: wxDialog(parent, wxID_ANY, "New Input Recording", wxDefaultPosition, wxDefaultSize, wxSTAY_ON_TOP | wxCAPTION)
|
||||||
{
|
{
|
||||||
|
@ -73,3 +74,4 @@ int NewRecordingFrame::GetFrom() const
|
||||||
{
|
{
|
||||||
return m_fromChoice->GetSelection();
|
return m_fromChoice->GetSelection();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <wx/filepicker.h>
|
#include <wx/filepicker.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
enum MenuIds_New_Recording_Frame
|
enum MenuIds_New_Recording_Frame
|
||||||
{
|
{
|
||||||
MenuIds_New_Recording_Frame_File = 0,
|
MenuIds_New_Recording_Frame_File = 0,
|
||||||
|
@ -46,3 +47,4 @@ private:
|
||||||
wxButton *m_startRecording;
|
wxButton *m_startRecording;
|
||||||
wxButton *m_cancelRecording;
|
wxButton *m_cancelRecording;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "PadData.h"
|
#include "PadData.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
PadData::PadData()
|
PadData::PadData()
|
||||||
{
|
{
|
||||||
// TODO - multi-tap support eventually?
|
// TODO - multi-tap support eventually?
|
||||||
|
@ -330,3 +331,4 @@ int PadData::GetAnalogVectorByte(PadData_AnalogVector vector) const
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
static const int PadDataNormalButtonCount = 16;
|
static const int PadDataNormalButtonCount = 16;
|
||||||
enum PadData_NormalButton
|
enum PadData_NormalButton
|
||||||
{
|
{
|
||||||
|
@ -85,3 +86,4 @@ private:
|
||||||
int GetAnalogVector(int port, PadData_AnalogVector vector) const;
|
int GetAnalogVector(int port, PadData_AnalogVector vector) const;
|
||||||
int GetAnalogVectorByte(PadData_AnalogVector vector) const;
|
int GetAnalogVectorByte(PadData_AnalogVector vector) const;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "RecordingControls.h"
|
#include "RecordingControls.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
RecordingControls g_RecordingControls;
|
RecordingControls g_RecordingControls;
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -115,3 +116,4 @@ void RecordingControls::Unpause()
|
||||||
fStart = true;
|
fStart = true;
|
||||||
fFrameAdvance = true;
|
fFrameAdvance = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
class RecordingControls
|
class RecordingControls
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -46,3 +47,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
extern RecordingControls g_RecordingControls;
|
extern RecordingControls g_RecordingControls;
|
||||||
|
#endif
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "InputRecording.h"
|
#include "InputRecording.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
RecordingInputManager g_RecordingInput;
|
RecordingInputManager g_RecordingInput;
|
||||||
|
|
||||||
RecordingInputManager::RecordingInputManager()
|
RecordingInputManager::RecordingInputManager()
|
||||||
|
@ -86,3 +87,4 @@ void RecordingInputManager::SetVirtualPadReading(int port, bool read)
|
||||||
{
|
{
|
||||||
virtualPad[port] = read;
|
virtualPad[port] = read;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "PadData.h"
|
#include "PadData.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
class RecordingInputManager
|
class RecordingInputManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -36,3 +37,4 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
extern RecordingInputManager g_RecordingInput;
|
extern RecordingInputManager g_RecordingInput;
|
||||||
|
#endif
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "Recording/VirtualPad.h"
|
#include "Recording/VirtualPad.h"
|
||||||
#include "Recording/RecordingInputManager.h"
|
#include "Recording/RecordingInputManager.h"
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
wxBEGIN_EVENT_TABLE(VirtualPad, wxFrame)
|
wxBEGIN_EVENT_TABLE(VirtualPad, wxFrame)
|
||||||
EVT_CLOSE(VirtualPad::OnClose)
|
EVT_CLOSE(VirtualPad::OnClose)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
@ -398,3 +399,4 @@ void VirtualPad::DoLayout()
|
||||||
SetSizer(container);
|
SetSizer(container);
|
||||||
Layout();
|
Layout();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "Recording/PadData.h"
|
#include "Recording/PadData.h"
|
||||||
|
|
||||||
|
#ifndef DISABLE_RECORDING
|
||||||
class VirtualPad : public wxFrame
|
class VirtualPad : public wxFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -90,3 +91,4 @@ private:
|
||||||
protected:
|
protected:
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -130,9 +130,7 @@ protected:
|
||||||
|
|
||||||
PerPluginMenuInfo m_PluginMenuPacks[PluginId_Count];
|
PerPluginMenuInfo m_PluginMenuPacks[PluginId_Count];
|
||||||
|
|
||||||
#ifndef DISABLE_RECORDING
|
|
||||||
bool m_capturingVideo;
|
bool m_capturingVideo;
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual void DispatchEvent( const PluginEventType& plugin_evt );
|
virtual void DispatchEvent( const PluginEventType& plugin_evt );
|
||||||
virtual void DispatchEvent( const CoreThreadStatus& status );
|
virtual void DispatchEvent( const CoreThreadStatus& status );
|
||||||
|
|
Loading…
Reference in New Issue