diff --git a/src/gb/GB.cpp b/src/gb/GB.cpp index ef21cbaa..827f0283 100644 --- a/src/gb/GB.cpp +++ b/src/gb/GB.cpp @@ -4843,6 +4843,8 @@ void gbEmulate(int ticksToStop) if ((gbLcdTicksDelayed <= 0) && (gbLCDChangeHappened)) { int framesToSkip = systemFrameSkip; + +#ifndef __LIBRETRO__ static bool speedup_throttle_set = false; static uint32_t last_throttle; @@ -4868,6 +4870,10 @@ void gbEmulate(int ticksToStop) speedup_throttle_set = false; } +#else + if ((gbJoymask[0] >> 10) & 1) + framesToSkip = 9; +#endif //gbLcdTicksDelayed = gbLcdTicks+1; gbLCDChangeHappened = false; @@ -4946,7 +4952,11 @@ void gbEmulate(int ticksToStop) speedup = false; +#ifndef __LIBRETRO__ if (newmask & 1 && speedup_throttle == 0) +#else + if (newmask & 1) +#endif speedup = true; gbCapture = (newmask & 2) ? true : false; diff --git a/src/gba/GBA.cpp b/src/gba/GBA.cpp index 4d82165c..eb90a2aa 100644 --- a/src/gba/GBA.cpp +++ b/src/gba/GBA.cpp @@ -3756,6 +3756,8 @@ void CPULoop(int ticks) } } else { int framesToSkip = systemFrameSkip; + +#ifndef __LIBRETRO__ static bool speedup_throttle_set = false; static uint32_t last_throttle; @@ -3781,6 +3783,10 @@ void CPULoop(int ticks) speedup_throttle_set = false; } +#else + if ((joy >> 10) & 1) + framesToSkip = 9; +#endif if (DISPSTAT & 2) { // if in H-Blank, leave it and move to drawing mode @@ -3814,7 +3820,11 @@ void CPULoop(int ticks) speedup = false; +#ifndef __LIBRETRO__ if (ext & 1 && speedup_throttle == 0) +#else + if (ext & 1) +#endif speedup = true; capture = (ext & 2) ? true : false;