fixed fast forward

This commit is contained in:
2025-02-18 19:45:13 -07:00
parent 37c4d267c4
commit 89a1b4cec6
5 changed files with 17 additions and 29 deletions

View File

@ -282,13 +282,11 @@ void ui_update() {
update_debug_window();
}
static bool ff = false;
void ui_on_key(bool down, u32 key_code) {
if(key_code == SDLK_SPACE && down == true) {
ff = !ff;
if(ff){
ppu_get_context()->target_frame_time = 1000/300;
emu_get_context()->fast_forward = !emu_get_context()->fast_forward;
if(emu_get_context()->fast_forward){
ppu_get_context()->target_frame_time = 1000/(60 * FAST_FORWARD_SPEED);
} else {
ppu_get_context()->target_frame_time = 1000/60;
}