FDS: Fixed bug that could cause full speed mode to turn on when unloading a FDS rom

This commit is contained in:
Souryo 2016-06-25 22:05:37 -04:00
parent 9fc9c8bc60
commit acfd69a4b7
2 changed files with 4 additions and 2 deletions

View File

@ -332,7 +332,9 @@ FDS::FDS()
FDS::~FDS()
{
//Restore emulation speed to normal when closing
EmulationSettings::SetEmulationSpeed(_previousSpeed);
if(_previousSpeed >= 0) {
EmulationSettings::SetEmulationSpeed(_previousSpeed);
}
if(_isDirty) {
FdsLoader loader;

View File

@ -67,7 +67,7 @@ private:
string _romFilepath;
uint8_t _gameStarted = 0;
uint32_t _previousSpeed = 0;
int32_t _previousSpeed = -1;
bool _fastForwarding = false;
protected: