diff --git a/desmume/src/commandline.cpp b/desmume/src/commandline.cpp index cfe87f775..2404c45c7 100644 --- a/desmume/src/commandline.cpp +++ b/desmume/src/commandline.cpp @@ -80,6 +80,7 @@ CommandLine::CommandLine() , disable_sound(0) , disable_limiter(0) , windowed_fullscreen(0) +, frameskip(0) , _rtc_day(-1) , _rtc_hour(-1) { @@ -128,6 +129,7 @@ static const char* help_string = \ " --disable-limiter Disables the 60fps limiter" ENDL " --rtc-day D Override RTC day, 0=Sunday, 6=Saturday" ENDL " --rtc-hour H Override RTC hour, 0=midnight, 23=an hour before" ENDL +" --frameskip N Set frameskip to N; default 0" ENDL ENDL "Arguments affecting overall emulation parameters (`sync settings`): " ENDL #ifdef HAVE_JIT @@ -195,6 +197,7 @@ ENDL #define OPT_3D_RENDER 3 #define OPT_3D_TEXTURE_UPSCALE 81 #define OPT_GPU_RESOLUTION_MULTIPLIER 82 +#define OPT_FRAMESKIP 83 #define OPT_JIT_SIZE 100 #define OPT_CONSOLE_TYPE 200 @@ -259,6 +262,7 @@ bool CommandLine::parse(int argc,char **argv) #else { "nojoy", no_argument, &_commandline_linux_nojoy, 1}, #endif + { "frameskip", required_argument, NULL, OPT_FRAMESKIP}, { "disable-sound", no_argument, &disable_sound, 1}, { "disable-limiter", no_argument, &disable_limiter, 1}, { "rtc-day", required_argument, NULL, OPT_RTC_DAY}, @@ -335,6 +339,7 @@ bool CommandLine::parse(int argc,char **argv) case OPT_3D_RENDER: _render3d = optarg; break; case OPT_3D_TEXTURE_UPSCALE: texture_upscale = atoi(optarg); break; case OPT_GPU_RESOLUTION_MULTIPLIER: gpu_resolution_multiplier = atoi(optarg); break; + case OPT_FRAMESKIP: frameskip = atoi(optarg); break; //RTC settings case OPT_RTC_DAY: _rtc_day = atoi(optarg); break; diff --git a/desmume/src/commandline.h b/desmume/src/commandline.h index 467a69b05..4f87f8a6e 100644 --- a/desmume/src/commandline.h +++ b/desmume/src/commandline.h @@ -65,6 +65,7 @@ public: int disable_sound; int disable_limiter; int windowed_fullscreen; + int frameskip; bool parse(int argc,char **argv); diff --git a/desmume/src/frontend/posix/cli/main.cpp b/desmume/src/frontend/posix/cli/main.cpp index 7cd53ba1c..ed29aa072 100644 --- a/desmume/src/frontend/posix/cli/main.cpp +++ b/desmume/src/frontend/posix/cli/main.cpp @@ -136,7 +136,6 @@ class configured_features : public CommandLine { public: int auto_pause; - int frameskip; int engine_3d; int savetype; @@ -148,7 +147,6 @@ static void init_config( class configured_features *config) { config->auto_pause = 0; - config->frameskip = 0; config->engine_3d = 1; config->savetype = 0; @@ -163,7 +161,6 @@ fill_config( class configured_features *config, int argc, char ** argv) { GOptionEntry options[] = { { "auto-pause", 0, 0, G_OPTION_ARG_NONE, &config->auto_pause, "Pause emulation if focus is lost", NULL}, - { "frameskip", 0, 0, G_OPTION_ARG_INT, &config->frameskip, "Set frameskip", "FRAMESKIP"}, { "3d-engine", 0, 0, G_OPTION_ARG_INT, &config->engine_3d, "Select 3d rendering engine. Available engines:\n" "\t\t\t\t\t\t 0 = 3d disabled\n" "\t\t\t\t\t\t 1 = internal rasterizer (default)\n"