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)
|
if (flags & DRIVER_MIDI_MASK)
|
||||||
midi_driver_init(settings);
|
midi_driver_init(settings);
|
||||||
|
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
cpu_scaling_driver_init();
|
cpu_scaling_driver_init();
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
}
|
}
|
||||||
|
|
||||||
void driver_uninit(int flags)
|
void driver_uninit(int flags)
|
||||||
|
@ -755,9 +757,11 @@ void driver_uninit(int flags)
|
||||||
if (flags & DRIVER_MIDI_MASK)
|
if (flags & DRIVER_MIDI_MASK)
|
||||||
midi_driver_free();
|
midi_driver_free();
|
||||||
|
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
cpu_scaling_driver_free();
|
cpu_scaling_driver_free();
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
}
|
}
|
||||||
|
|
||||||
void retroarch_deinit_drivers(struct retro_callbacks *cbs)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
static int cpu_policy_mode_change(unsigned type, const char *label,
|
static int cpu_policy_mode_change(unsigned type, const char *label,
|
||||||
bool wraparound)
|
bool wraparound)
|
||||||
|
@ -792,6 +793,7 @@ static int cpu_policy_freq_tweak(unsigned type, const char *label,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
|
|
||||||
static int core_setting_left(unsigned type, const char *label,
|
static int core_setting_left(unsigned type, const char *label,
|
||||||
bool wraparound)
|
bool wraparound)
|
||||||
|
|
|
@ -6704,9 +6704,11 @@ void menu_driver_toggle(
|
||||||
|
|
||||||
if (on)
|
if (on)
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
/* If an overlay was displayed before the toggle
|
/* If an overlay was displayed before the toggle
|
||||||
* and overlays are disabled in menu, need to
|
* and overlays are disabled in menu, need to
|
||||||
|
@ -6725,9 +6727,11 @@ void menu_driver_toggle(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
/* Inhibits pointer 'select' and 'cancel' actions
|
/* Inhibits pointer 'select' and 'cancel' actions
|
||||||
* (until the next time 'select'/'cancel' are released) */
|
* (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);
|
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* #ifndef HAVE_LAKKA_SWITCH */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_TRANSLATE) && defined(HAVE_GFX_WIDGETS)
|
#if defined(HAVE_TRANSLATE) && defined(HAVE_GFX_WIDGETS)
|
||||||
|
|
Loading…
Reference in New Issue