File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ void SyncThrottle()
334
334
335
335
throttle . SetCoreFps ( Global . Emulator . CoreOutputComm . VsyncRate ) ;
336
336
337
+ throttle . signal_paused = EmulatorPaused || Global . Emulator is NullEmulator ;
337
338
throttle . signal_unthrottle = unthrottled ;
338
339
if ( fastforward )
339
340
throttle . SetSpeedPercent ( Global . Config . SpeedPercentAlternate ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ class Throttle
14
14
int framesskipped ;
15
15
public bool skipnextframe ;
16
16
17
+ //if the emulator is paused then we dont need to behave as if unthrottled
18
+ public bool signal_paused ;
17
19
public bool signal_frameAdvance ;
18
20
public bool signal_unthrottle ;
19
21
public bool signal_continuousframeAdvancing ; //continuousframeAdvancing
@@ -64,9 +66,9 @@ public void Step(bool allowSleep, int forceFrameSkip)
64
66
if ( framestoskip < 1 )
65
67
framestoskip += ffSkipRate ;
66
68
}
67
- else if ( ( /*autoframeskipenab && frameskiprate ||*/ cfg_frameLimit ) & & allowSleep )
69
+ else if ( ( signal_paused || /*autoframeskipenab && frameskiprate ||*/ cfg_frameLimit ) && allowSleep )
68
70
{
69
- SpeedThrottle ( ) ;
71
+ SpeedThrottle ( signal_paused ) ;
70
72
}
71
73
72
74
if ( cfg_autoframeskipenab && cfg_frameskiprate != 0 )
@@ -303,7 +305,7 @@ int AutoFrameSkip_GetSkipAmount(int min, int max)
303
305
}
304
306
305
307
306
- void SpeedThrottle ( )
308
+ void SpeedThrottle ( bool paused )
307
309
{
308
310
AutoFrameSkip_BeforeThrottle ( ) ;
309
311
@@ -322,7 +324,7 @@ void SpeedThrottle()
322
324
sleepy /= afsfreq ;
323
325
else
324
326
sleepy = 0 ;
325
- if ( sleepy >= 10 )
327
+ if ( sleepy >= 10 || paused )
326
328
{
327
329
Thread . Sleep ( ( int ) ( sleepy / 2 ) ) ;
328
330
// 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