last minute fix: Reset the control layout when upgrading from 0.9.5.

The settings are not compatible.
This commit is contained in:
Henrik Rydgard committed 2013-12-12 14:52:46 +01:00
1 parent df793cf99f
commit e7ef34d1e6
3 files changed
+62 -46

No files matched your search

+1 -26
View File
@@ -282,32 +282,7 @@ UI::EventReturn TouchControlLayoutScreen::OnVisibility(UI::EventParams &e) {
UI::EventReturn TouchControlLayoutScreen::OnReset(UI::EventParams &e) {
ILOG("Resetting touch control layout");
float defaultScale = 1.15;
g_Config.fActionButtonScale = defaultScale;
g_Config.fActionButtonSpacing = 1.0f;
g_Config.fActionButtonCenterX = -1.0;
g_Config.fActionButtonCenterY = -1.0;
g_Config.fDpadScale = defaultScale;
g_Config.fDpadSpacing = 1.0f;
g_Config.fDpadX = -1.0;
g_Config.fDpadY = -1.0;
g_Config.fStartKeyX = -1.0;
g_Config.fStartKeyY = -1.0;
g_Config.fStartKeyScale = defaultScale;
g_Config.fSelectKeyX = -1.0;
g_Config.fSelectKeyY = -1.0;
g_Config.fSelectKeyScale = defaultScale;
g_Config.fUnthrottleKeyX = -1.0;
g_Config.fUnthrottleKeyY = -1.0;
g_Config.fUnthrottleKeyScale = defaultScale;
g_Config.fLKeyX = -1.0;
g_Config.fLKeyY = -1.0;
g_Config.fLKeyScale = defaultScale;
g_Config.fRKeyX = -1.0;
g_Config.fRKeyY = -1.0;
g_Config.fRKeyScale = defaultScale;
g_Config.fAnalogStickX = -1.0;
g_Config.fAnalogStickY = -1.0;
g_Config.fAnalogStickScale = defaultScale;
g_Config.ResetControlLayout();
InitPadLayout();
RecreateViews();
return UI::EVENT_DONE;