Tweak defaults some more (no L2 on xbox pads..). Minor code cleanup.

This commit is contained in:
Henrik Rydgård committed 2021-08-28 20:06:05 +02:00
1 parent b1481347e2
commit 58e7b6bec2
4 files changed
+14 -12

No files matched your search

+2 -2
View File
@@ -698,7 +698,7 @@ void InitPadLayout(float xres, float yres, float globalScale) {
initTouchPos(g_Config.touchCombo9, combo9_key_X, combo9_key_Y);
}
UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause, ControlMapper* controllMapper) {
UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause, bool showPauseButton, ControlMapper* controllMapper) {
using namespace UI;
AnchorLayout *root = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
@@ -756,7 +756,7 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause, ControlMappe
return nullptr;
};
if (!System_GetPropertyBool(SYSPROP_HAS_BACK_BUTTON) || g_Config.bShowTouchPause) {
if (showPauseButton) {
root->Add(new BoolButton(pause, "Pause button", roundImage, ImageID("I_ROUND"), ImageID("I_ARROW"), 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90);
}