Skip to content

Commit

Permalink
GUI: Allow user to opt between GUI browser and native browser
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper authored and criezy committed Dec 16, 2018
1 parent 7bff917 commit fc50499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions base/commandLine.cpp
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions gui/browser.cpp
Expand Up @@ -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
Expand Down

0 comments on commit fc50499

Please sign in to comment.