mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Fixed an issue where the controller type setting was not saved when it should.
This commit is contained in:
parent
9fdd3bc040
commit
a07e8a28fc
|
@ -19,7 +19,6 @@
|
||||||
#include "guis/GuiMsgBox.h"
|
#include "guis/GuiMsgBox.h"
|
||||||
#include "guis/GuiScraperMenu.h"
|
#include "guis/GuiScraperMenu.h"
|
||||||
#include "guis/GuiScreensaverOptions.h"
|
#include "guis/GuiScreensaverOptions.h"
|
||||||
#include "guis/GuiSettings.h"
|
|
||||||
#include "views/gamelist/IGameListView.h"
|
#include "views/gamelist/IGameListView.h"
|
||||||
#include "views/UIModeController.h"
|
#include "views/UIModeController.h"
|
||||||
#include "views/ViewController.h"
|
#include "views/ViewController.h"
|
||||||
|
@ -827,14 +826,21 @@ void GuiMenu::openInputDeviceOptions()
|
||||||
(mWindow, "CONFIGURE KEYBOARD AND CONTROLLERS",
|
(mWindow, "CONFIGURE KEYBOARD AND CONTROLLERS",
|
||||||
Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);
|
Font::get(FONT_SIZE_MEDIUM), 0x777777FF), true);
|
||||||
configure_input_row.addElement(makeArrow(mWindow), false);
|
configure_input_row.addElement(makeArrow(mWindow), false);
|
||||||
configure_input_row.makeAcceptInputHandler(std::bind(&GuiMenu::openConfigInput, this));
|
configure_input_row.makeAcceptInputHandler(std::bind(&GuiMenu::openConfigInput, this, s));
|
||||||
s->addRow(configure_input_row);
|
s->addRow(configure_input_row);
|
||||||
|
|
||||||
mWindow->pushGui(s);
|
mWindow->pushGui(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiMenu::openConfigInput()
|
void GuiMenu::openConfigInput(GuiSettings* settings)
|
||||||
{
|
{
|
||||||
|
// Always save the settings before starting the input configuration, in case the
|
||||||
|
// controller type was changed.
|
||||||
|
settings->save();
|
||||||
|
// Also unset the save flag so that a double saving does not take place when closing
|
||||||
|
// the input device settings menu later on.
|
||||||
|
settings->setNeedsSaving(false);
|
||||||
|
|
||||||
std::string message =
|
std::string message =
|
||||||
"THE KEYBOARD AND ANY CONNECTED CONTROLLERS\n"
|
"THE KEYBOARD AND ANY CONNECTED CONTROLLERS\n"
|
||||||
"ARE AUTOMATICALLY CONFIGURED ON STARTUP, BUT\n"
|
"ARE AUTOMATICALLY CONFIGURED ON STARTUP, BUT\n"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#define ES_APP_GUIS_GUI_MENU_H
|
#define ES_APP_GUIS_GUI_MENU_H
|
||||||
|
|
||||||
#include "components/MenuComponent.h"
|
#include "components/MenuComponent.h"
|
||||||
|
#include "guis/GuiSettings.h"
|
||||||
#include "GuiComponent.h"
|
#include "GuiComponent.h"
|
||||||
|
|
||||||
class GuiMenu : public GuiComponent
|
class GuiMenu : public GuiComponent
|
||||||
|
@ -36,7 +37,7 @@ private:
|
||||||
void openScreensaverOptions();
|
void openScreensaverOptions();
|
||||||
void openSoundOptions();
|
void openSoundOptions();
|
||||||
void openInputDeviceOptions();
|
void openInputDeviceOptions();
|
||||||
void openConfigInput();
|
void openConfigInput(GuiSettings* settings);
|
||||||
void openCollectionSystemOptions();
|
void openCollectionSystemOptions();
|
||||||
void openOtherOptions();
|
void openOtherOptions();
|
||||||
void openUtilitiesMenu();
|
void openUtilitiesMenu();
|
||||||
|
|
Loading…
Reference in a new issue