diff --git a/desmume/src/commandline.cpp b/desmume/src/commandline.cpp index bf75fbd8c..9b274bc9d 100644 --- a/desmume/src/commandline.cpp +++ b/desmume/src/commandline.cpp @@ -38,6 +38,7 @@ CommandLine::CommandLine() , error(NULL) , ctx(g_option_context_new ("")) , _rigorous_timing(0) +, _advanced_timing(-1) , _play_movie_file(0) , _record_movie_file(0) , _cflash_image(0) @@ -86,6 +87,7 @@ void CommandLine::loadCommonOptions() { "scanline-filter-a", 0, 0, G_OPTION_ARG_INT, &scanline_filter_a, "Intensity of fadeout for scanlines filter (edge) (default 2)", "SCANLINE_FILTER_A"}, { "scanline-filter-b", 0, 0, G_OPTION_ARG_INT, &scanline_filter_b, "Intensity of fadeout for scanlines filter (corner) (default 4)", "SCANLINE_FILTER_B"}, { "rigorous-timing", 0, 0, G_OPTION_ARG_INT, &_rigorous_timing, "Use some rigorous timings instead of unrealistically generous (default 0)", "RIGOROUS_TIMING"}, + { "advanced-timing", 0, 0, G_OPTION_ARG_INT, &_advanced_timing, "Use advanced BUS-level timing (default 1)", "ADVANCED_TIMING"}, #ifndef _MSC_VER { "disable-sound", 0, 0, G_OPTION_ARG_NONE, &disable_sound, "Disables the sound emulation", NULL}, { "disable-limiter", 0, 0, G_OPTION_ARG_NONE, &disable_limiter, "Disables the 60fps limiter", NULL}, @@ -118,6 +120,7 @@ bool CommandLine::parse(int argc,char **argv) if(_num_cores != -1) CommonSettings.num_cores = _num_cores; if(_rigorous_timing) CommonSettings.rigorous_timing = true; + if(_advanced_timing != -1) CommonSettings.advanced_timing = _advanced_timing==1; //TODO MAX PRIORITY! change ARM9BIOS etc to be a std::string if(_bios_arm9) { CommonSettings.UseExtBIOS = true; strcpy(CommonSettings.ARM9BIOS,_bios_arm9); } diff --git a/desmume/src/commandline.h b/desmume/src/commandline.h index 3d9fe0350..1e777fa3b 100644 --- a/desmume/src/commandline.h +++ b/desmume/src/commandline.h @@ -87,6 +87,7 @@ private: int _spu_advanced; int _num_cores; int _rigorous_timing; + int _advanced_timing; }; #endif diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 4e641b835..0a3cdfe19 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2390,7 +2390,8 @@ int _main() CommonSettings.showGpu.main = GetPrivateProfileInt("Display", "MainGpu", 1, IniName) != 0; CommonSettings.showGpu.sub = GetPrivateProfileInt("Display", "SubGpu", 1, IniName) != 0; CommonSettings.spu_advanced = GetPrivateProfileBool("Sound", "SpuAdvanced", false, IniName); - + CommonSettings.advanced_timing = GetPrivateProfileBool("Emulation", "AdvancedTiming", true, IniName); + lostFocusPause = GetPrivateProfileBool("Focus", "BackgroundPause", false, IniName); //Get Ram-Watch values @@ -2661,7 +2662,6 @@ int _main() CommonSettings.DebugConsole = GetPrivateProfileBool("Emulation", "DebugConsole", false, IniName); CommonSettings.EnsataEmulation = GetPrivateProfileBool("Emulation", "EnsataEmulation", false, IniName); - CommonSettings.advanced_timing = GetPrivateProfileBool("Emulation", "AdvancedTiming", true, IniName); CommonSettings.UseExtBIOS = GetPrivateProfileBool("BIOS", "UseExtBIOS", false, IniName); GetPrivateProfileString("BIOS", "ARM9BIOSFile", "bios9.bin", CommonSettings.ARM9BIOS, 256, IniName); GetPrivateProfileString("BIOS", "ARM7BIOSFile", "bios7.bin", CommonSettings.ARM7BIOS, 256, IniName);