Fixed the throttle menu option

This commit is contained in:
skidau 2015-04-19 22:07:49 +00:00
parent 95ba9a92a0
commit 32fa4b20cf
3 changed files with 8 additions and 6 deletions

View File

@ -450,6 +450,7 @@ void LoadConfig()
fullScreenStretch = ReadPref("stretch", 0) ? true : false; fullScreenStretch = ReadPref("stretch", 0) ? true : false;
videoOption = ReadPref("video", 2); // VIDEO_3X = 2 videoOption = ReadPref("video", 2); // VIDEO_3X = 2
fsAdapter = ReadPref("fsAdapter", 0); fsAdapter = ReadPref("fsAdapter", 0);
throttle = ReadPref("throttle", 0);
fsWidth = ReadPref("fsWidth", 800); fsWidth = ReadPref("fsWidth", 800);
fsHeight = ReadPref("fsHeight", 600); fsHeight = ReadPref("fsHeight", 600);
fsColorDepth = ReadPref("fsColorDepth", 32); fsColorDepth = ReadPref("fsColorDepth", 32);

View File

@ -560,11 +560,11 @@ bool soundInit()
return true; return true;
} }
void soundSetThrottle(unsigned short throttle) void soundSetThrottle(unsigned short _throttle)
{ {
if(!soundDriver) if(!soundDriver)
return; return;
soundDriver->setThrottle(throttle); soundDriver->setThrottle(_throttle);
} }
long soundGetSampleRate() long soundGetSampleRate()

View File

@ -852,10 +852,10 @@ void VBA::updateFilter()
} }
void VBA::updateThrottle( unsigned short throttle ) void VBA::updateThrottle( unsigned short _throttle )
{ {
if( throttle ) { if( _throttle ) {
Sm60FPS::K_fCpuSpeed = (float)throttle; Sm60FPS::K_fCpuSpeed = (float)_throttle;
Sm60FPS::K_fTargetFps = 60.0f * Sm60FPS::K_fCpuSpeed / 100; Sm60FPS::K_fTargetFps = 60.0f * Sm60FPS::K_fCpuSpeed / 100;
Sm60FPS::K_fDT = 1000.0f / Sm60FPS::K_fTargetFps; Sm60FPS::K_fDT = 1000.0f / Sm60FPS::K_fTargetFps;
autoFrameSkip = false; autoFrameSkip = false;
@ -863,7 +863,8 @@ void VBA::updateThrottle( unsigned short throttle )
systemFrameSkip = 0; systemFrameSkip = 0;
} }
soundSetThrottle(throttle); throttle = _throttle;
soundSetThrottle(_throttle);
} }