Skip to content

Commit

Permalink
Merge pull request #16692 from unknownbrackets/osk-confirm-btn
Browse files Browse the repository at this point in the history
Dialog: Fix confirm/cancel button reversal
  • Loading branch information
hrydgard committed Jan 1, 2023
2 parents dadde7a + 87172f9 commit 5a71db8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Core/Dialog/PSPDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ int PSPDialog::GetConfirmButton() {
if (PSP_CoreParameter().compat.flags().ForceCircleButtonConfirm) {
return CTRL_CIRCLE;
}
return g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? CTRL_CIRCLE : CTRL_CROSS;
return g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? CTRL_CROSS : CTRL_CIRCLE;
}

int PSPDialog::GetCancelButton() {
if (PSP_CoreParameter().compat.flags().ForceCircleButtonConfirm) {
return CTRL_CROSS;
}
return g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? CTRL_CROSS : CTRL_CIRCLE;
return g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? CTRL_CIRCLE : CTRL_CROSS;
}
4 changes: 2 additions & 2 deletions Core/Dialog/PSPNetconfDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ int PSPNetconfDialog::Update(int animSpeed) {

if (!hideNotice) {
const float WRAP_WIDTH = 254.0f;
const ImageID confirmBtnImage = g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? ImageID("I_CROSS") : ImageID("I_CIRCLE");
const int confirmBtn = GetConfirmButton();
const ImageID cancelBtnImage = g_Config.iButtonPreference == PSP_SYSTEMPARAM_BUTTON_CROSS ? ImageID("I_CIRCLE") : ImageID("I_CROSS");
const int cancelBtn = GetCancelButton();
const ImageID confirmBtnImage = confirmBtn == CTRL_CROSS ? ImageID("I_CROSS") : ImageID("I_CIRCLE");
const ImageID cancelBtnImage = cancelBtn == CTRL_CIRCLE ? ImageID("I_CIRCLE") : ImageID("I_CROSS");

PPGeStyle textStyle = FadedStyle(PPGeAlign::BOX_CENTER, 0.5f);
PPGeStyle buttonStyle = FadedStyle(PPGeAlign::BOX_LEFT, 0.5f);
Expand Down

0 comments on commit 5a71db8

Please sign in to comment.