From 51a1bf7f0e680febfaacb102be14d4def30182ff Mon Sep 17 00:00:00 2001 From: emilyd Date: Fri, 21 Jul 2023 09:31:35 +0300 Subject: [PATCH 1/3] add warning if user is on a debug build --- source/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/main.c b/source/main.c index 95a5b22..c9d9877 100644 --- a/source/main.c +++ b/source/main.c @@ -71,6 +71,9 @@ int main(int argc, char **argv) { printheader(); 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"); ret = if_config(localip, netmask, gateway, TRUE, 20); From d9593f3fa0063f1f332aeb8aea90b9804ecf2fb6 Mon Sep 17 00:00:00 2001 From: emilyd Date: Fri, 21 Jul 2023 09:32:06 +0300 Subject: [PATCH 2/3] add noisy debug_pause variation --- source/debug.c | 8 ++++++++ source/debug.h | 1 + 2 files changed, 9 insertions(+) diff --git a/source/debug.c b/source/debug.c index 4267b1a..e90429c 100644 --- a/source/debug.c +++ b/source/debug.c @@ -1,4 +1,6 @@ // debug features for libreshop_client +#include +#include #include void debug_pause() { @@ -7,3 +9,9 @@ void debug_pause() { if (WPAD_ButtonsDown(0)) break; } } + +void debug_npause() { + printf("Press any button to continue...\n"); + VIDEO_WaitVSync(); + debug_pause(); +} diff --git a/source/debug.h b/source/debug.h index d92d22b..4ba7dba 100644 --- a/source/debug.h +++ b/source/debug.h @@ -2,5 +2,6 @@ #define DEBUG_H void debug_pause(); +void debug_npause(); #endif From 0ebd26d5612d5f3fa9b23ec9a63c7c2bb63ecd97 Mon Sep 17 00:00:00 2001 From: emilyd Date: Fri, 21 Jul 2023 09:33:58 +0300 Subject: [PATCH 3/3] add breaks to switch statement, oops... --- source/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/main.c b/source/main.c index c9d9877..cf9e66d 100644 --- a/source/main.c +++ b/source/main.c @@ -29,8 +29,10 @@ void logprint(int type, char *message) { break; case 2: printf("\x1b[34m[\x1b[31m--\x1b[34m]"); + break; case 3: printf("\x1b[31m!!\x1b[34m]"); + break; default: printf(" "); }