From 3ad314a5ac6e2a9c12e8d423dae9b19dfc8f7355 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sat, 29 Jun 2019 17:05:43 +0200 Subject: [PATCH] Fix ntp menu (if user pressed A multiple times) --- sysmodules/rosalina/Makefile | 2 +- sysmodules/rosalina/source/menus/miscellaneous.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sysmodules/rosalina/Makefile b/sysmodules/rosalina/Makefile index f4df766..fdbec83 100644 --- a/sysmodules/rosalina/Makefile +++ b/sysmodules/rosalina/Makefile @@ -28,7 +28,7 @@ INCLUDES := include include/gdb include/menus include/redshift ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft DEFINES := -DARM11 -D_3DS -CFLAGS := -g -std=gnu11 -Wall -Wextra -Werror -O2 -mword-relocations \ +CFLAGS := -g -std=gnu11 -Wall -Wextra -Werror -Wno-unused-value -O2 -mword-relocations \ -fomit-frame-pointer -ffunction-sections -fdata-sections \ $(ARCH) $(DEFINES) diff --git a/sysmodules/rosalina/source/menus/miscellaneous.c b/sysmodules/rosalina/source/menus/miscellaneous.c index 99052fb..4cadf8b 100644 --- a/sysmodules/rosalina/source/menus/miscellaneous.c +++ b/sysmodules/rosalina/source/menus/miscellaneous.c @@ -342,7 +342,6 @@ void MiscellaneousMenu_SyncTimeDate(void) Draw_Lock(); Draw_DrawString(10, 10, COLOR_TITLE, "Miscellaneous options menu"); - //posY = Draw_DrawFormattedString(10, 30, COLOR_WHITE, "Current UTC offset: "); absOffset = utcOffset - 12; absOffset = absOffset < 0 ? -absOffset : absOffset; posY = Draw_DrawFormattedString(10, 30, COLOR_WHITE, "Current UTC offset: %c%02d", utcOffset < 12 ? '-' : '+', absOffset); @@ -386,11 +385,11 @@ void MiscellaneousMenu_SyncTimeDate(void) absOffset = absOffset < 0 ? -absOffset : absOffset; Draw_DrawFormattedString(10, 30, COLOR_WHITE, "Current UTC offset: %c%02d", utcOffset < 0 ? '-' : '+', absOffset); if (cantStart) - posY = Draw_DrawFormattedString(10, posY + 2 * SPACING_Y, COLOR_WHITE, "Can't sync time/date before the system\nhas finished loading.") + SPACING_Y; + Draw_DrawFormattedString(10, posY + 2 * SPACING_Y, COLOR_WHITE, "Can't sync time/date before the system\nhas finished loading.") + SPACING_Y; else if (R_FAILED(res)) - posY = Draw_DrawFormattedString(10, posY + 2 * SPACING_Y, COLOR_WHITE, "Operation failed (%08lx).", (u32)res) + SPACING_Y; + Draw_DrawFormattedString(10, posY + 2 * SPACING_Y, COLOR_WHITE, "Operation failed (%08lx).", (u32)res) + SPACING_Y; else - posY = Draw_DrawFormattedString(10, posY + 2 * SPACING_Y, COLOR_WHITE, "Timedate & RTC updated successfully.\nYou may need to reboot to see the changes.") + SPACING_Y; + Draw_DrawFormattedString(10, posY + 2 * SPACING_Y, COLOR_WHITE, "Timedate & RTC updated successfully.\nYou may need to reboot to see the changes.") + SPACING_Y; input = waitInput();