diff --git a/Core/Config.cpp b/Core/Config.cpp index 0b1a9b9d6c5f..4c230394f964 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -108,7 +108,7 @@ struct ConfigSetting { BoolDefaultCallback b; IntDefaultCallback i; Uint32DefaultCallback u; - Uint32DefaultCallback lu; + Uint64DefaultCallback lu; FloatDefaultCallback f; StringDefaultCallback s; TouchPosDefaultCallback touchPos; @@ -371,8 +371,6 @@ struct ConfigSetting { const char *ini2_; const char *ini3_; const char *ini4_; - const char *ini5_; - const char *ini6_; Type type_; bool report_; bool save_; diff --git a/UI/ComboKeyMappingScreen.cpp b/UI/ComboKeyMappingScreen.cpp index 3fa7aaa7af51..3fd324e8459f 100644 --- a/UI/ComboKeyMappingScreen.cpp +++ b/UI/ComboKeyMappingScreen.cpp @@ -32,15 +32,11 @@ #include "UI/ComboKeyMappingScreen.h" -class ButtonPreview : public MultiTouchButton { +class ButtonPreview : public UI::View { public: ButtonPreview(ImageID bgImg, ImageID img, float rotationIcon, bool flipShape, float rotationShape, int x, int y) - : MultiTouchButton(bgImg, bgImg, img, 1.0f, new UI::AnchorLayoutParams(x, y, UI::NONE, UI::NONE, true)), - x_(x), y_(y), rotI_(rotationIcon), bgImg_(bgImg), img_(img), flipS_(flipShape), rotS_(rotationShape) { - } - bool IsDown() override { - return false; - } + : View(new UI::AnchorLayoutParams(x, y, UI::NONE, UI::NONE, true)), bgImg_(bgImg), img_(img), rotI_(rotationIcon), + flipS_(flipShape), rotS_(rotationShape), x_(x), y_(y) {} void Draw(UIContext &dc) override { float opacity = g_Config.iTouchButtonOpacity / 100.0f; @@ -153,16 +149,12 @@ void ComboKeyScreen::CreateViews() { leftColumn->Add(new Choice(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); root__->Add(rightScroll_); - const int cellSize = 400; - UI::GridLayoutSettings gridsettings(cellSize, 64, 5); - gridsettings.fillCells = true; LinearLayout *vertLayout = new LinearLayout(ORIENT_VERTICAL); rightScroll_->Add(vertLayout); vertLayout->Add(new ItemHeader(co->T("Button Style"))); vertLayout->Add(new CheckBox(show, co->T("Visible"))); - // All icon and name are defined in GamepadEmu.h static const char *imageNames[ARRAY_SIZE(comboKeyImages)]; for (int i = 0; i < ARRAY_SIZE(imageNames); ++i) { @@ -181,8 +173,12 @@ void ComboKeyScreen::CreateViews() { vertLayout->Add(new ItemHeader(co->T("Button Binding"))); vertLayout->Add(new CheckBox(&(cfg->toggle), co->T("Toggle mode"))); - // Button name, image and action are defined in GamepadEmu.h + const int cellSize = 400; + UI::GridLayoutSettings gridsettings(cellSize, 64, 5); + gridsettings.fillCells = true; GridLayout *grid = vertLayout->Add(new GridLayout(gridsettings, new LayoutParams(FILL_PARENT, WRAP_CONTENT))); + + // Button name, image and action are defined in GamepadEmu.h for (int i = 0; i < ARRAY_SIZE(comboKeyList); ++i) { LinearLayout *row = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); row->SetSpacing(0); diff --git a/UI/ComboKeyMappingScreen.h b/UI/ComboKeyMappingScreen.h index df29f14e8b3a..aa4fd71a0644 100644 --- a/UI/ComboKeyMappingScreen.h +++ b/UI/ComboKeyMappingScreen.h @@ -34,8 +34,8 @@ class ComboKeyScreen : public UIDialogScreenWithBackground { void onFinish(DialogResult result) override; UI::EventReturn onCombo(UI::EventParams &e); private: - void saveArray(); + bool array[ARRAY_SIZE(CustomKey::comboKeyList)]; int id_; UI::ChoiceStrip *comboselect; diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index c63be8434586..5a4f84db10d5 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -30,7 +30,6 @@ #include "Core/Core.h" #include "Core/System.h" #include "Core/HLE/sceCtrl.h" -#include "Core/KeyMap.h" #include "UI/GamepadEmu.h" static u32 GetButtonColor() { @@ -741,7 +740,7 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause, EmuScreen* e g_Config.iTouchButtonStyle == 0 ? comboKeyShapes[cfg.shape].i : comboKeyShapes[cfg.shape].l, comboKeyShapes[cfg.shape].i, comboKeyImages[cfg.image].i, touch.scale, buttonLayoutParams(touch))); aux->SetAngle(comboKeyImages[cfg.image].r, comboKeyShapes[cfg.shape].r); - aux->FlipImageH(comboKeyShapes[cfg.image].f); + aux->FlipImageH(comboKeyShapes[cfg.shape].f); return aux; } return nullptr;