summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-12-19 00:46:53 +1100
committer Vas Crabb <vas@vastheman.com>2022-12-19 00:46:53 +1100
commitd6fe526b288f0fd5f972fd1d054020b6642a1f0b (patch)
tree824e060803517c5ab9aa4aad116dc591335e6157
parent7732deb266a957cfc28b44111fb16cc2adeb9321 (diff)
util/options.cpp: Fixed overriden default option values from OSD.
-rw-r--r--src/lib/util/options.cpp2
-rw-r--r--src/osd/modules/lib/osdobj_common.cpp4
-rw-r--r--src/osd/sdl/sdlmain.cpp5
-rw-r--r--src/osd/windows/winmain.cpp8
4 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index 7bf64c344e4..890a48f0727 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -519,7 +519,7 @@ bool core_options::simple_entry::internal_copy_value(const entry &that)
void core_options::simple_entry::set_default_value(std::string &&newvalue)
{
m_data = m_defdata = type_specific_substitutions(newvalue);
- m_data_unsubst = std::move(newvalue);
+ m_data_unsubst = m_defdata_unsubst = std::move(newvalue);
}
diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp
index 5b3cebb84b9..6d6a865a9c7 100644
--- a/src/osd/modules/lib/osdobj_common.cpp
+++ b/src/osd/modules/lib/osdobj_common.cpp
@@ -164,13 +164,13 @@ const options_entry osd_options::s_option_entries[] =
#endif
{ nullptr, nullptr, core_options::option_type::HEADER, "BGFX POST-PROCESSING OPTIONS" },
- { OSDOPTION_BGFX_PATH, "bgfx", core_options::option_type::PATH, "path to BGFX-related files" },
+ { OSDOPTION_BGFX_PATH, "bgfx", core_options::option_type::PATH, "path to BGFX-related files" },
{ OSDOPTION_BGFX_BACKEND, "auto", core_options::option_type::STRING, "BGFX backend to use (d3d9, d3d11, d3d12, metal, opengl, gles, vulkan)" },
{ OSDOPTION_BGFX_DEBUG, "0", core_options::option_type::BOOLEAN, "enable BGFX debugging statistics" },
{ OSDOPTION_BGFX_SCREEN_CHAINS, "default", core_options::option_type::STRING, "comma-delimited list of screen chain JSON names, colon-delimited per-window" },
{ OSDOPTION_BGFX_SHADOW_MASK, "slot-mask.png", core_options::option_type::STRING, "shadow mask texture name" },
{ OSDOPTION_BGFX_LUT, "lut-default.png", core_options::option_type::STRING, "LUT texture name" },
- { OSDOPTION_BGFX_AVI_NAME, OSDOPTVAL_AUTO, core_options::option_type::PATH, "filename for BGFX output logging" },
+ { OSDOPTION_BGFX_AVI_NAME, OSDOPTVAL_AUTO, core_options::option_type::PATH, "filename for BGFX output logging" },
// End of list
{ nullptr }
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index 241e7f46148..7e4d23a7284 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -135,15 +135,14 @@ const options_entry sdl_options::s_option_entries[] =
// sdl_options
//============================================================
-sdl_options::sdl_options()
-: osd_options()
+sdl_options::sdl_options() : osd_options()
{
#if defined (SDLMAME_ANDROID)
chdir (SDL_AndroidGetExternalStoragePath());
#endif
std::string ini_path(INI_PATH);
add_entries(sdl_options::s_option_entries);
- strreplace(ini_path,"APP_NAME", emulator_info::get_appname_lower());
+ strreplace(ini_path, "APP_NAME", emulator_info::get_appname_lower());
set_default_value(SDLOPTION_INIPATH, std::move(ini_path));
}
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp
index 293074b3ec8..91c78be5b20 100644
--- a/src/osd/windows/winmain.cpp
+++ b/src/osd/windows/winmain.cpp
@@ -176,10 +176,10 @@ const options_entry windows_options::s_option_entries[] =
// post-processing options
{ nullptr, nullptr, core_options::option_type::HEADER, "DIRECT3D POST-PROCESSING OPTIONS" },
- { WINOPTION_HLSLPATH, "hlsl", core_options::option_type::PATH, "path to HLSL support files" },
+ { WINOPTION_HLSLPATH, "hlsl", core_options::option_type::PATH, "path to HLSL support files" },
{ WINOPTION_HLSL_ENABLE";hlsl", "0", core_options::option_type::BOOLEAN, "enable HLSL post-processing (PS3.0 required)" },
{ WINOPTION_HLSL_OVERSAMPLING, "0", core_options::option_type::BOOLEAN, "enable HLSL oversampling" },
- { WINOPTION_HLSL_WRITE, OSDOPTVAL_AUTO, core_options::option_type::PATH, "enable HLSL AVI writing (huge disk bandwidth suggested)" },
+ { WINOPTION_HLSL_WRITE, OSDOPTVAL_AUTO, core_options::option_type::PATH, "enable HLSL AVI writing (huge disk bandwidth suggested)" },
{ WINOPTION_HLSL_SNAP_WIDTH, "2048", core_options::option_type::STRING, "HLSL upscaled-snapshot width" },
{ WINOPTION_HLSL_SNAP_HEIGHT, "1536", core_options::option_type::STRING, "HLSL upscaled-snapshot height" },
{ WINOPTION_SHADOW_MASK_TILE_MODE, "0", core_options::option_type::INTEGER, "shadow mask tile mode (0 for screen based, 1 for source based)" },
@@ -262,9 +262,9 @@ const options_entry windows_options::s_option_entries[] =
{ WINOPTION_BLOOM_LEVEL6_WEIGHT, "0.04", core_options::option_type::FLOAT, "bloom level 6 weight (1/4 smaller that level 5 target)" },
{ WINOPTION_BLOOM_LEVEL7_WEIGHT, "0.02", core_options::option_type::FLOAT, "bloom level 7 weight (1/4 smaller that level 6 target)" },
{ WINOPTION_BLOOM_LEVEL8_WEIGHT, "0.01", core_options::option_type::FLOAT, "bloom level 8 weight (1/4 smaller that level 7 target)" },
- { WINOPTION_LUT_TEXTURE, "lut-default.png", core_options::option_type::PATH, "3D LUT texture filename for screen, PNG format" },
+ { WINOPTION_LUT_TEXTURE, "lut-default.png", core_options::option_type::PATH, "3D LUT texture filename for screen, PNG format" },
{ WINOPTION_LUT_ENABLE, "0", core_options::option_type::BOOLEAN, "Enables 3D LUT to be applied to screen after post-processing" },
- { WINOPTION_UI_LUT_TEXTURE, "lut-default.png", core_options::option_type::PATH, "3D LUT texture filename of UI, PNG format" },
+ { WINOPTION_UI_LUT_TEXTURE, "lut-default.png", core_options::option_type::PATH, "3D LUT texture filename of UI, PNG format" },
{ WINOPTION_UI_LUT_ENABLE, "0", core_options::option_type::BOOLEAN, "enable 3D LUT to be applied to UI and artwork after post-processing" },
// full screen options