Compare commits

..

3 Commits

Author SHA1 Message Date
0ebd26d561 add breaks to switch statement, oops... 2023-07-21 09:33:58 +03:00
d9593f3fa0 add noisy debug_pause variation 2023-07-21 09:32:06 +03:00
51a1bf7f0e add warning if user is on a debug build 2023-07-21 09:31:35 +03:00
3 changed files with 14 additions and 0 deletions

View File

@ -1,4 +1,6 @@
// debug features for libreshop_client // debug features for libreshop_client
#include <stdio.h>
#include <gccore.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
void debug_pause() { void debug_pause() {
@ -7,3 +9,9 @@ void debug_pause() {
if (WPAD_ButtonsDown(0)) break; if (WPAD_ButtonsDown(0)) break;
} }
} }
void debug_npause() {
printf("Press any button to continue...\n");
VIDEO_WaitVSync();
debug_pause();
}

View File

@ -2,5 +2,6 @@
#define DEBUG_H #define DEBUG_H
void debug_pause(); void debug_pause();
void debug_npause();
#endif #endif

View File

@ -29,8 +29,10 @@ void logprint(int type, char *message) {
break; break;
case 2: case 2:
printf("\x1b[34m[\x1b[31m--\x1b[34m]"); printf("\x1b[34m[\x1b[31m--\x1b[34m]");
break;
case 3: case 3:
printf("\x1b[31m!!\x1b[34m]"); printf("\x1b[31m!!\x1b[34m]");
break;
default: default:
printf(" "); printf(" ");
} }
@ -71,6 +73,9 @@ int main(int argc, char **argv) {
printheader(); printheader();
logprint(0, "Welcome to LibreShop!\n"); logprint(0, "Welcome to LibreShop!\n");
#ifdef DEBUG_H
logprint(2, "Warning! You are running a DEBUG build.\n");
#endif
logprint(0, "Initializing network.\n"); logprint(0, "Initializing network.\n");
ret = if_config(localip, netmask, gateway, TRUE, 20); ret = if_config(localip, netmask, gateway, TRUE, 20);