input-rec: replace u64s with u32

+ Converts g_inputRecordingFile's total frame count to unsigned long to match.
This commit is contained in:
sonicfind authored and refractionpcsx2 committed 2022-11-27 20:02:29 +00:00
1 parent b86241695d
commit 1628237ba7
4 files changed
+10 -10

No files matched your search

+3 -3
View File
@@ -741,7 +741,7 @@ bool InputRecording::isTypeSavestate() const
return m_type == Type::FROM_SAVESTATE;
}
void InputRecording::setStartingFrame(u64 startingFrame)
void InputRecording::setStartingFrame(u32 startingFrame)
{
if (m_type == Type::POWER_ON)
{
@@ -751,9 +751,9 @@ void InputRecording::setStartingFrame(u64 startingFrame)
m_starting_frame = startingFrame;
}
void InputRecording::adjustFrameCounterOnReRecord(u64 newFrameCounter)
void InputRecording::adjustFrameCounterOnReRecord(u32 newFrameCounter)
{
if (newFrameCounter > m_starting_frame + (u64)m_file.getTotalFrames())
if (newFrameCounter > m_starting_frame + m_file.getTotalFrames())
{
InputRec::consoleLog("Warning, you've loaded PCSX2 emulation to a point after the end of the original recording. This should be avoided.");
InputRec::consoleLog("Savestate's framecount has been ignored, using the max length of the recording instead.");
+4 -4
View File
@@ -178,7 +178,7 @@ public:
void handleExceededFrameCounter();
void handleLoadingSavestate();
bool isTypeSavestate() const;
void adjustFrameCounterOnReRecord(u64 newFrameCounter);
void adjustFrameCounterOnReRecord(u32 newFrameCounter);
InputRecordingControls& getControls();
const InputRecordingFile& getData() const;
@@ -199,12 +199,12 @@ private:
bool m_pad_data_available = false;
bool m_watching_for_rerecords = false;
u64 m_frame_counter = 0;
u32 m_frame_counter = 0;
// Either 0 for a power-on movie, or the g_FrameCount that is stored on the starting frame
u64 m_starting_frame = 0;
u32 m_starting_frame = 0;
void initializeState();
void setStartingFrame(u64 startingFrame);
void setStartingFrame(u32 startingFrame);
private:
// Resolve the name and region of the game currently loaded using the GameDB
+1 -1
View File
@@ -288,7 +288,7 @@ InputRecordingFileHeader& InputRecordingFile::getHeader() noexcept
return m_header;
}
long InputRecordingFile::getTotalFrames() const noexcept
unsigned long InputRecordingFile::getTotalFrames() const noexcept
{
return m_totalFrames;
}
+2 -2
View File
@@ -177,7 +177,7 @@ public:
// Retrieve the input recording's filename (not the path)
const std::string& getFilename() const noexcept;
InputRecordingFileHeader& getHeader() noexcept;
long getTotalFrames() const noexcept;
unsigned long getTotalFrames() const noexcept;
unsigned long getUndoCount() const noexcept;
void logRecordingMetadata();
@@ -202,7 +202,7 @@ private:
InputRecordingSavestate m_savestate;
// An signed 32-bit frame limit is equivalent to 1.13 years of continuous 60fps footage
long m_totalFrames = 0;
unsigned long m_totalFrames = 0;
unsigned long m_undoCount = 0;
// Calculates the position of the current frame in the input recording