diff --git a/src/System.h b/src/System.h index 9e431228..9c1b384a 100644 --- a/src/System.h +++ b/src/System.h @@ -85,7 +85,6 @@ extern int systemVerbose; extern int systemFrameSkip; extern int systemSaveUpdateCounter; extern int systemSpeed; -extern int systemThrottle; #define SYSTEM_SAVE_UPDATED 30 #define SYSTEM_SAVE_NOT_UPDATED 0 diff --git a/src/gtk/system.cpp b/src/gtk/system.cpp index 5b4cb228..4f948631 100644 --- a/src/gtk/system.cpp +++ b/src/gtk/system.cpp @@ -35,7 +35,6 @@ int systemFrameSkip; u32 systemColorMap32[0x10000]; u16 systemColorMap16[0x10000]; u16 systemGbPalette[24]; -int systemThrottle = 0; int emulating; int RGB_LOW_BITS_MASK; diff --git a/src/sdl/SDL.cpp b/src/sdl/SDL.cpp index 6717f253..bcacf97d 100644 --- a/src/sdl/SDL.cpp +++ b/src/sdl/SDL.cpp @@ -116,7 +116,6 @@ int systemDebug = 0; int systemVerbose = 0; int systemFrameSkip = 0; int systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED; -int systemThrottle = 0; int srcPitch = 0; int srcWidth = 0; @@ -271,7 +270,6 @@ struct option sdlOptions[] = { { "no-pause-when-inactive", no_argument, &pauseWhenInactive, 0 }, { "no-rtc", no_argument, &sdlRtcEnable, 0 }, { "no-show-speed", no_argument, &showSpeed, 0 }, - { "no-throttle", no_argument, &systemThrottle, 0 }, { "opengl", required_argument, 0, 'O' }, { "opengl-nearest", no_argument, &openGL, 1 }, { "opengl-bilinear", no_argument, &openGL, 2 }, @@ -779,10 +777,6 @@ void sdlReadPreferences(FILE *f) showSpeedTransparent = sdlFromHex(value); } else if(!strcmp(key, "autoFrameSkip")) { autoFrameSkip = sdlFromHex(value); - } else if(!strcmp(key, "throttle")) { - systemThrottle = sdlFromHex(value); - if(systemThrottle != 0 && (systemThrottle < 5 || systemThrottle > 1000)) - systemThrottle = 0; } else if(!strcmp(key, "pauseWhenInactive")) { pauseWhenInactive = sdlFromHex(value) ? true : false; } else if(!strcmp(key, "agbPrint")) { @@ -2044,14 +2038,6 @@ int main(int argc, char **argv) cpuSaveType = a; } break; - case 'T': - if(optarg) { - int t = atoi(optarg); - if(t < 5 || t > 1000) - t = 0; - systemThrottle = t; - } - break; case 'v': if(optarg) { systemVerbose = atoi(optarg); @@ -2529,7 +2515,7 @@ void systemFrame() void system10Frames(int rate) { u32 time = systemGetClock(); - if(!wasPaused && autoFrameSkip && !systemThrottle) { + if(!wasPaused && autoFrameSkip) { u32 diff = time - autoFrameSkipLastTime; int speed = 100; @@ -2557,19 +2543,6 @@ void system10Frames(int rate) } } } - if(!wasPaused && systemThrottle) { - if(!speedup) { - u32 diff = time - throttleLastTime; - - int target = (1000000/(rate*systemThrottle)); - int d = (target - diff); - - if(d > 0) { - SDL_Delay(d); - } - } - throttleLastTime = systemGetClock(); - } if(rewindMemory) { if(++rewindCounter >= rewindTimer) { rewindSaveNeeded = true;