diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index a77a0e71..26b48fc1 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -490,6 +490,8 @@ static void runRMXPScripts(BacktraceData &btData) rb_ary_store(script, 3, rb_str_new_cstr(decodeBuffer.c_str())); } + // Can be force-disabled similarly to framerate options +#ifndef NO_PRELOAD_SCRIPTS /* Execute preloaded scripts */ for (std::set::iterator i = conf.preloadScripts.begin(); i != conf.preloadScripts.end(); ++i) @@ -498,6 +500,7 @@ static void runRMXPScripts(BacktraceData &btData) VALUE exc = rb_gv_get("$!"); if (exc != Qnil) return; +#endif while (true) { diff --git a/binding/meson.build b/binding/meson.build index e1bee5ef..3fcc54a7 100644 --- a/binding/meson.build +++ b/binding/meson.build @@ -9,6 +9,10 @@ else add_project_arguments('-DOLD_RUBY', language: 'cpp') endif +if get_option('no_preload_scripts') == true + add_project_arguments('-DNO_PRELOAD_SCRIPTS', language: 'cpp') +endif + binding_headers = files( 'binding-util.h', 'binding-types.h', diff --git a/meson_options.txt b/meson_options.txt index eede24f1..147bff86 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,9 @@ option('shared_fluid', type: 'boolean', value: false, description: 'Dynamically link fluidsynth at build time') option('mri_version', type: 'string', value: '1.8', description: 'Version of MRI to link with') -option('workdir_current', type: 'boolean', value: false, description: 'Keep current directory on startup') -option('ruby_lib', type: 'string', value: 'ruby', description: 'Name of legacy Ruby library') -option('console', type: 'boolean', value: false, description: 'Whether to debug information in the console') +option('workdir_current', type: 'boolean', value: true, description: 'Keep current directory on startup') +option('ruby_lib', type: 'string', value: 'ruby', description: 'Name of the Ruby library') +option('console', type: 'boolean', value: true, description: 'Whether to debug information in the console') option('use_fakeapi', type: 'boolean', value: false, description: 'Attempt to repair Win32API calls that do not work with MKXP') +option('default_framerate', type: 'boolean', value: false, description: 'Disable syncToRefreshrate and fixedFramerate configuration options') +option('no_preload_scripts', type: 'boolean', value: false, description: 'Disable the preloadScript configuration option') \ No newline at end of file diff --git a/mkxp.conf.sample b/mkxp.conf.sample index 2b57ccf6..ddd87dec 100644 --- a/mkxp.conf.sample +++ b/mkxp.conf.sample @@ -93,6 +93,7 @@ # Enforce a static frame rate +# This option may be force-disabled at build time. # (0 = disabled) # # fixedFramerate=0 @@ -109,7 +110,8 @@ # "fixedFramerate" because the actual frame rate is # reported back to the game, ensuring correct timers. # If the screen refresh rate cannot be determined, -# this option is force-disabled +# this option is force-disabled. +# This option may be force-disabled at build time. # (default: disabled) # # syncToRefreshrate=false @@ -203,6 +205,7 @@ # Define raw scripts to be executed before the # actual Scripts.rxdata execution starts +# This option may be force-disabled at build time. # (default: none) # # preloadScript=my_win32_wrapper.rb @@ -226,9 +229,9 @@ # Use the script's name as filename in warnings and error messages -# (default: disabled) +# (default: enabled) # -# useScriptNames=false +# useScriptNames=true # Font substitutions allow drop-in replacements of fonts diff --git a/src/config.cpp b/src/config.cpp index 3e2a5bc8..ed259204 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -185,7 +185,7 @@ void Config::read(int argc, char *argv[]) PO_DESC(SE.sourceCount, int, 6) \ PO_DESC(customScript, std::string, "") \ PO_DESC(pathCache, bool, true) \ - PO_DESC(useScriptNames, bool, false) + PO_DESC(useScriptNames, bool, true) // Not gonna take your shit boost #define GUARD_ALL( exp ) try { exp } catch(...) {} diff --git a/src/graphics.cpp b/src/graphics.cpp index 71dca501..e9db4b62 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -635,6 +635,11 @@ Graphics::Graphics(RGSSThreadData *data) { p = new GraphicsPrivate(data); + // To appease people who don't want players to have + // emulator-like speedups + // Nothing stops anybody from building with this + // enabled though and I'm not removing this stuff +#ifndef DEFAULT_FRAMERATE if (data->config.syncToRefreshrate) { p->frameRate = data->refreshRate; @@ -648,6 +653,7 @@ Graphics::Graphics(RGSSThreadData *data) { p->fpsLimiter.disabled = true; } +#endif } Graphics::~Graphics() diff --git a/src/meson.build b/src/meson.build index 3c62f273..a90e2284 100644 --- a/src/meson.build +++ b/src/meson.build @@ -29,6 +29,10 @@ if get_option('shared_fluid') == true main_dependencies += fluidsynth endif +if get_option('default_framerate') == true + add_project_arguments('-DDEFAULT_FRAMERATE', language: 'cpp') +endif + main_headers = files( 'quadarray.h', 'audio.h',