input-rec: replace u64s with u32

+ Converts g_inputRecordingFile's total frame count to unsigned long to match.
This commit is contained in:
sonicfind 2022-09-22 12:23:20 -05:00 committed by refractionpcsx2
parent b86241695d
commit 1628237ba7
4 changed files with 10 additions and 10 deletions

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.");

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

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;
}

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