From bcf79ce5cba7036d5d5fc15fd11e1b2571c86010 Mon Sep 17 00:00:00 2001 From: Xpl0itU Date: Thu, 17 Mar 2022 16:24:36 +0100 Subject: [PATCH] Fix cancel on menus --- meta/meta.xml | 2 +- src/main.cpp | 12 ++++++------ src/savemng.cpp | 12 ++++++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/meta/meta.xml b/meta/meta.xml index 23f3128..d637839 100644 --- a/meta/meta.xml +++ b/meta/meta.xml @@ -2,7 +2,7 @@ SaveMii WUT DaThinkingChair - 1.3.6 + 1.3.7 20220306000000 WiiU/vWii Save Manager WiiU/vWii Save Manager diff --git a/src/main.cpp b/src/main.cpp index c85391e..fd942a7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,18 +6,18 @@ #include "string.hpp" extern "C" { -#include "main.h" -#include "wiiu.h" -#include "savemng.h" -#include "log_freetype.h" -#include "icon.h" + #include "main.h" + #include "wiiu.h" + #include "savemng.h" + #include "log_freetype.h" + #include "icon.h" } using namespace std; #define VERSION_MAJOR 1 #define VERSION_MINOR 3 -#define VERSION_MICRO 6 +#define VERSION_MICRO 7 #define M_OFF 1 u8 slot = 0; diff --git a/src/savemng.cpp b/src/savemng.cpp index 3832884..1277500 100644 --- a/src/savemng.cpp +++ b/src/savemng.cpp @@ -238,8 +238,8 @@ void console_print_pos_va(int x, int y, const char* format, va_list va) { // Sou bool promptConfirm(Style st, const char* question) { clearBuffers(); WHBLogFreetypeDraw(); - const char* msg1 = "(A) Yes - (B) No"; - const char* msg2 = "(A) Confirm - (B) Cancel"; + const char* msg1 = "\ue000 Yes - \ue001 No"; + const char* msg2 = "\ue000 Confirm - \ue001 Cancel"; const char* msg; switch(st & 0x0F) { case ST_YES_NO: msg = msg1; break; @@ -262,6 +262,7 @@ bool promptConfirm(Style st, const char* question) { console_print_pos(31 - (ttfStringWidth((char*)question, 0) / 24), 7, question); console_print_pos(31 - (ttfStringWidth((char*)msg, -1) / 24), 9, msg); } + int ret = 0; flipBuffers(); WHBLogFreetypeDraw(); sleep(0.2); @@ -278,12 +279,15 @@ bool promptConfirm(Style st, const char* question) { kpad_status = kpad[i]; } if ((vpad_status.trigger & (VPAD_BUTTON_A)) | (kpad_status.trigger & (WPAD_BUTTON_A)) | (kpad_status.classic.trigger & (WPAD_CLASSIC_BUTTON_A)) | (kpad_status.pro.trigger & (WPAD_PRO_BUTTON_A))) { - return 1; + ret = 1; + break; } if((vpad_status.trigger & (VPAD_BUTTON_B)) | (kpad_status.trigger & (WPAD_BUTTON_B)) | (kpad_status.classic.trigger & (WPAD_CLASSIC_BUTTON_B)) | (kpad_status.pro.trigger & (WPAD_PRO_BUTTON_B))) { - return 0; + ret = 0; + break; } } + return ret; } void promptError(const char* message, ...) {