Skip to content

Commit

Permalink
Fix cancel on menus
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpl0itU committed Mar 17, 2022
1 parent 83296bd commit bcf79ce
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion meta/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<app version="1">
<name>SaveMii WUT</name>
<coder>DaThinkingChair</coder>
<version>1.3.6</version>
<version>1.3.7</version>
<release_date>20220306000000</release_date>
<short_description>WiiU/vWii Save Manager</short_description>
<long_description>WiiU/vWii Save Manager
Expand Down
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 8 additions & 4 deletions src/savemng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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, ...) {
Expand Down

0 comments on commit bcf79ce

Please sign in to comment.