From 9d9005542c748642cffa0eb4ae4f981c38596bd3 Mon Sep 17 00:00:00 2001 From: jbo_85 Date: Mon, 27 Jul 2009 01:57:21 +0000 Subject: [PATCH] Fixed saving of pauseWhenInactive setting to the config file. Fixed logic bug with autoFrameSkip setting to not disable autoFrameSkip when throttle is disabled. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@880 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/VBA.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index 776b6b29..f372b13a 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -873,13 +873,11 @@ void VBA::updateThrottle( unsigned short throttle ) { this->throttle = throttle; - if( throttle == 0 ) { - autoFrameSkip = false; - } else { + 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 = true; + autoFrameSkip = false; frameSkip = 0; systemFrameSkip = 0; } @@ -2542,6 +2540,7 @@ void VBA::saveSettings() regSetDwordValue("RFU", adapter); regSetDwordValue("linkEnabled", linkenable); regSetDwordValue("lastFullscreen", lastFullscreen); + regSetDwordValue("pauseWhenInactive", pauseWhenInactive); #ifndef NO_OAL regSetStringValue( "oalDevice", oalDevice );