configuration: scope the Switch clock and toggle blocks for C90

The libnx overclock declaration and the Lakka Switch toggle file
handles were mid-function declarations that no Switch toolchain
flags but a pedantic C89 pass does; the third main menu list's
platform rows put such lanes through the battery for the first
time.
This commit is contained in:
libretroadmin authored and libretroadmin committed 2026-07-07 01:22:19 +02:00
1 parent 6c7861213d
commit 20a9c21ee9
1 file changed
+6 -2
+6 -2
View File
@@ -67,6 +67,7 @@
#ifdef HAVE_LAKKA_SWITCH
#include "lakka-switch.h"
}
#endif
#if defined(HAVE_LIBNX)
@@ -6660,11 +6661,14 @@ static bool config_load_file(global_t *global,
#ifdef HAVE_LIBNX
/* Apply initial clocks */
extern void libnx_apply_overclock();
libnx_apply_overclock();
{
extern void libnx_apply_overclock(void);
libnx_apply_overclock();
}
#endif
#ifdef HAVE_LAKKA_SWITCH
{
FILE* f = fopen(SWITCH_OC_TOGGLE_PATH, "w");
if (settings->bools.switch_oc)
fprintf(f, "1\n");