File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -215,15 +215,15 @@ impl GameBoyAdvance {
215
215
pub fn frame ( & mut self ) {
216
216
static mut OVERSHOOT : usize = 0 ;
217
217
unsafe {
218
- OVERSHOOT = CYCLES_FULL_REFRESH - self . run :: < false > ( CYCLES_FULL_REFRESH - OVERSHOOT ) ;
218
+ OVERSHOOT = CYCLES_FULL_REFRESH . saturating_sub ( self . run :: < false > ( CYCLES_FULL_REFRESH - OVERSHOOT ) ) ;
219
219
}
220
220
}
221
221
222
222
/// like frame() but stop if a breakpoint is reached
223
223
fn frame_interruptible ( & mut self ) {
224
224
static mut OVERSHOOT : usize = 0 ;
225
225
unsafe {
226
- OVERSHOOT = CYCLES_FULL_REFRESH - self . run :: < true > ( CYCLES_FULL_REFRESH - OVERSHOOT ) ;
226
+ OVERSHOOT = CYCLES_FULL_REFRESH . saturating_sub ( self . run :: < true > ( CYCLES_FULL_REFRESH - OVERSHOOT ) ) ;
227
227
}
228
228
}
229
229
You can’t perform that action at this time.
0 commit comments