mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-01 14:15:16 +02:00
Changes to runtime configuration options
This commit is contained in:
parent
cce65b2994
commit
35b7ef0b3f
7 changed files with 29 additions and 7 deletions
|
@ -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<std::string>::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)
|
||||
{
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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')
|
|
@ -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
|
||||
|
|
|
@ -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(...) {}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue