File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ void SyncThrottle()
334334
335335 throttle . SetCoreFps ( Global . Emulator . CoreOutputComm . VsyncRate ) ;
336336
337+ throttle . signal_paused = EmulatorPaused || Global . Emulator is NullEmulator ;
337338 throttle . signal_unthrottle = unthrottled ;
338339 if ( fastforward )
339340 throttle . SetSpeedPercent ( Global . Config . SpeedPercentAlternate ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ class Throttle
1414 int framesskipped ;
1515 public bool skipnextframe ;
1616
17+ //if the emulator is paused then we dont need to behave as if unthrottled
18+ public bool signal_paused ;
1719 public bool signal_frameAdvance ;
1820 public bool signal_unthrottle ;
1921 public bool signal_continuousframeAdvancing ; //continuousframeAdvancing
@@ -64,9 +66,9 @@ public void Step(bool allowSleep, int forceFrameSkip)
6466 if ( framestoskip < 1 )
6567 framestoskip += ffSkipRate ;
6668 }
67- else if ( ( /*autoframeskipenab && frameskiprate ||*/ cfg_frameLimit ) & & allowSleep )
69+ else if ( ( signal_paused || /*autoframeskipenab && frameskiprate ||*/ cfg_frameLimit ) && allowSleep )
6870 {
69- SpeedThrottle ( ) ;
71+ SpeedThrottle ( signal_paused ) ;
7072 }
7173
7274 if ( cfg_autoframeskipenab && cfg_frameskiprate != 0 )
@@ -303,7 +305,7 @@ int AutoFrameSkip_GetSkipAmount(int min, int max)
303305 }
304306
305307
306- void SpeedThrottle ( )
308+ void SpeedThrottle ( bool paused )
307309 {
308310 AutoFrameSkip_BeforeThrottle ( ) ;
309311
@@ -322,7 +324,7 @@ void SpeedThrottle()
322324 sleepy /= afsfreq ;
323325 else
324326 sleepy = 0 ;
325- if ( sleepy >= 10 )
327+ if ( sleepy >= 10 || paused )
326328 {
327329 Thread . Sleep ( ( int ) ( sleepy / 2 ) ) ;
328330 // reduce it further beacuse Sleep usually sleeps for more than the amount we tell it to
You can’t perform that action at this time.
0 commit comments