idle RDP before load state (#1000)

* idle RDP before load state

* more
This commit is contained in:
Logan McNaughton
2026-05-31 22:25:28 +02:00
committed by GitHub
parent d968983ceb
commit cbc973a559
5 changed files with 23 additions and 13 deletions
+7 -9
View File
@@ -702,19 +702,17 @@ void rdp_check_framebuffers(uint32_t address, uint32_t length) {
size_t rdp_state_size() { return sizeof(RDP_DEVICE); }
void rdp_save_state(uint8_t *state, bool rewind) {
if (!rewind) { // speed hack for rewind
processor->idle();
rdram_dirty.assign(gfx_info.RDRAM_SIZE >> 3, false);
sync_signal = 0;
}
void rdp_idle() {
processor->idle();
rdram_dirty.assign(gfx_info.RDRAM_SIZE >> 3, false);
sync_signal = 0;
}
void rdp_save_state(uint8_t *state) {
memcpy(state, &rdp_device, sizeof(RDP_DEVICE));
}
void rdp_load_state(GFX_INFO _gfx_info, const uint8_t *state) {
sync_signal = 0;
rdram_dirty.assign(gfx_info.RDRAM_SIZE >> 3, false);
gfx_info = _gfx_info;
memcpy(&rdp_device, state, sizeof(RDP_DEVICE));
}