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;
videoOption = ReadPref("video", 2); // VIDEO_3X = 2
fsAdapter = ReadPref("fsAdapter", 0);
throttle = ReadPref("throttle", 0);
fsWidth = ReadPref("fsWidth", 800);
fsHeight = ReadPref("fsHeight", 600);
fsColorDepth = ReadPref("fsColorDepth", 32);

View File

@ -560,11 +560,11 @@ bool soundInit()
return true;
}
void soundSetThrottle(unsigned short throttle)
void soundSetThrottle(unsigned short _throttle)
{
if(!soundDriver)
return;
soundDriver->setThrottle(throttle);
soundDriver->setThrottle(_throttle);
}
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 ) {
Sm60FPS::K_fCpuSpeed = (float)throttle;
if( _throttle ) {
Sm60FPS::K_fCpuSpeed = (float)_throttle;
Sm60FPS::K_fTargetFps = 60.0f * Sm60FPS::K_fCpuSpeed / 100;
Sm60FPS::K_fDT = 1000.0f / Sm60FPS::K_fTargetFps;
autoFrameSkip = false;
@ -863,7 +863,8 @@ void VBA::updateThrottle( unsigned short throttle )
systemFrameSkip = 0;
}
soundSetThrottle(throttle);
throttle = _throttle;
soundSetThrottle(_throttle);
}