diff options
author | Autechre | 2021-03-09 20:31:50 +0100 |
---|---|---|
committer | GitHub | 2021-03-09 20:31:50 +0100 |
commit | 45c8ef0a0bdf0557ab9c1153b5a6e77298cca34a (patch) | |
tree | 45b66118646d122a395cfecf2d740bed854c4e45 /main.c | |
parent | 6a8aa84200eb92a7f3f1b4befb0630d95ad59b8e (diff) | |
parent | 0522d9a4f535a61953da64518097fc7f64d7120c (diff) | |
download | picogpsp-45c8ef0a0bdf0557ab9c1153b5a6e77298cca34a.tar.gz picogpsp-45c8ef0a0bdf0557ab9c1153b5a6e77298cca34a.tar.bz2 picogpsp-45c8ef0a0bdf0557ab9c1153b5a6e77298cca34a.zip |
Merge pull request #101 from davidgfnet/master
Remove libco
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -132,6 +132,7 @@ u32 update_gba(void) cpu_ticks += execute_cycles; reg[CHANGED_PC_STATUS] = 0; + reg[COMPLETED_FRAME] = 0; if(gbc_sound_update) { @@ -227,14 +228,14 @@ u32 update_gba(void) oam_update_count = 0; flush_ram_count = 0; - switch_to_main_thread(); - update_gbc_sound(cpu_ticks); gbc_sound_update = 0; process_cheats(); vcount = 0; + // We completed a frame, tell the dynarec to exit to the main thread + reg[COMPLETED_FRAME] = 1; } if(vcount == (dispstat >> 8)) @@ -267,7 +268,7 @@ u32 update_gba(void) if(timer[i].count < execute_cycles) execute_cycles = timer[i].count; } - } while(reg[CPU_HALT_STATE] != CPU_ACTIVE); + } while(reg[CPU_HALT_STATE] != CPU_ACTIVE && !reg[COMPLETED_FRAME]); return execute_cycles; } |