| 340 | } |
| 341 | |
| 342 | void InputRecording::adjustFrameCounterOnReRecord(u32 newFrameCounter) |
| 343 | { |
| 344 | if (newFrameCounter > m_starting_frame + m_file.getTotalFrames()) |
| 345 | { |
| 346 | InputRec::consoleLog("Warning, you've loaded PCSX2 emulation to a point after the end of the original recording. This should be avoided."); |
| 347 | InputRec::consoleLog("Save state's framecount has been ignored, using the max length of the recording instead."); |
| 348 | m_frame_counter = m_file.getTotalFrames(); |
| 349 | if (getControls().isReplaying()) |
| 350 | { |
| 351 | getControls().setRecordMode(); |
| 352 | } |
| 353 | return; |
| 354 | } |
| 355 | if (newFrameCounter < m_starting_frame) |
| 356 | { |
| 357 | InputRec::consoleLog("Warning, you've loaded PCSX2 emulation to a point before the start of the original recording. This should be avoided."); |
| 358 | InputRec::consoleLog("Save state's framecount has been ignored, starting from the beginning in replay mode."); |
| 359 | m_frame_counter = 0; |
| 360 | if (getControls().isRecording()) |
| 361 | { |
| 362 | getControls().setReplayMode(); |
| 363 | } |
| 364 | return; |
| 365 | } |
| 366 | else if (newFrameCounter == 0 && getControls().isRecording()) |
| 367 | { |
| 368 | getControls().setReplayMode(); |
| 369 | } |
| 370 | m_frame_counter = newFrameCounter - m_starting_frame; |
| 371 | m_frame_counter_stateless--; |
| 372 | m_file.setTotalFrames(m_frame_counter); |
| 373 | InformGSThread(); |
| 374 | } |
| 375 | |
| 376 | InputRecordingControls& InputRecording::getControls() |
| 377 | { |
nothing calls this directly
no test coverage detected