diff options
Diffstat (limited to 'gui/options.cpp')
-rw-r--r-- | gui/options.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 5c5c9ecd7c..7032d10130 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -1468,6 +1468,7 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher) _guiLanguagePopUpDesc = 0; _guiLanguagePopUp = 0; _guiLanguageUseGameLanguageCheckbox = nullptr; + _useSystemDialogsCheckbox = 0; #ifdef USE_UPDATES _updatesPopUpDesc = 0; _updatesPopUp = 0; @@ -1704,6 +1705,17 @@ void GlobalOptionsDialog::build() { #endif // USE_TRANSLATION + if (g_system->hasFeature(OSystem::kFeatureNativeFileBowserDialog)) { + _useSystemDialogsCheckbox = new CheckboxWidget(tab, "GlobalOptions_Misc.UseSystemDialogs", + _("Use native system file browser"), + _("Use the native system file browser instead of the ScummVM one to select a file or directory.") + ); + + if (ConfMan.hasKey("gui_browser_native")) { + _useSystemDialogsCheckbox->setState(ConfMan.getBool("gui_browser_native", _domain)); + } + } + #ifdef USE_UPDATES _updatesPopUpDesc = new StaticTextWidget(tab, "GlobalOptions_Misc.UpdatesPopupDesc", _("Update check:"), _("How often to check ScummVM updates")); _updatesPopUp = new PopUpWidget(tab, "GlobalOptions_Misc.UpdatesPopup"); @@ -1977,6 +1989,10 @@ void GlobalOptionsDialog::apply() { ConfMan.setBool("gui_use_game_language", guiUseGameLanguage, _domain); #endif + if (_useSystemDialogsCheckbox) { + ConfMan.setBool("gui_browser_native", _useSystemDialogsCheckbox->getState(), _domain); + } + GUI::ThemeEngine::GraphicsMode gfxMode = (GUI::ThemeEngine::GraphicsMode)_rendererPopUp->getSelectedTag(); Common::String oldGfxConfig = ConfMan.get("gui_renderer"); Common::String newGfxConfig = GUI::ThemeEngine::findModeConfigName(gfxMode); |