diff --git a/include/arm11/menu/menu_func.h b/include/arm11/menu/menu_func.h index 097c983..c206a8f 100644 --- a/include/arm11/menu/menu_func.h +++ b/include/arm11/menu/menu_func.h @@ -28,6 +28,8 @@ #define DEVICE_BUFSIZE (((REG_CFG11_SOCINFO & 2) ? 1024 : 512) * 1024) // 1024 / 512 KiB #define PROGRESS_WIDTH 20 #define SPLASH_DEFAULT_MSEC 1000 +#define SPLASH_MIN_MSEC 500 +#define SPLASH_MAX_MSEC 10000 #define VBLANK_APPROX_MSEC 16 diff --git a/source/arm11/main.c b/source/arm11/main.c index 80a0738..09e893d 100644 --- a/source/arm11/main.c +++ b/source/arm11/main.c @@ -182,7 +182,7 @@ { // prevent bad splash delays s32 dkey = *(s32*) configGetData(KSplashDuration); - dmsec = (dkey < 500) ? 500 : (dkey) > 10000 ? 10000 : (u32) dkey; + dmsec = (dkey < SPLASH_MIN_MSEC) ? SPLASH_MIN_MSEC : (dkey) > SPLASH_MAX_MSEC ? SPLASH_MAX_MSEC : (u32) dkey; } // convert msecs to vblanks and wait for the specified amount diff --git a/source/arm11/menu/menu_func.c b/source/arm11/menu/menu_func.c index 5b3bb31..ef969eb 100644 --- a/source/arm11/menu/menu_func.c +++ b/source/arm11/menu/menu_func.c @@ -336,8 +336,8 @@ u32 kHeld = 0; // make sure duration stays within boundaries - if (duration < 500) duration = 500; - else if (duration > 10000) duration = 10000; + if (duration < SPLASH_MIN_MSEC) duration = SPLASH_MIN_MSEC; + else if (duration > SPLASH_MAX_MSEC) duration = SPLASH_MAX_MSEC; // update screen ee_printf_screen_center("Change splash duration via arrow keys.\nPress [A] to confirm, [B] or HOME] to cancel.\n \nSplash duration: %li msec", duration);