mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Lakka/Nintendo Switch: disable cpu scaling for Nintendo Switch
Lakka on Nintendo Switch uses own cpu governor.
Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-04-cpufreq-wip-disable-on-switch.patch
This commit is contained in:
parent
be92517b16
commit
a60df14d81
4
driver.c
4
driver.c
@ -668,9 +668,11 @@ void drivers_init(
|
||||
if (flags & DRIVER_MIDI_MASK)
|
||||
midi_driver_init(settings);
|
||||
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
cpu_scaling_driver_init();
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
}
|
||||
|
||||
void driver_uninit(int flags)
|
||||
@ -755,9 +757,11 @@ void driver_uninit(int flags)
|
||||
if (flags & DRIVER_MIDI_MASK)
|
||||
midi_driver_free();
|
||||
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
cpu_scaling_driver_free();
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
}
|
||||
|
||||
void retroarch_deinit_drivers(struct retro_callbacks *cbs)
|
||||
|
@ -678,6 +678,7 @@ static int manual_content_scan_core_name_left(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
static int cpu_policy_mode_change(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -792,6 +793,7 @@ static int cpu_policy_freq_tweak(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
|
||||
static int core_setting_left(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
|
@ -6704,9 +6704,11 @@ void menu_driver_toggle(
|
||||
|
||||
if (on)
|
||||
{
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
#ifdef HAVE_OVERLAY
|
||||
/* If an overlay was displayed before the toggle
|
||||
* and overlays are disabled in menu, need to
|
||||
@ -6725,9 +6727,11 @@ void menu_driver_toggle(
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
#ifdef HAVE_OVERLAY
|
||||
/* Inhibits pointer 'select' and 'cancel' actions
|
||||
* (until the next time 'select'/'cancel' are released) */
|
||||
|
@ -3626,15 +3626,19 @@ static void runloop_pause_checks(void)
|
||||
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef HAVE_LAKKA_SWITCH
|
||||
#ifdef HAVE_LAKKA
|
||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
||||
#endif
|
||||
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||
}
|
||||
|
||||
#if defined(HAVE_TRANSLATE) && defined(HAVE_GFX_WIDGETS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user