diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 8e4d67ba268..f212b4828b2 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -540,6 +540,14 @@ LauncherDialog::~LauncherDialog() { delete _browser; } +void LauncherDialog::open() { + // Clear the active domain, in case we return to the dialog from a + // failure to launch a game. Otherwise, pressing ESC will attempt to + // re-launch the same game again. + ConfMan.setActiveDomain(""); + Dialog::open(); +} + void LauncherDialog::close() { // Save last selection const int sel = _list->getSelected(); diff --git a/gui/launcher.h b/gui/launcher.h index 7b456a2dbd9..a8c76f4cfeb 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -56,6 +56,7 @@ protected: void updateListing(); void updateButtons(); + void open(); void close(); virtual void addGame(); void removeGame(int item);