switch idle command (#1002)

* switch idle command

* more
This commit is contained in:
Logan McNaughton
2026-06-01 13:43:39 +02:00
committed by GitHub
parent 5a5ff40efc
commit eb64a9ad43
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ fn main() {
.allowlist_function("rdp_check_callback")
.allowlist_function("rdp_check_framebuffers")
.allowlist_function("rdp_state_size")
.allowlist_function("rdp_idle")
.allowlist_function("rdp_hard_sync")
.allowlist_function("rdp_save_state")
.allowlist_function("rdp_load_state")
.allowlist_function("rdp_set_fps")
+2 -2
View File
@@ -702,8 +702,8 @@ void rdp_check_framebuffers(uint32_t address, uint32_t length) {
size_t rdp_state_size() { return sizeof(RDP_DEVICE); }
void rdp_idle() {
processor->idle();
void rdp_hard_sync() {
processor->wait_for_timeline(processor->signal_timeline());
rdram_dirty.assign(gfx_info.RDRAM_SIZE >> 3, false);
sync_signal = 0;
}
+1 -1
View File
@@ -61,7 +61,7 @@ uint64_t rdp_process_commands();
void rdp_onscreen_message(const char *message, MESSAGE_LENGTH milliseconds);
void rdp_check_framebuffers(uint32_t address, uint32_t length);
size_t rdp_state_size();
void rdp_idle();
void rdp_hard_sync();
void rdp_save_state(uint8_t *state);
void rdp_load_state(GFX_INFO _gfx_info, const uint8_t *state);
void rdp_set_fps(uint32_t fps, uint32_t vis);
+2 -2
View File
@@ -113,7 +113,7 @@ pub fn process_savestates(device: &mut device::Device) {
fn create_savestate(device: &mut device::Device, rewind: bool) {
if !rewind {
// skipped on rewind as a speed hack
ui::video::idle(); // to flush the RDP so the RDRAM is updated
ui::video::hard_sync(); // to flush the RDP so the RDRAM is updated
}
let mut rdp_state: Vec<u8> = vec![0; ui::video::state_size()];
ui::video::save_state(rdp_state.as_mut_ptr());
@@ -232,7 +232,7 @@ fn load_savestate(device: &mut device::Device, rewind: bool) {
if let Some(mut state) = state_data
&& device.rdram.size == state.device.rdram.size
{
ui::video::idle(); // to flush the RDP so it doesn't overwrite the RDRAM
ui::video::hard_sync(); // to flush the RDP so it doesn't overwrite the RDRAM
device.savestate.last_rewind_saved = state.device.vi.elapsed_time;
+2 -2
View File
@@ -165,8 +165,8 @@ pub fn save_state(rdp_state: *mut u8) {
unsafe { rdp_save_state(rdp_state) }
}
pub fn idle() {
unsafe { rdp_idle() }
pub fn hard_sync() {
unsafe { rdp_hard_sync() }
}
pub fn load_state(device: &mut device::Device, rdp_state: *const u8) {