GUI: Allow user to opt between GUI browser and native browser

This commit is contained in:
SupSuper 2018-11-22 16:26:04 +00:00 committed by Thierry Crozat
parent 7bff9176d5
commit fc504996d3
2 changed files with 6 additions and 3 deletions

View file

@ -284,6 +284,7 @@ void registerDefaults() {
ConfMan.registerDefault("gui_saveload_last_pos", "0");
ConfMan.registerDefault("gui_browser_show_hidden", false);
ConfMan.registerDefault("gui_browser_native", true);
ConfMan.registerDefault("game", "");
#ifdef USE_FLUIDSYNTH

View file

@ -88,9 +88,11 @@ int BrowserDialog::runModal() {
// Try to use the backend browser
Common::DialogManager *dialogManager = g_system->getDialogManager();
if (dialogManager) {
Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title, _choice, _isDirBrowser);
if (result != Common::DialogManager::kDialogError) {
return result;
if (ConfMan.getBool("gui_browser_native", Common::ConfigManager::kApplicationDomain)) {
Common::DialogManager::DialogResult result = dialogManager->showFileBrowser(_title, _choice, _isDirBrowser);
if (result != Common::DialogManager::kDialogError) {
return result;
}
}
}
#endif