diff --git a/config.def.h b/config.def.h
index 6d70979883a..2d87abc0709 100644
--- a/config.def.h
+++ b/config.def.h
@@ -177,6 +177,12 @@
#define DEFAULT_GAMEMODE_ENABLE true
+#ifdef HAVE_LAKKA_SWITCH
+#define DEFAULT_SWITCH_OC false
+#define DEFAULT_SWITCH_CEC true
+#define DEFAULT_BLUETOOTH_ERTM false
+#endif
+
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
#define DEFAULT_MOUSE_ENABLE true
#else
diff --git a/configuration.c b/configuration.c
index ba157e34dac..43d6a145d0b 100644
--- a/configuration.c
+++ b/configuration.c
@@ -61,7 +61,11 @@
#include "lakka.h"
-#if defined(HAVE_LAKKA) || defined(HAVE_LIBNX)
+#ifdef HAVE_LAKKA_SWITCH
+#include "lakka-switch.h"
+#endif
+
+#if defined(HAVE_LIBNX)
#include "switch_performance_profiles.h"
#endif
@@ -1748,8 +1752,14 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, true, DEFAULT_AI_SERVICE_ENABLE, false);
SETTING_BOOL("ai_service_pause", &settings->bools.ai_service_pause, true, DEFAULT_AI_SERVICE_PAUSE, false);
SETTING_BOOL("wifi_enabled", &settings->bools.wifi_enabled, true, DEFAULT_WIFI_ENABLE, false);
+#ifndef HAVE_LAKKA
SETTING_BOOL("gamemode_enable", &settings->bools.gamemode_enable, true, DEFAULT_GAMEMODE_ENABLE, false);
-
+#endif
+#ifdef HAVE_LAKKA_SWITCH
+ SETTING_BOOL("switch_oc", &settings->bools.switch_oc, true, DEFAULT_SWITCH_OC, false);
+ SETTING_BOOL("switch_cec", &settings->bools.switch_cec, true, DEFAULT_SWITCH_CEC, false);
+ SETTING_BOOL("bluetooth_ertm_disable", &settings->bools.bluetooth_ertm_disable, true, DEFAULT_BLUETOOTH_ERTM, false);
+#endif
SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, DEFAULT_AUDIO_ENABLE, false);
SETTING_BOOL("audio_sync", &settings->bools.audio_sync, true, DEFAULT_AUDIO_SYNC, false);
SETTING_BOOL("audio_rate_control", &settings->bools.audio_rate_control, true, DEFAULT_RATE_CONTROL, false);
@@ -4068,6 +4078,32 @@ static bool config_load_file(global_t *global,
libnx_apply_overclock();
#endif
+#ifdef HAVE_LAKKA_SWITCH
+ FILE* f = fopen(SWITCH_OC_TOGGLE_PATH, "w");
+ if (settings->bools.switch_oc == true) {
+ fprintf(f, "1\n");
+ } else {
+ fprintf(f, "0\n");
+ }
+ fclose(f);
+ if (settings->bools.switch_cec == true) {
+ FILE* f = fopen(SWITCH_CEC_TOGGLE_PATH, "w");
+ fprintf(f, "\n");
+ fclose(f);
+ } else {
+ filestream_delete(SWITCH_CEC_TOGGLE_PATH);
+ }
+ if (settings->bools.bluetooth_ertm_disable == true) {
+ FILE* f = fopen(BLUETOOTH_ERTM_TOGGLE_PATH, "w");
+ fprintf(f, "1\n");
+ fclose(f);
+ } else {
+ FILE* f = fopen(BLUETOOTH_ERTM_TOGGLE_PATH, "w");
+ fprintf(f, "0\n");
+ fclose(f);
+ }
+#endif
+
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
recording_driver_update_streaming_url();
diff --git a/configuration.h b/configuration.h
index 899883ba041..b951533465f 100644
--- a/configuration.h
+++ b/configuration.h
@@ -973,6 +973,11 @@ typedef struct settings
bool screenshots_in_content_dir;
bool systemfiles_in_content_dir;
bool ssh_enable;
+#ifdef HAVE_LAKKA_SWITCH
+ bool switch_oc;
+ bool switch_cec;
+ bool bluetooth_ertm_disable;
+#endif
bool samba_enable;
bool bluetooth_enable;
bool localap_enable;
diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c
index 90377193eda..59bfcb4c7fd 100644
--- a/frontend/drivers/platform_unix.c
+++ b/frontend/drivers/platform_unix.c
@@ -796,6 +796,23 @@ static void check_proc_acpi_sysfs_battery(const char *node,
}
}
+ fill_pathname_join_special(path, basenode, "type", sizeof(path));
+
+ if (!filestream_exists(path))
+ goto status;
+
+ if (filestream_read_file(path, (void**)&buf, &length) != 1)
+ goto status;
+
+ if (buf)
+ {
+ if (strstr((char*)buf, "Battery"))
+ *have_battery = true;
+ free(buf);
+ buf = NULL;
+ }
+
+status:
fill_pathname_join_special(path, basenode, "status", sizeof(path));
if (!filestream_exists(path))
diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h
index 2601ec0b41e..fd11835b5cf 100644
--- a/intl/msg_hash_ar.h
+++ b/intl/msg_hash_ar.h
@@ -9530,18 +9530,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"زيادة أو تقليل سطوع الشاشة."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU فوق الساعة"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "تبديل GPU على مدار الساعة أو تحت الساعة."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"تجاوز الساعة المعالج"
@@ -9637,6 +9626,8 @@ MSG_HASH(
"ملف تكوين خاطئ - تعذر العثور على APNAME أو PASSWORD في %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_ast.h b/intl/msg_hash_ast.h
index 77bafe83e15..f6afa31d10b 100644
--- a/intl/msg_hash_ast.h
+++ b/intl/msg_hash_ast.h
@@ -3766,10 +3766,7 @@ MSG_HASH(
MSG_READ_ONLY,
"Estáu del almacenamientu internu: namás llectura"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -3805,6 +3802,8 @@ MSG_HASH(
"El ficheru de configuración ye incorreutu - nun se pudo atopar APNAME o PASSWORD en %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_ca.h b/intl/msg_hash_ca.h
index 4184ad3e416..d88439795bb 100644
--- a/intl/msg_hash_ca.h
+++ b/intl/msg_hash_ca.h
@@ -8138,18 +8138,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Augmenta o redueix la brillantor de la pantalla."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Força la GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Augmenta o redueix la velocitat de rellotge de la GPU de la Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Força la CPU"
@@ -8233,6 +8222,8 @@ MSG_HASH(
"Fitxer de configuració erroni — no s’han trobat APNAME ni PASSWORD a %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h
index 43b11c4ef39..5ce06987f31 100644
--- a/intl/msg_hash_chs.h
+++ b/intl/msg_hash_chs.h
@@ -14330,18 +14330,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"提高或降低屏幕亮度。"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU 超频"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "超频或降频 Switch 的 GPU。"
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU 超频"
@@ -14433,6 +14422,8 @@ MSG_HASH(
"错误配置文件——在 %s 中找不到 APNAME 或 PASSWORD"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h
index 0e7c0271d6e..af91e236f72 100644
--- a/intl/msg_hash_cht.h
+++ b/intl/msg_hash_cht.h
@@ -14502,18 +14502,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"調整螢幕亮度。"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU超頻"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Switch主機圖形處理器超頻設定。"
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU超頻"
diff --git a/intl/msg_hash_cs.h b/intl/msg_hash_cs.h
index 051446ec370..80c42e461b4 100644
--- a/intl/msg_hash_cs.h
+++ b/intl/msg_hash_cs.h
@@ -14458,18 +14458,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Zvýšení Nebo Snížení Jasu Obrazovky."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Přetaktování GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Přetaktování nebo podtaktování přepínače grafického procesoru."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Přetaktování CPU"
@@ -14557,6 +14546,8 @@ MSG_HASH(
"Chybný konfigurační soubor - nepodařilo se najít APNAME nebo HESLO v %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_cy.h b/intl/msg_hash_cy.h
index 8ce56426e5a..7164564485f 100644
--- a/intl/msg_hash_cy.h
+++ b/intl/msg_hash_cy.h
@@ -1734,13 +1734,11 @@ MSG_HASH(
MSG_LOCAL,
"Lleol"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_da.h b/intl/msg_hash_da.h
index d9cd36335e9..6360055af6c 100644
--- a/intl/msg_hash_da.h
+++ b/intl/msg_hash_da.h
@@ -1463,12 +1463,12 @@ MSG_HASH(
"Genstart RetroArch"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h
index ba5e55477e8..15c957c87fb 100644
--- a/intl/msg_hash_de.h
+++ b/intl/msg_hash_de.h
@@ -14339,17 +14339,7 @@ MSG_HASH(
"Bildschirmhelligkeit erhöhen oder verringern."
)
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU Übertakten"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Über- oder Untertakten der Switch GPU."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU Übertakten"
@@ -14445,6 +14435,8 @@ MSG_HASH(
"Falsche Konfigurationsdatei - APNAME oder PASSWORD in %s nicht gefunden"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_el.h b/intl/msg_hash_el.h
index 4bb9bf2c359..01490304daf 100644
--- a/intl/msg_hash_el.h
+++ b/intl/msg_hash_el.h
@@ -5554,18 +5554,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_BRIGHTNESS_CONTROL,
"Φωτεινότητα Οθόνης"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Υπερχρονισμός Κάρτας Γραφικών"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Υπερχρονισμός ή υποχρονισμός της Κάρτας Γραφικών του Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Υπερχρονισμός Επεξεργαστή"
@@ -5613,6 +5602,8 @@ MSG_HASH(
"Επιλέξτε τη ζώνη ώρας σας για να προσαρμόσετε την ημερομηνία και την ώρα στην τοποθεσία σας."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_en.h b/intl/msg_hash_en.h
index aac08a361e4..22599b174a7 100644
--- a/intl/msg_hash_en.h
+++ b/intl/msg_hash_en.h
@@ -2207,17 +2207,7 @@ MSG_HASH(
"Enabling Linux GameMode can improve latency, fix audio crackling issues and maximise overall performance by automatically configuring your CPU and GPU for best performance.\nThe GameMode software needs to be installed for this to work. See https://github.com/FeralInteractive/gamemode for information on how to install GameMode."
)
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU Over-clock"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Over-clock or under-clock the Switch GPU."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU Over-clock"
@@ -2233,6 +2223,8 @@ MSG_HASH(
"Displays a list of available time zones. After selecting a time zone, time and date is adjusted to the selected time zone. It assumes, that system/hardware clock is set to UTC."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h
index fbd3d684a3a..25cb7b1b76b 100644
--- a/intl/msg_hash_eo.h
+++ b/intl/msg_hash_eo.h
@@ -1146,10 +1146,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE,
"Small Keyboard Enable"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -1173,6 +1170,8 @@ MSG_HASH(
"Enable or disable remote command line access."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h
index 61cbdeff452..382ef6840ba 100644
--- a/intl/msg_hash_es.h
+++ b/intl/msg_hash_es.h
@@ -14662,18 +14662,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Aumenta o reduce el brillo de la pantalla."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Acelerar GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Aumenta o reduce la velocidad de la GPU de Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Acelerar CPU"
@@ -14765,6 +14754,8 @@ MSG_HASH(
"Archivo de configuración incorrecto: no se encontraron los valores APNAME o PASSWORD en %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_fa.h b/intl/msg_hash_fa.h
index f3945668be6..7780a0162f5 100644
--- a/intl/msg_hash_fa.h
+++ b/intl/msg_hash_fa.h
@@ -2675,9 +2675,7 @@ MSG_HASH(
"ریستارت رتروآرچ"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -2685,6 +2683,8 @@ MSG_HASH(
"بلوتوث"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_fi.h b/intl/msg_hash_fi.h
index 4aa89f20700..a554801945e 100644
--- a/intl/msg_hash_fi.h
+++ b/intl/msg_hash_fi.h
@@ -13470,18 +13470,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Lisää tai vähennä näytön kirkkautta."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Näytönohjaimen ylikellotus"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Ylikellota tai alikellota Switchin näytönohjain."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Suorittimen ylikellotus"
@@ -13565,6 +13554,8 @@ MSG_HASH(
"Väärä kokoonpanotiedosto- APNAME tai PASSWORD ei löydy kohteesta %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h
index 47fcc9ef643..fcfe7c1d824 100644
--- a/intl/msg_hash_fr.h
+++ b/intl/msg_hash_fr.h
@@ -14598,18 +14598,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Augmenter ou diminuer la luminosité de l'écran."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Overclocker le processeur graphique"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Overclocker ou underclocker le processeur graphique de la Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Overclocker le processeur"
@@ -14693,6 +14682,8 @@ MSG_HASH(
"Mauvais fichier de configuration - impossible de trouver l'APNAME ou le PASSWORD dans %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_gl.h b/intl/msg_hash_gl.h
index 8d8b65175cf..23c8db688d6 100644
--- a/intl/msg_hash_gl.h
+++ b/intl/msg_hash_gl.h
@@ -2310,10 +2310,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY,
"Reiniciar RetroArch"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -2341,6 +2338,8 @@ MSG_HASH(
"Desconectando da wifi \"%s\""
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_he.h b/intl/msg_hash_he.h
index f93ece10927..1f21cc5fc53 100644
--- a/intl/msg_hash_he.h
+++ b/intl/msg_hash_he.h
@@ -955,12 +955,12 @@ MSG_HASH(
"אתחול RetroArch"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_hr.h b/intl/msg_hash_hr.h
index ccb0778554e..11e518788c0 100644
--- a/intl/msg_hash_hr.h
+++ b/intl/msg_hash_hr.h
@@ -1119,12 +1119,12 @@ MSG_HASH(
"Ponovno pokreni RetroArch"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_hu.h b/intl/msg_hash_hu.h
index 44a698831e9..ee5efbee5d6 100644
--- a/intl/msg_hash_hu.h
+++ b/intl/msg_hash_hu.h
@@ -14422,18 +14422,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"A kijelző fényerejének növelése vagy csökkentése."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU túlhajtás"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "A Switch GPU-jának túlhajtása vagy visszafogása."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU túlhajtás"
@@ -14521,6 +14510,8 @@ MSG_HASH(
"Rossz konfigurációs fájl - nincs APNAME vagy PASSWORD itt: %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_id.h b/intl/msg_hash_id.h
index 8a5e558a8e3..506f6c311cc 100644
--- a/intl/msg_hash_id.h
+++ b/intl/msg_hash_id.h
@@ -3982,18 +3982,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
"Jenis Pemetaan Stik Kendali Papan Ketik"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Percepatan GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Mempercepat atau perlambat GPU permainan Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Percepatan CPU"
@@ -4009,6 +3998,8 @@ MSG_HASH(
"Memutus sambungan dari Wi-Fi '%s'"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h
index d6f8cf9cdd4..7acc47ad23f 100644
--- a/intl/msg_hash_it.h
+++ b/intl/msg_hash_it.h
@@ -14482,18 +14482,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Aumenta o diminuisce la luminosità dello schermo."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Overclocca la GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Overclocca o underclocca la GPU del Nintendo Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Overclocca la CPU"
@@ -14589,6 +14578,8 @@ MSG_HASH(
"File di configurazione errato: impossibile trovare APNAME o PASSWORD in %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h
index f08b1e266ab..332de3a998b 100644
--- a/intl/msg_hash_ja.h
+++ b/intl/msg_hash_ja.h
@@ -11202,18 +11202,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"画面の明るさを増減します."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPUオーバークロック"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "SwitchのGPUをオーバークロック/アンダークロックします."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPUオーバークロック"
@@ -11305,6 +11294,8 @@ MSG_HASH(
"設定ファイルが不正です - APNAME または PASSWORD が %s に見つかりませんでした"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h
index c76035cd37d..5405a9f924f 100644
--- a/intl/msg_hash_ko.h
+++ b/intl/msg_hash_ko.h
@@ -14783,17 +14783,7 @@ MSG_HASH(
"화면의 밝기를 조절합니다."
)
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU 오버클럭"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "스위치 GPU를 오버클럭 또는 언더클럭합니다."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU 오버클럭"
@@ -14893,6 +14883,8 @@ MSG_HASH(
"잘못된 구성 파일 - %s에서 APNAME 또는 PASSWORD를 찾을 수 없습니다."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
index 5a32b999256..fbdef2afffc 100644
--- a/intl/msg_hash_lbl.h
+++ b/intl/msg_hash_lbl.h
@@ -1,10 +1,4 @@
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
- "switch_gpu_profile"
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
"switch_cpu_profile"
@@ -3685,6 +3679,29 @@ MSG_HASH(
"ssh_enable"
)
#endif
+
+#ifdef HAVE_LAKKA_SWITCH
+MSG_HASH(
+ MENU_ENUM_LABEL_DEFERRED_LAKKA_SWITCH_OPTIONS_LIST,
+ "deferred_lakka_switch_options_list"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_LAKKA_SWITCH_OPTIONS,
+ "Switch_Options"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_SWITCH_OC_ENABLE,
+ "Switch_OC_enable"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_SWITCH_CEC_ENABLE,
+ "Switch_CEC_enable"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_BLUETOOTH_ERTM_DISABLE,
+ "Switch_ERTM_Disable"
+ )
+#endif
MSG_HASH(
MENU_ENUM_LABEL_START_CORE,
"start_core"
diff --git a/intl/msg_hash_mt.h b/intl/msg_hash_mt.h
index c2e60921c10..e129d86e382 100644
--- a/intl/msg_hash_mt.h
+++ b/intl/msg_hash_mt.h
@@ -434,13 +434,12 @@
/* Environment Specific Settings */
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h
index 9b5f33dc1b4..d88a671ca1f 100644
--- a/intl/msg_hash_nl.h
+++ b/intl/msg_hash_nl.h
@@ -6854,10 +6854,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE,
"Small Keyboard Enable"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -6881,6 +6878,8 @@ MSG_HASH(
"Enable or disable remote command line access."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_no.h b/intl/msg_hash_no.h
index 8bae5a10bef..89aa318b0b1 100644
--- a/intl/msg_hash_no.h
+++ b/intl/msg_hash_no.h
@@ -2466,13 +2466,12 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY,
"Start RetroArch på nytt"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_oc.h b/intl/msg_hash_oc.h
index c79f4b96d27..cd89c36bb58 100644
--- a/intl/msg_hash_oc.h
+++ b/intl/msg_hash_oc.h
@@ -678,13 +678,11 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY,
"Reaviar RetroArch"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h
index 0fccd6c357d..1abada21fd6 100644
--- a/intl/msg_hash_pl.h
+++ b/intl/msg_hash_pl.h
@@ -13302,18 +13302,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Zwiększ lub zmniejsz jasność ekranu."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Podkręcanie GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Podkręcanie lub obniżanie GPU."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Podkręcanie CPU"
@@ -13409,6 +13398,8 @@ MSG_HASH(
"Niepoprawny plik konfiguracyjny - nie można znaleźć APNAME lub PASSWORD w %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h
index 9ef940bf0fe..5469ac56c0a 100644
--- a/intl/msg_hash_pt_br.h
+++ b/intl/msg_hash_pt_br.h
@@ -13086,18 +13086,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Aumenta ou diminui o brilho da tela."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Overclock da GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Faz um overclock ou underclock na CPU do Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Overclock da CPU"
@@ -13193,6 +13182,8 @@ MSG_HASH(
"Arquivo de configuração incorreto: valores APNAME ou PASSWORD não puderam ser encontrados em %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h
index a6eac9e775f..a5aa003b8cd 100644
--- a/intl/msg_hash_pt_pt.h
+++ b/intl/msg_hash_pt_pt.h
@@ -5199,9 +5199,7 @@ MSG_HASH(
"Ativar teclado pequeno"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -5233,6 +5231,8 @@ MSG_HASH(
"Ativar/desativar acesso remoto pela linha de comandos."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_ro.h b/intl/msg_hash_ro.h
index c2e60921c10..65224c31e4a 100644
--- a/intl/msg_hash_ro.h
+++ b/intl/msg_hash_ro.h
@@ -435,12 +435,12 @@
/* Environment Specific Settings */
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h
index 5fd60988343..fd307b2b551 100644
--- a/intl/msg_hash_ru.h
+++ b/intl/msg_hash_ru.h
@@ -14718,18 +14718,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Увеличить или уменьшить яркость экрана."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Разгон GPU"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Разгон или замедление графического процессора Switch."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Разгон СPU"
@@ -14817,6 +14806,8 @@ MSG_HASH(
"Неправильный файл конфигурации - отсутствует APNAME или PASSWORD в %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_si.h b/intl/msg_hash_si.h
index 09c2b5de144..5df7f7288b0 100644
--- a/intl/msg_hash_si.h
+++ b/intl/msg_hash_si.h
@@ -527,12 +527,12 @@ MSG_HASH(
/* Environment Specific Settings */
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_sk.h b/intl/msg_hash_sk.h
index 91c045499ba..86b4addaf77 100644
--- a/intl/msg_hash_sk.h
+++ b/intl/msg_hash_sk.h
@@ -6846,18 +6846,7 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_BRIGHTNESS_CONTROL,
"Jas obrazovky"
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU pretaktovanie"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Pretaktovanie alebo podtaktovanie GPU Switcha."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU pretaktovanie"
@@ -6885,6 +6874,8 @@ MSG_HASH(
"[Žiadne SSID]"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_sr.h b/intl/msg_hash_sr.h
index ed07f977aa8..c7534b34bb4 100644
--- a/intl/msg_hash_sr.h
+++ b/intl/msg_hash_sr.h
@@ -2443,12 +2443,12 @@ MSG_HASH(
"Restartuj RetroArch"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_sv.h b/intl/msg_hash_sv.h
index 7369d51d433..4fe05e67c07 100644
--- a/intl/msg_hash_sv.h
+++ b/intl/msg_hash_sv.h
@@ -4963,9 +4963,7 @@ MSG_HASH(
"Lokal"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -4989,6 +4987,8 @@ MSG_HASH(
"Tidszon"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_tr.h b/intl/msg_hash_tr.h
index 700c03bce46..a86aee31d7f 100644
--- a/intl/msg_hash_tr.h
+++ b/intl/msg_hash_tr.h
@@ -14754,18 +14754,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Ekran parlaklığını arttır veya azalt."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU Hız Aşırtma"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "GPU hızını arttır yada düşür."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU Hız Aşırtma"
@@ -14853,6 +14842,8 @@ MSG_HASH(
"Yanlış yapılandırma dosyası - %s içinde APNAME veya PASSWORD bulunamadı"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_uk.h b/intl/msg_hash_uk.h
index 7dec1c459ec..4644baecf28 100644
--- a/intl/msg_hash_uk.h
+++ b/intl/msg_hash_uk.h
@@ -8243,13 +8243,7 @@ MSG_HASH(
"Місцеві"
)
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "Розгін GPU"
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"Розгін CPU"
@@ -8281,6 +8275,8 @@ MSG_HASH(
"Точка доступу Wi-Fi не запущена"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
index 8416cc61521..9da8361c63c 100644
--- a/intl/msg_hash_us.h
+++ b/intl/msg_hash_us.h
@@ -15470,18 +15470,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL,
"Increase or decrease the screen brightness."
)
-
-#ifdef HAVE_LAKKA_SWITCH
-MSG_HASH(
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- "GPU Overclock"
- )
-MSG_HASH(
- MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
- "Overclock or underclock the Switch GPU."
- )
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE,
"CPU Overclock"
@@ -15544,6 +15533,40 @@ MSG_HASH(
MENU_ENUM_LABEL_HELP_TIMEZONE,
"Displays a list of available timezones. After selecting a time zone, time and date is adjusted to the selected time zone. It assumes, that system/hardware clock is set to UTC."
)
+#ifdef HAVE_LAKKA_SWITCH
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_LAKKA_SWITCH_OPTIONS,
+ "Nintendo Switch Options"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_LAKKA_SWITCH_OPTIONS,
+ "Manage Nintendo Switch Specific Options."
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_SWITCH_OC_ENABLE,
+ "CPU Overclock"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_SWITCH_OC_ENABLE,
+ "Enable CPU Overclock frequencies"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_SWITCH_CEC_ENABLE,
+ "CEC Support"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_SWITCH_CEC_ENABLE,
+ "Enable CEC Handshaking with TV when docking"
+ )
+MSG_HASH(
+ MENU_ENUM_LABEL_VALUE_BLUETOOTH_ERTM_DISABLE,
+ "Bluetooth ERTM Disable"
+ )
+MSG_HASH(
+ MENU_ENUM_SUBLABEL_BLUETOOTH_ERTM_DISABLE,
+ "Disable Bluetooth ERTM to fix pairing of some devices"
+ )
+#endif
MSG_HASH(
MSG_LOCALAP_SWITCHING_OFF,
"Switching off Wi-Fi Access Point."
@@ -15581,6 +15604,8 @@ MSG_HASH(
"Wrong configuration file - could not find APNAME or PASSWORD in %s"
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE,
diff --git a/intl/msg_hash_val.h b/intl/msg_hash_val.h
index 808838d7a61..00fc59488d1 100644
--- a/intl/msg_hash_val.h
+++ b/intl/msg_hash_val.h
@@ -3419,12 +3419,12 @@ MSG_HASH(
"Reinicia RetroArch"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h
index caa4ccdead0..589a6480f35 100644
--- a/intl/msg_hash_vn.h
+++ b/intl/msg_hash_vn.h
@@ -2619,9 +2619,7 @@ MSG_HASH(
"Small Keyboard Enable"
)
-#ifdef HAVE_LAKKA_SWITCH
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
#endif
#ifdef HAVE_LAKKA
MSG_HASH(
@@ -2649,6 +2647,8 @@ MSG_HASH(
"Bật/tắt giao thức SSH."
)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+#endif
#ifdef GEKKO
#endif
#ifdef UDEV_TOUCH_SUPPORT
diff --git a/lakka-switch.h b/lakka-switch.h
new file mode 100644
index 00000000000..2100199a8cc
--- /dev/null
+++ b/lakka-switch.h
@@ -0,0 +1,34 @@
+/* RetroArch - A frontend for libretro.
+ * Copyright (C) 2023 - Gavin_Darkglider
+ *
+ * RetroArch is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Found-
+ * ation, either version 3 of the License, or (at your option) any later version.
+ *
+ * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with RetroArch.
+ * If not, see .
+ */
+
+#ifndef __RARCH_LAKKA_SWITCH_H
+#define __RARCH_LAKKA_SWITCH_H
+
+#define SWITCH_OC_TOGGLE_PATH "/sys/kernel/tegra_cpufreq/overclock"
+#define SWITCH_CEC_TOGGLE_PATH "/tmp/.CEC"
+#define SWITCH_GPU_PROFILE_FILE_MAX_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/max_freq"
+#define SWITCH_GPU_PROFILE_FILE_MIN_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/min_freq"
+#define SWITCH_GPU_PROFILE_FILE_GOVERNOR_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/governor"
+#define SWITCH_GPU_PROFILE_FILE_AVAILABLE_GOVERNORS_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/available_governors"
+#define SWITCH_GPU_PROFILE_FILE_AVAILABLE_FREQ_PATH "/sys/devices/57000000.gpu/devfreq/57000000.gpu/available_governors"
+
+#define BLUETOOTH_ERTM_TOGGLE_PATH "/sys/module/bluetooth/parameters/disable_ertm"
+
+#define SWITCH_R2P_ENABLED_PATH "/sys/module/pmc_r2p/parameters/enabled"
+#define SWITCH_R2P_ACTION_PATH /sys/module/pmc_r2p/parameters/action
+#define SWITCH_R2P_ENTRY_ID_PATH /sys/module/pmc_r2p/parameters/entry_id
+#define SWITCH_R2P_PARAM1_PATH /sys/module/pmc_r2p/parameters/param1
+#define SWITCH_R2P_PARAM2_PATH /sys/module/pmc_r2p/parameters/param2
+#endif
diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c
index ac8284c7444..d4e4a535490 100644
--- a/menu/cbs/menu_cbs_deferred_push.c
+++ b/menu/cbs/menu_cbs_deferred_push.c
@@ -215,6 +215,9 @@ GENERIC_DEFERRED_PUSH(deferred_push_netplay_kick_list, DISPLAYLIST_
GENERIC_DEFERRED_PUSH(deferred_push_netplay_ban_list, DISPLAYLIST_NETPLAY_BAN_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_netplay_lobby_filters_list, DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_lakka_services_list, DISPLAYLIST_LAKKA_SERVICES_LIST)
+#ifdef HAVE_LAKKA_SWITCH
+GENERIC_DEFERRED_PUSH(deferred_push_lakka_switch_options_list, DISPLAYLIST_LAKKA_SWITCH_OPTIONS_LIST)
+#endif
GENERIC_DEFERRED_PUSH(deferred_push_user_settings_list, DISPLAYLIST_USER_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_directory_settings_list, DISPLAYLIST_DIRECTORY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_privacy_settings_list, DISPLAYLIST_PRIVACY_SETTINGS_LIST)
@@ -262,14 +265,10 @@ GENERIC_DEFERRED_PUSH(deferred_push_core_system_files_list, DISPLAYLIST_
GENERIC_DEFERRED_PUSH(deferred_push_lakka_list, DISPLAYLIST_LAKKA)
#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
GENERIC_DEFERRED_PUSH(deferred_push_switch_cpu_profile, DISPLAYLIST_SWITCH_CPU_PROFILE)
#endif
-#ifdef HAVE_LAKKA_SWITCH
-GENERIC_DEFERRED_PUSH(deferred_push_switch_gpu_profile, DISPLAYLIST_SWITCH_GPU_PROFILE)
-#endif
-
#if defined(HAVE_LAKKA)
GENERIC_DEFERRED_PUSH(deferred_push_cpu_perfpower, DISPLAYLIST_CPU_PERFPOWER_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cpu_policy, DISPLAYLIST_CPU_POLICY_LIST)
@@ -743,6 +742,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{MENU_ENUM_LABEL_DEFERRED_WIFI_SETTINGS_LIST, deferred_push_wifi_settings_list},
{MENU_ENUM_LABEL_DEFERRED_WIFI_NETWORKS_LIST, deferred_push_wifi_networks_list},
{MENU_ENUM_LABEL_DEFERRED_LAKKA_SERVICES_LIST, deferred_push_lakka_services_list},
+#ifdef HAVE_LAKKA_SWITCH
+ {MENU_ENUM_LABEL_DEFERRED_LAKKA_SWITCH_OPTIONS_LIST, deferred_push_lakka_switch_options_list},
+#endif
{MENU_ENUM_LABEL_DEFERRED_USER_SETTINGS_LIST, deferred_push_user_settings_list},
{MENU_ENUM_LABEL_DEFERRED_DIRECTORY_SETTINGS_LIST, deferred_push_directory_settings_list},
{MENU_ENUM_LABEL_DEFERRED_PRIVACY_SETTINGS_LIST, deferred_push_privacy_settings_list},
@@ -787,10 +789,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{MENU_ENUM_LABEL_DEFERRED_AUDIO_OUTPUT_SETTINGS_LIST, deferred_push_audio_output_settings_list},
{MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST, deferred_push_audio_mixer_settings_list},
{MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST, deferred_push_latency_settings_list},
-#ifdef HAVE_LAKKA_SWITCH
- {MENU_ENUM_LABEL_SWITCH_GPU_PROFILE, deferred_push_switch_gpu_profile},
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
{MENU_ENUM_LABEL_SWITCH_CPU_PROFILE, deferred_push_switch_cpu_profile},
#endif
#if defined(HAVE_LAKKA)
diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c
index 1be3b5d3d34..1fa79fdf566 100644
--- a/menu/cbs/menu_cbs_get_value.c
+++ b/menu/cbs/menu_cbs_get_value.c
@@ -601,7 +601,6 @@ static void menu_action_setting_disp_set_label_contentless_core(
strlcpy(s2, alt, len2);
}
-#ifndef HAVE_LAKKA_SWITCH
#ifdef HAVE_LAKKA
static void menu_action_setting_disp_cpu_gov_mode(
file_list_t* list,
@@ -757,7 +756,6 @@ static void menu_action_cpu_governor_label(
strlcpy(s, d->scaling_governor, len);
}
#endif
-#endif
static void menu_action_setting_disp_set_label_core_lock(
file_list_t* list,
@@ -2056,7 +2054,6 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
BIND_ACTION_GET_VALUE(cbs,
menu_action_setting_disp_set_label_core_option_override_info);
break;
- #ifndef HAVE_LAKKA_SWITCH
#ifdef HAVE_LAKKA
case MENU_ENUM_LABEL_CPU_PERF_MODE:
BIND_ACTION_GET_VALUE(cbs,
@@ -2083,7 +2080,6 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
BIND_ACTION_GET_VALUE(cbs, menu_action_cpu_governor_label);
break;
#endif
- #endif
default:
return -1;
}
diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c
index d5529f2314b..0bf48a993e5 100644
--- a/menu/cbs/menu_cbs_left.c
+++ b/menu/cbs/menu_cbs_left.c
@@ -677,7 +677,6 @@ 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,7 +791,6 @@ 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)
@@ -1121,7 +1119,6 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_CORE_NAME:
BIND_ACTION_LEFT(cbs, manual_content_scan_core_name_left);
break;
- #ifndef HAVE_LAKKA_SWITCH
#ifdef HAVE_LAKKA
case MENU_ENUM_LABEL_CPU_PERF_MODE:
BIND_ACTION_LEFT(cbs, cpu_policy_mode_change);
@@ -1140,7 +1137,6 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_LEFT(cbs, cpu_policy_freq_managed_gov);
break;
#endif
- #endif
default:
return -1;
}
diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c
index fcb58c73095..c847a475caf 100644
--- a/menu/cbs/menu_cbs_ok.c
+++ b/menu/cbs/menu_cbs_ok.c
@@ -98,7 +98,7 @@
#include "../../play_feature_delivery/play_feature_delivery.h"
#endif
-#if defined(HAVE_LAKKA) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
#include "../../switch_performance_profiles.h"
#endif
@@ -453,6 +453,10 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_NETPLAY_LAN_SCAN_SETTINGS_LIST;
case ACTION_OK_DL_LAKKA_SERVICES_LIST:
return MENU_ENUM_LABEL_DEFERRED_LAKKA_SERVICES_LIST;
+#ifdef HAVE_LAKKA_SWITCH
+ case ACTION_OK_DL_LAKKA_SWITCH_OPTIONS_LIST:
+ return MENU_ENUM_LABEL_DEFERRED_LAKKA_SWITCH_OPTIONS_LIST;
+#endif
case ACTION_OK_DL_USER_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_USER_SETTINGS_LIST;
case ACTION_OK_DL_DIRECTORY_SETTINGS_LIST:
@@ -1717,6 +1721,9 @@ int generic_action_ok_displaylist_push(
case ACTION_OK_DL_NETPLAY:
case ACTION_OK_DL_NETPLAY_LAN_SCAN_SETTINGS_LIST:
case ACTION_OK_DL_LAKKA_SERVICES_LIST:
+#ifdef HAVE_LAKKA_SWITCH
+ case ACTION_OK_DL_LAKKA_SWITCH_OPTIONS_LIST:
+#endif
case ACTION_OK_DL_USER_SETTINGS_LIST:
case ACTION_OK_DL_DIRECTORY_SETTINGS_LIST:
case ACTION_OK_DL_PRIVACY_SETTINGS_LIST:
@@ -4052,19 +4059,11 @@ static int action_ok_deferred_list_stub(const char *path,
return 0;
}
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
static int action_ok_set_switch_cpu_profile(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
char command[PATH_MAX_LENGTH] = {0};
-#ifdef HAVE_LAKKA_SWITCH
- char* profile_name = SWITCH_CPU_PROFILES[entry_idx];
- /* TODO/FIXME - localize */
- snprintf(command, sizeof(command), "cpu-profile set '%s'", profile_name);
- system(command);
- /* TODO/FIXME - localize */
- snprintf(command, sizeof(command), "Current profile set to %s", profile_name);
-#else
unsigned profile_clock = SWITCH_CPU_SPEEDS_VALUES[entry_idx];
settings_t *settings = config_get_ptr();
@@ -4082,7 +4081,6 @@ static int action_ok_set_switch_cpu_profile(const char *path,
/* TODO/FIXME - localize */
snprintf(command, sizeof(command),
"Current Clock set to %i", profile_clock);
-#endif
runloop_msg_queue_push(command, 1, 90, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
@@ -4091,26 +4089,6 @@ static int action_ok_set_switch_cpu_profile(const char *path,
}
#endif
-#ifdef HAVE_LAKKA_SWITCH
-static int action_ok_set_switch_gpu_profile(const char *path,
- const char *label, unsigned type, size_t idx, size_t entry_idx)
-{
- size_t _len;
- char command[PATH_MAX_LENGTH];
- char *profile_name = SWITCH_GPU_PROFILES[entry_idx];
- size_t _len = strlcpy(command, "gpu-profile set ", sizeof(command));
- snprintf(command + _len, sizeof(command) - _len, "'%s'", profile_name);
- system(command);
- /* TODO/FIXME - localize */
- _len = strlcpy(command, "Current profile set to ", sizeof(command));
- strlcpy(command + _len, profile_name, sizeof(command) - _len);
- runloop_msg_queue_push(command, 1, 90, true, NULL,
- MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
- return -1;
-}
-
-#endif
-
static int action_ok_load_core_deferred(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@@ -6084,6 +6062,9 @@ STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_cheevos_appearance_list, ACTION_OK_DL_CH
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_cheevos_visibility_list, ACTION_OK_DL_CHEEVOS_VISIBILITY_SETTINGS_LIST)
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_updater_list, ACTION_OK_DL_UPDATER_SETTINGS_LIST)
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_lakka_services, ACTION_OK_DL_LAKKA_SERVICES_LIST)
+#ifdef HAVE_LAKKA_SWITCH
+STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_lakka_switch_options, ACTION_OK_DL_LAKKA_SWITCH_OPTIONS_LIST)
+#endif
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_user_list, ACTION_OK_DL_USER_SETTINGS_LIST)
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_netplay_sublist, ACTION_OK_DL_NETPLAY)
STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_directory_list, ACTION_OK_DL_DIRECTORY_SETTINGS_LIST)
@@ -8469,10 +8450,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_NETPLAY_REFRESH_LAN, action_ok_push_netplay_refresh_lan},
#endif
#endif
-#ifdef HAVE_LAKKA_SWITCH
- {MENU_ENUM_LABEL_SWITCH_GPU_PROFILE, action_ok_push_default},
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
{MENU_ENUM_LABEL_SWITCH_CPU_PROFILE, action_ok_push_default},
#endif
{MENU_ENUM_LABEL_MENU_WALLPAPER, action_ok_menu_wallpaper},
@@ -8730,6 +8708,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS, action_ok_subsystem_list},
{MENU_ENUM_LABEL_NETWORK_SETTINGS, action_ok_network_list},
{MENU_ENUM_LABEL_LAKKA_SERVICES, action_ok_lakka_services},
+#ifdef HAVE_LAKKA_SWITCH
+ {MENU_ENUM_LABEL_LAKKA_SWITCH_OPTIONS, action_ok_lakka_switch_options},
+#endif
{MENU_ENUM_LABEL_NETPLAY_SETTINGS, action_ok_netplay_sublist},
{MENU_ENUM_LABEL_USER_SETTINGS, action_ok_user_list},
{MENU_ENUM_LABEL_DIRECTORY_SETTINGS, action_ok_directory_list},
@@ -9007,12 +8988,7 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case FILE_TYPE_PLAYLIST_ENTRY:
BIND_ACTION_OK(cbs, action_ok_playlist_entry_collection);
break;
-#ifdef HAVE_LAKKA_SWITCH
- case MENU_SET_SWITCH_GPU_PROFILE:
- BIND_ACTION_OK(cbs, action_ok_set_switch_gpu_profile);
- break;
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
case MENU_SET_SWITCH_CPU_PROFILE:
BIND_ACTION_OK(cbs, action_ok_set_switch_cpu_profile);
break;
diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c
index 0762878134d..8a6badbc3f6 100644
--- a/menu/cbs/menu_cbs_right.c
+++ b/menu/cbs/menu_cbs_right.c
@@ -797,7 +797,6 @@ static int manual_content_scan_core_name_right(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)
@@ -914,7 +913,6 @@ static int cpu_policy_freq_tweak(unsigned type, const char *label,
return 0;
}
#endif
-#endif
static int core_setting_right(unsigned type, const char *label,
bool wraparound)
@@ -1264,7 +1262,6 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_CORE_NAME:
BIND_ACTION_RIGHT(cbs, manual_content_scan_core_name_right);
break;
- #ifndef HAVE_LAKKA_SWITCH
#ifdef HAVE_LAKKA
case MENU_ENUM_LABEL_CPU_PERF_MODE:
BIND_ACTION_RIGHT(cbs, cpu_policy_mode_change);
@@ -1283,7 +1280,6 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_RIGHT(cbs, cpu_policy_freq_managed_gov);
break;
#endif
- #endif
default:
return -1;
}
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
index 7215fbcef57..40d8eba0722 100644
--- a/menu/cbs/menu_cbs_sublabel.c
+++ b/menu/cbs/menu_cbs_sublabel.c
@@ -377,6 +377,12 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_bluetooth_enable, MENU_
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_localap_enable, MENU_ENUM_SUBLABEL_LOCALAP_ENABLE )
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_timezone, MENU_ENUM_SUBLABEL_TIMEZONE)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_options, MENU_ENUM_SUBLABEL_LAKKA_SWITCH_OPTIONS)
+DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_oc_enable, MENU_ENUM_SUBLABEL_SWITCH_OC_ENABLE)
+DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_cec_enable, MENU_ENUM_SUBLABEL_SWITCH_CEC_ENABLE)
+DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_bluetooth_ertm_disable, MENU_ENUM_SUBLABEL_BLUETOOTH_ERTM_DISABLE)
+#endif
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_user_language, MENU_ENUM_SUBLABEL_USER_LANGUAGE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_max_swapchain_images, MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_waitable_swapchains, MENU_ENUM_SUBLABEL_VIDEO_WAITABLE_SWAPCHAINS)
@@ -1211,19 +1217,17 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_show_wimp,
#endif
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_discord_allow, MENU_ENUM_SUBLABEL_DISCORD_ALLOW)
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_cpu_profile, MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE)
#endif
-#ifdef HAVE_LAKKA_SWITCH
-DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_gpu_profile, MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE)
-#endif
-
+#ifndef HAVE_LAKKA
#ifdef __linux__
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_gamemode_enable, MENU_ENUM_SUBLABEL_GAMEMODE_ENABLE_LINUX)
#else
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_gamemode_enable, MENU_ENUM_SUBLABEL_GAMEMODE_ENABLE)
#endif
+#endif /*HAVE_LAKKA*/
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_brightness_control, MENU_ENUM_SUBLABEL_BRIGHTNESS_CONTROL)
@@ -1368,7 +1372,6 @@ static int action_bind_sublabel_bluetooth_list(
}
#endif
-#ifndef HAVE_LAKKA_SWITCH
#ifdef HAVE_LAKKA
static int action_bind_sublabel_cpu_policy_entry_list(
file_list_t *list,
@@ -1402,7 +1405,7 @@ static int action_bind_sublabel_cpu_perf_mode(
return 0;
}
#endif
-#endif
+
#ifdef HAVE_CHEEVOS
static int action_bind_sublabel_cheevos_entry(
file_list_t *list,
@@ -5093,7 +5096,6 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_TIMEZONE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_timezone);
break;
-#ifndef HAVE_LAKKA_SWITCH
case MENU_ENUM_LABEL_CPU_POLICY_ENTRY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cpu_policy_entry_list);
break;
@@ -5101,6 +5103,19 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cpu_perf_mode);
break;
#endif
+#ifdef HAVE_LAKKA_SWITCH
+ case MENU_ENUM_LABEL_LAKKA_SWITCH_OPTIONS:
+ BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_options);
+ break;
+ case MENU_ENUM_LABEL_SWITCH_OC_ENABLE:
+ BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_oc_enable);
+ break;
+ case MENU_ENUM_LABEL_SWITCH_CEC_ENABLE:
+ BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_cec_enable);
+ break;
+ case MENU_ENUM_LABEL_BLUETOOTH_ERTM_DISABLE:
+ BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_bluetooth_ertm_disable);
+ break;
#endif
case MENU_ENUM_LABEL_USER_LANGUAGE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_user_language);
@@ -5188,19 +5203,16 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_show_wimp);
break;
#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_cpu_profile);
break;
#endif
-#ifdef HAVE_LAKKA_SWITCH
- case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
- BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_gpu_profile);
- break;
-#endif
+#ifndef HAVE_LAKKA
case MENU_ENUM_LABEL_GAMEMODE_ENABLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_gamemode_enable);
break;
+#endif /*HAVE_LAKKA*/
case MENU_ENUM_LABEL_BRIGHTNESS_CONTROL:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_brightness_control);
break;
diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c
index d20a937a2ca..ac4d526cdb6 100644
--- a/menu/cbs/menu_cbs_title.c
+++ b/menu/cbs/menu_cbs_title.c
@@ -672,6 +672,9 @@ DEFAULT_TITLE_MACRO(action_get_netplay_lan_scan_settings_list, MENU_ENUM_LABEL_
#ifdef HAVE_LAKKA
DEFAULT_TITLE_MACRO(action_get_lakka_services_list, MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES)
#endif
+#ifdef HAVE_LAKKA_SWITCH
+DEFAULT_TITLE_MACRO(action_get_lakka_switch_options_list, MENU_ENUM_LABEL_VALUE_LAKKA_SWITCH_OPTIONS)
+#endif
DEFAULT_TITLE_MACRO(action_get_user_settings_list, MENU_ENUM_LABEL_VALUE_USER_SETTINGS)
DEFAULT_TITLE_MACRO(action_get_directory_settings_list, MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS)
DEFAULT_TITLE_MACRO(action_get_privacy_settings_list, MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS)
@@ -770,14 +773,10 @@ DEFAULT_TITLE_COPY_MACRO(action_get_title_video_shader_preset_save,MENU_ENUM_LAB
DEFAULT_TITLE_COPY_MACRO(action_get_title_video_shader_preset_remove,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE)
DEFAULT_TITLE_COPY_MACRO(action_get_title_video_shader_preset_save_list,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE)
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
DEFAULT_TITLE_MACRO(action_get_title_switch_cpu_profile, MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE)
#endif
-#ifdef HAVE_LAKKA_SWITCH
-DEFAULT_TITLE_MACRO(action_get_title_switch_gpu_profile, MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE)
-#endif
-
DEFAULT_TITLE_SEARCH_FILTER_MACRO(action_get_title_deferred_history_list, MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY)
DEFAULT_TITLE_SEARCH_FILTER_MACRO(action_get_title_deferred_favorites_list, MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES)
DEFAULT_TITLE_SEARCH_FILTER_MACRO(action_get_title_deferred_images_list, MENU_ENUM_LABEL_VALUE_GOTO_IMAGES)
@@ -1033,6 +1032,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
{MENU_ENUM_LABEL_DEFERRED_NETPLAY_LAN_SCAN_SETTINGS_LIST, action_get_netplay_lan_scan_settings_list},
#ifdef HAVE_LAKKA
{MENU_ENUM_LABEL_DEFERRED_LAKKA_SERVICES_LIST, action_get_lakka_services_list},
+#endif
+#ifdef HAVE_LAKKA_SWITCH
+ {MENU_ENUM_LABEL_DEFERRED_LAKKA_SWITCH_OPTIONS_LIST, action_get_lakka_switch_options_list},
#endif
{MENU_ENUM_LABEL_DEFERRED_USER_SETTINGS_LIST, action_get_user_settings_list},
{MENU_ENUM_LABEL_DEFERRED_DIRECTORY_SETTINGS_LIST, action_get_directory_settings_list},
@@ -1296,13 +1298,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
action_get_title_core_directory},
{MENU_ENUM_LABEL_LIBRETRO_INFO_PATH,
action_get_title_core_info_directory},
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
{MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
action_get_title_switch_cpu_profile},
-#endif
-#ifdef HAVE_LAKKA_SWITCH
- {MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
- action_get_title_switch_gpu_profile},
#endif
{MENU_ENUM_LABEL_DEFERRED_MANUAL_CONTENT_SCAN_LIST,
action_get_title_manual_content_scan_list},
@@ -1736,15 +1734,10 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_LIBRETRO_INFO_PATH:
BIND_ACTION_GET_TITLE(cbs, action_get_title_core_info_directory);
break;
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_cpu_profile);
break;
-#endif
-#ifdef HAVE_LAKKA_SWITCH
- case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
- BIND_ACTION_GET_TITLE(cbs, action_get_title_switch_gpu_profile);
- break;
#endif
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_title_manual_content_scan_list);
diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c
index 01cbf3fa4a0..b0fdae8c1d8 100644
--- a/menu/drivers/ozone.c
+++ b/menu/drivers/ozone.c
@@ -2055,10 +2055,7 @@ static uintptr_t ozone_entries_icon_get_texture(
case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS:
case MENU_ENUM_LABEL_SETTINGS_SHOW_USER_INTERFACE:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_UI];
-#ifdef HAVE_LAKKA_SWITCH
- case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_POWER];
#endif
@@ -9649,7 +9646,7 @@ static int ozone_list_push(void *data, void *userdata,
false);
}
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
@@ -9657,14 +9654,6 @@ static int ozone_list_push(void *data, void *userdata,
false);
#endif
-#ifdef HAVE_LAKKA_SWITCH
- MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
- info->list,
- MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
- PARSE_ACTION,
- false);
-#endif
-
if (settings->bools.menu_show_configurations && !settings->bools.kiosk_mode_enable)
{
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c
index 5fa944a98bc..3f642d05da1 100644
--- a/menu/drivers/xmb.c
+++ b/menu/drivers/xmb.c
@@ -3255,10 +3255,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS:
case MENU_ENUM_LABEL_SETTINGS_SHOW_USER_INTERFACE:
return xmb->textures.list[XMB_TEXTURE_UI];
-#ifdef HAVE_LAKKA_SWITCH
- case MENU_ENUM_LABEL_SWITCH_GPU_PROFILE:
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
case MENU_ENUM_LABEL_SWITCH_CPU_PROFILE:
return xmb->textures.list[XMB_TEXTURE_POWER];
#endif
@@ -8107,22 +8104,13 @@ static int xmb_list_push(void *data, void *userdata,
false);
}
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
PARSE_ACTION,
false);
#endif
-
-#ifdef HAVE_LAKKA_SWITCH
- MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
- info->list,
- MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
- PARSE_ACTION,
- false);
-#endif
-
if (menu_show_configurations && !kiosk_mode_enable)
{
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h
index 5cd18306a53..9191f48d448 100644
--- a/menu/menu_cbs.h
+++ b/menu/menu_cbs.h
@@ -220,6 +220,7 @@ enum
ACTION_OK_DL_NETPLAY_LOBBY_FILTERS_LIST,
ACTION_OK_DL_NETPLAY_LAN_SCAN_SETTINGS_LIST,
ACTION_OK_DL_LAKKA_SERVICES_LIST,
+ ACTION_OK_DL_LAKKA_SWITCH_OPTIONS_LIST,
ACTION_OK_DL_USER_SETTINGS_LIST,
ACTION_OK_DL_DIRECTORY_SETTINGS_LIST,
ACTION_OK_DL_PRIVACY_SETTINGS_LIST,
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c
index cbc8abc241f..094616d06e6 100644
--- a/menu/menu_displaylist.c
+++ b/menu/menu_displaylist.c
@@ -50,7 +50,7 @@
#include "../core_updater_list.h"
#endif
-#ifdef HAVE_LAKKA_SWITCH
+#ifdef HAVE_LAKKA
#include "../../lakka.h"
#endif
@@ -58,7 +58,7 @@
#include
#endif
-#if defined(HAVE_LAKKA) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
#include "../../switch_performance_profiles.h"
#endif
@@ -9520,6 +9520,25 @@ unsigned menu_displaylist_build_list(
}
}
break;
+#endif
+#ifdef HAVE_LAKKA_SWITCH
+ case DISPLAYLIST_LAKKA_SWITCH_OPTIONS_LIST:
+ {
+ menu_displaylist_build_info_t build_list[] = {
+ {MENU_ENUM_LABEL_SWITCH_OC_ENABLE, PARSE_ONLY_BOOL},
+ {MENU_ENUM_LABEL_SWITCH_CEC_ENABLE, PARSE_ONLY_BOOL},
+ {MENU_ENUM_LABEL_BLUETOOTH_ERTM_DISABLE, PARSE_ONLY_BOOL},
+ };
+
+ for (i = 0; i < ARRAY_SIZE(build_list); i++)
+ {
+ if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
+ build_list[i].enum_idx, build_list[i].parse_type,
+ false) == 0)
+ count++;
+ }
+ }
+ break;
#endif
case DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST:
{
@@ -9895,9 +9914,11 @@ unsigned menu_displaylist_build_list(
count++;
}
#endif
+#ifndef HAVE_LAKKA
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
MENU_ENUM_LABEL_GAMEMODE_ENABLE, PARSE_ONLY_BOOL, false) == 0)
count++;
+#endif /*HAVE_LAKKA?*/
}
break;
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
@@ -10297,6 +10318,9 @@ unsigned menu_displaylist_build_list(
{MENU_ENUM_LABEL_USER_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_DIRECTORY_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_LAKKA_SERVICES, PARSE_ACTION, true},
+#ifdef HAVE_LAKKA_SWITCH
+ {MENU_ENUM_LABEL_LAKKA_SWITCH_OPTIONS, PARSE_ACTION, true},
+#endif
#ifdef HAVE_MIST
{MENU_ENUM_LABEL_STEAM_SETTINGS, PARSE_ACTION, true},
#endif
@@ -10403,7 +10427,9 @@ unsigned menu_displaylist_build_list(
menu_displaylist_build_info_t build_list[] = {
{MENU_ENUM_LABEL_SUSTAINED_PERFORMANCE_MODE, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_CPU_PERFPOWER, PARSE_ACTION},
+#ifdef HAVE_LAKKA
{MENU_ENUM_LABEL_GAMEMODE_ENABLE, PARSE_ONLY_BOOL},
+#endif /*HAVE_LAKKA*/
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)
@@ -11979,7 +12005,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
/* No-op */
break;
#endif
-#ifndef HAVE_LAKKA_SWITCH
#ifdef HAVE_LAKKA
case DISPLAYLIST_CPU_POLICY_LIST:
menu_entries_clear(info->list);
@@ -12080,30 +12105,17 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
break;
}
#endif
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
case DISPLAYLIST_SWITCH_CPU_PROFILE:
{
size_t _len;
unsigned i;
char text[PATH_MAX_LENGTH];
-#ifdef HAVE_LAKKA_SWITCH
- char current_profile[PATH_MAX_LENGTH];
- FILE *profile = NULL;
-#endif
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)/sizeof(SWITCH_CPU_PROFILES[1]);
/* TODO/FIXME - localize */
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch",
1, 90, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
menu_entries_clear(info->list);
-#ifdef HAVE_LAKKA_SWITCH
- profile = popen("cpu-profile get", "r");
- fgets(current_profile, PATH_MAX_LENGTH, profile);
- pclose(profile);
- /* TODO/FIXME - localize */
- _len = strlcpy(text, "Current profile: ", sizeof(text));
- strlcpy(text + _len, current_profile, sizeof(text) - _len);
-#else
{
u32 currentClock = 0;
if (hosversionBefore(8, 0, 0))
@@ -12119,7 +12131,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
_len = strlcpy(text, "Current clock: ", sizeof(text));
snprintf(text + _len, sizeof(text) - _len, "%i", currentClock);
}
-#endif
if (menu_entries_append(info->list,
text, "", 0, MENU_INFO_MESSAGE,
0, 0, NULL))
@@ -12142,51 +12153,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
| MD_FLAG_NEED_CLEAR;
break;
}
-#if defined(HAVE_LAKKA_SWITCH)
- case DISPLAYLIST_SWITCH_GPU_PROFILE:
- {
- size_t _len;
- unsigned i;
- char text[PATH_MAX_LENGTH];
- char current_profile[PATH_MAX_LENGTH];
- FILE *profile = NULL;
- const size_t profiles_count = sizeof(SWITCH_GPU_PROFILES)/sizeof(SWITCH_GPU_PROFILES[1]);
-
- runloop_msg_queue_push("Warning : extended overclocking can damage the Switch",
- 1, 90, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
-
- profile = popen("gpu-profile get", "r");
- fgets(current_profile, PATH_MAX_LENGTH, profile);
- pclose(profile);
-
- menu_entries_clear(info->list);
-
- /* TODO/FIXME - Localize */
- _len = strlcpy(text, "Current profile : ", sizeof(text));
- strlcpy(text + _len, current_profile, sizeof(text) - _len);
-
- if (menu_entries_append(info->list, text, "", 0, MENU_INFO_MESSAGE, 0, 0, NULL))
- count++;
-
- for (i = 0; i < profiles_count; i++)
- {
- char title[PATH_MAX_LENGTH];
- char* profile = SWITCH_GPU_PROFILES[i];
- char* speed = SWITCH_GPU_SPEEDS[i];
- _len = strlcpy(title, profile, sizeof(title));
- snprintf(title + _len, sizeof(title) - _len, " (%s)", speed);
- if (menu_entries_append(info->list, title, "", 0,
- MENU_SET_SWITCH_GPU_PROFILE, 0, i, NULL))
- count++;
- }
-
- info->flags |= MD_FLAG_NEED_REFRESH
- | MD_FLAG_NEED_PUSH
- | MD_FLAG_NEED_CLEAR;
- break;
- }
-#endif /* HAVE_LAKKA_SWITCH */
-#endif /* HAVE_LAKKA_SWITCH || HAVE_LIBNX */
+#endif /* HAVE_LIBNX */
case DISPLAYLIST_MUSIC_LIST:
{
menu_entries_clear(info->list);
@@ -13739,6 +13706,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_MENU_FILE_BROWSER_SETTINGS_LIST:
case DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST:
case DISPLAYLIST_LAKKA_SERVICES_LIST:
+#ifdef HAVE_LAKKA_SWITCH
+ case DISPLAYLIST_LAKKA_SWITCH_OPTIONS_LIST:
+#endif
case DISPLAYLIST_MIDI_SETTINGS_LIST:
case DISPLAYLIST_CRT_SWITCHRES_SETTINGS_LIST:
case DISPLAYLIST_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h
index 3c67655cc80..fadc5f657d3 100644
--- a/menu/menu_displaylist.h
+++ b/menu/menu_displaylist.h
@@ -236,6 +236,9 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST,
DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST,
DISPLAYLIST_LAKKA_SERVICES_LIST,
+#ifdef HAVE_LAKKA_SWITCH
+ DISPLAYLIST_LAKKA_SWITCH_OPTIONS_LIST,
+#endif
DISPLAYLIST_USER_SETTINGS_LIST,
DISPLAYLIST_DIRECTORY_SETTINGS_LIST,
DISPLAYLIST_PRIVACY_SETTINGS_LIST,
@@ -274,10 +277,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_CORE_CONTENT_DIRS,
DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR,
DISPLAYLIST_CORE_SYSTEM_FILES,
-#ifdef HAVE_LAKKA_SWITCH
- DISPLAYLIST_SWITCH_GPU_PROFILE,
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
DISPLAYLIST_SWITCH_CPU_PROFILE,
#endif
DISPLAYLIST_MANUAL_CONTENT_SCAN_LIST,
diff --git a/menu/menu_driver.c b/menu/menu_driver.c
index 846371904d9..5711bae972a 100644
--- a/menu/menu_driver.c
+++ b/menu/menu_driver.c
@@ -73,9 +73,6 @@
#ifdef HAVE_LIBNX
#include
-#endif
-
-#if defined(HAVE_LAKKA) || defined(HAVE_LIBNX)
#include "../switch_performance_profiles.h"
#endif
@@ -6293,11 +6290,9 @@ 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
@@ -6316,11 +6311,9 @@ 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) */
diff --git a/menu/menu_driver.h b/menu/menu_driver.h
index 51d8848fdb6..98803360f1a 100644
--- a/menu/menu_driver.h
+++ b/menu/menu_driver.h
@@ -250,10 +250,7 @@ enum menu_settings_type
MENU_SET_SCREEN_BRIGHTNESS,
-#ifdef HAVE_LAKKA_SWITCH
- MENU_SET_SWITCH_GPU_PROFILE,
-#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#if defined(HAVE_LIBNX)
MENU_SET_SWITCH_CPU_PROFILE,
#endif
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 0af6d50896e..9a4d14023d9 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -21,7 +21,6 @@
#else
#include
#endif
-
#include
#include
#include
@@ -101,6 +100,9 @@
#include "../performance_counters.h"
#include "../setting_list.h"
#include "../lakka.h"
+#ifdef HAVE_LAKKA_SWITCH
+#include "../lakka-switch.h"
+#endif
#include "../retroarch.h"
#include "../gfx/video_display_server.h"
#ifdef HAVE_CHEATS
@@ -313,6 +315,9 @@ enum settings_list_type
SETTINGS_LIST_CORE_UPDATER,
SETTINGS_LIST_NETPLAY,
SETTINGS_LIST_LAKKA_SERVICES,
+#ifdef HAVE_LAKKA_SWITCH
+ SETTINGS_LIST_LAKKA_SWITCH_OPTIONS,
+#endif
SETTINGS_LIST_USER,
SETTINGS_LIST_USER_ACCOUNTS,
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
@@ -7944,6 +7949,7 @@ static void general_write_handler(rarch_setting_t *setting)
else
task_queue_unset_threaded();
break;
+#ifndef HAVE_LAKKA
case MENU_ENUM_LABEL_GAMEMODE_ENABLE:
if (frontend_driver_has_gamemode())
{
@@ -7967,7 +7973,8 @@ static void general_write_handler(rarch_setting_t *setting)
}
}
break;
- case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
+#endif /*HAVE_LAKKA*/
+ case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
core_set_poll_type(*setting->value.target.integer);
break;
case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER:
@@ -8828,6 +8835,45 @@ static void systemd_service_toggle(const char *path, char *unit, bool enable)
}
}
+#ifdef HAVE_LAKKA_SWITCH
+static void switch_oc_enable_toggle_change_handler(rarch_setting_t *setting)
+{
+ FILE* f = fopen(SWITCH_OC_TOGGLE_PATH, "w");
+ if (*setting->value.target.boolean == true) {
+ fprintf(f, "1\n");
+ } else {
+ fprintf(f, "0\n");
+ }
+ fclose(f);
+}
+
+static void switch_cec_enable_toggle_change_handler(rarch_setting_t *setting)
+{
+ if (*setting->value.target.boolean == true) {
+ FILE* f = fopen(SWITCH_CEC_TOGGLE_PATH, "w");
+ fprintf(f, "\n");
+ fclose(f);
+ } else {
+ filestream_delete(SWITCH_CEC_TOGGLE_PATH);
+ }
+
+}
+
+static void bluetooth_ertm_disable_toggle_change_handler(rarch_setting_t *setting)
+{
+ if (*setting->value.target.boolean == true) {
+ FILE* f = fopen(BLUETOOTH_ERTM_TOGGLE_PATH, "w");
+ fprintf(f, "1\n");
+ fclose(f);
+ } else {
+ FILE* f = fopen(BLUETOOTH_ERTM_TOGGLE_PATH, "w");
+ fprintf(f, "0\n");
+ fclose(f);
+ }
+
+}
+#endif
+
static void ssh_enable_toggle_change_handler(rarch_setting_t *setting)
{
systemd_service_toggle(LAKKA_SSH_PATH, (char*)"sshd.service",
@@ -9795,7 +9841,7 @@ static bool setting_append_list(
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_QUIT);
#endif
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
+#ifdef HAVE_LIBNX
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
@@ -9806,15 +9852,6 @@ static bool setting_append_list(
#endif
#if defined(HAVE_LAKKA)
-#ifdef HAVE_LAKKA_SWITCH
- CONFIG_ACTION(
- list, list_info,
- MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
- MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,
- &group_info,
- &subgroup_info,
- parent_group);
-#endif
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_REBOOT,
@@ -10121,7 +10158,6 @@ static bool setting_append_list(
&group_info,
&subgroup_info,
parent_group);
- SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
CONFIG_ACTION(
list, list_info,
@@ -10214,7 +10250,15 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
#endif
-
+#ifdef HAVE_LAKKA_SWITCH
+ CONFIG_ACTION(
+ list, list_info,
+ MENU_ENUM_LABEL_LAKKA_SWITCH_OPTIONS,
+ MENU_ENUM_LABEL_VALUE_LAKKA_SWITCH_OPTIONS,
+ &group_info,
+ &subgroup_info,
+ parent_group);
+#endif
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_PLAYLIST_SETTINGS,
@@ -19047,7 +19091,6 @@ static bool setting_append_list(
#endif
#ifdef HAVE_LAKKA
-#ifndef HAVE_LAKKA_SWITCH
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_CPU_PERFPOWER,
@@ -19056,8 +19099,7 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
#endif
-#endif
-
+#ifndef HAVE_LAKKA
if (frontend_driver_has_gamemode())
CONFIG_BOOL(
list, list_info,
@@ -19077,6 +19119,7 @@ static bool setting_append_list(
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
+#endif /*HAVE_LAKKA*/
case SETTINGS_LIST_WIFI_MANAGEMENT:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS),
@@ -21858,7 +21901,6 @@ static bool setting_append_list(
START_SUB_GROUP(list, list_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES),
&group_info, &subgroup_info, parent_group);
-
CONFIG_BOOL(
list, list_info,
&settings->bools.ssh_enable,
@@ -21947,6 +21989,71 @@ static bool setting_append_list(
#endif
}
break;
+#ifdef HAVE_LAKKA_SWITCH
+ case SETTINGS_LIST_LAKKA_SWITCH_OPTIONS:
+ {
+ START_GROUP(list, list_info, &group_info,
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LAKKA_SWITCH_OPTIONS),
+ parent_group);
+
+ parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
+
+ START_SUB_GROUP(list, list_info,
+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LAKKA_SWITCH_OPTIONS),
+ &group_info, &subgroup_info, parent_group);
+
+ CONFIG_BOOL(
+ list, list_info,
+ &settings->bools.switch_oc,
+ MENU_ENUM_LABEL_SWITCH_OC_ENABLE,
+ MENU_ENUM_LABEL_VALUE_SWITCH_OC_ENABLE,
+ DEFAULT_SWITCH_OC,
+ MENU_ENUM_LABEL_VALUE_OFF,
+ MENU_ENUM_LABEL_VALUE_ON,
+ &group_info,
+ &subgroup_info,
+ parent_group,
+ general_write_handler,
+ general_read_handler,
+ SD_FLAG_NONE);
+ (*list)[list_info->index - 1].change_handler = switch_oc_enable_toggle_change_handler;
+
+ CONFIG_BOOL(
+ list, list_info,
+ &settings->bools.switch_cec,
+ MENU_ENUM_LABEL_SWITCH_CEC_ENABLE,
+ MENU_ENUM_LABEL_VALUE_SWITCH_CEC_ENABLE,
+ DEFAULT_SWITCH_CEC,
+ MENU_ENUM_LABEL_VALUE_OFF,
+ MENU_ENUM_LABEL_VALUE_ON,
+ &group_info,
+ &subgroup_info,
+ parent_group,
+ general_write_handler,
+ general_read_handler,
+ SD_FLAG_NONE);
+ (*list)[list_info->index - 1].change_handler = switch_cec_enable_toggle_change_handler;
+
+ CONFIG_BOOL(
+ list, list_info,
+ &settings->bools.bluetooth_ertm_disable,
+ MENU_ENUM_LABEL_BLUETOOTH_ERTM_DISABLE,
+ MENU_ENUM_LABEL_VALUE_BLUETOOTH_ERTM_DISABLE,
+ DEFAULT_BLUETOOTH_ERTM,
+ MENU_ENUM_LABEL_VALUE_OFF,
+ MENU_ENUM_LABEL_VALUE_ON,
+ &group_info,
+ &subgroup_info,
+ parent_group,
+ general_write_handler,
+ general_read_handler,
+ SD_FLAG_NONE);
+ (*list)[list_info->index - 1].change_handler = bluetooth_ertm_disable_toggle_change_handler;
+ END_SUB_GROUP(list, list_info, parent_group);
+ END_GROUP(list, list_info, parent_group);
+ }
+ break;
+#endif
case SETTINGS_LIST_USER:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER_SETTINGS),
@@ -23159,6 +23266,9 @@ static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_inf
SETTINGS_LIST_CORE_UPDATER,
SETTINGS_LIST_NETPLAY,
SETTINGS_LIST_LAKKA_SERVICES,
+#ifdef HAVE_LAKKA_SWITCH
+ SETTINGS_LIST_LAKKA_SWITCH_OPTIONS,
+#endif
SETTINGS_LIST_USER,
SETTINGS_LIST_USER_ACCOUNTS,
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
diff --git a/msg_hash.h b/msg_hash.h
index 78e2646b671..99fddc252f0 100644
--- a/msg_hash.h
+++ b/msg_hash.h
@@ -1966,6 +1966,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST,
MENU_ENUM_LABEL_DEFERRED_NETPLAY_LAN_SCAN_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_LAKKA_SERVICES_LIST,
+ MENU_ENUM_LABEL_DEFERRED_LAKKA_SWITCH_OPTIONS_LIST,
MENU_ENUM_LABEL_DEFERRED_USER_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_DIRECTORY_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_PRIVACY_SETTINGS_LIST,
@@ -2323,6 +2324,11 @@ enum msg_hash_enums
MENU_LABEL(BLUETOOTH_ENABLE),
MENU_LABEL(LOCALAP_ENABLE),
MENU_LBL_H(TIMEZONE),
+#endif
+#ifdef HAVE_LAKKA_SWITCH
+ MENU_LABEL(SWITCH_OC_ENABLE),
+ MENU_LABEL(SWITCH_CEC_ENABLE),
+ MENU_LABEL(BLUETOOTH_ERTM_DISABLE),
#endif
MENU_LABEL(NETPLAY_DELAY_FRAMES), /* deprecated */
MENU_LABEL(NETPLAY_PUBLIC_ANNOUNCE),
@@ -3147,6 +3153,9 @@ enum msg_hash_enums
MENU_LABEL(CORE_UPDATER_SETTINGS),
MENU_LABEL(LAKKA_SERVICES),
+#ifdef HAVE_LAKKA_SWITCH
+ MENU_LABEL(LAKKA_SWITCH_OPTIONS),
+#endif
MENU_LBL_H(SHADER_APPLY_CHANGES),
MENU_LBL_H(SHADER_WATCH_FOR_CHANGES),
MENU_LABEL(VIDEO_SHADER_REMEMBER_LAST_DIR),
diff --git a/retroarch.c b/retroarch.c
index d7a279e3370..4d6f9e437e8 100644
--- a/retroarch.c
+++ b/retroarch.c
@@ -90,9 +90,6 @@
#ifdef HAVE_LIBNX
#include
-#endif
-
-#if defined(HAVE_LAKKA) || defined(HAVE_LIBNX)
#include "switch_performance_profiles.h"
#endif
@@ -1050,11 +1047,9 @@ 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, enum driver_lifetime_flags lifetime_flags)
@@ -1153,11 +1148,9 @@ void driver_uninit(int flags, enum driver_lifetime_flags lifetime_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 */
}
static void retroarch_deinit_drivers(struct retro_callbacks *cbs)
diff --git a/runloop.c b/runloop.c
index 67d017ac22c..f2516e0f428 100644
--- a/runloop.c
+++ b/runloop.c
@@ -97,9 +97,6 @@
#ifdef HAVE_LIBNX
#include
-#endif
-
-#if defined(HAVE_LAKKA) || defined(HAVE_LIBNX)
#include "switch_performance_profiles.h"
#endif
@@ -4794,19 +4791,15 @@ void runloop_pause_checks(void)
command_event(CMD_EVENT_PRESENCE_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)
diff --git a/switch_performance_profiles.h b/switch_performance_profiles.h
index 5d07ba6ed59..d51d645d3d2 100644
--- a/switch_performance_profiles.h
+++ b/switch_performance_profiles.h
@@ -17,52 +17,9 @@
#ifndef __SWITCH_PERFORMANCE_PROFILES_H
#define __SWITCH_PERFORMANCE_PROFILES_H
-#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
-#ifdef HAVE_LAKKA_SWITCH
-static char *SWITCH_GPU_PROFILES[] = {
- "Docked Stock +2",
- "Docked Stock +1",
- "Docked Stock Mode",
- "Handheld Boost +3",
- "Handheld Boost +2",
- "Handheld Boost +1",
- "Handheld Boost Mode",
- "Handheld Stock +1",
- "Handheld Stock Mode",
- "Powersaving +2",
- "Powersaving +1",
- "Powersaving Mode",
-};
-
-static char *SWITCH_GPU_SPEEDS[] = {
- "921 Mhz",
- "844 Mhz",
- "768 Mhz",
- "691 Mhz",
- "614 Mhz",
- "537 Mhz",
- "460 Mhz",
- "384 Mhz",
- "307 Mhz",
- "230 Mhz",
- "153 Mhz",
- "76 Mhz"
-};
-#endif
+#if defined(HAVE_LIBNX)
static char *SWITCH_CPU_PROFILES[] = {
-#ifndef HAVE_LIBNX
- "Max Overdrive +3",
- "Max Overdrive +2",
- "Max Overdrive +1",
- "Maximum Performance",
- "High Performance",
- "Boost Performance",
- "Stock Performance",
- "Powersaving Mode 1",
- "Powersaving Mode 2",
- "Powersaving Mode 3",
-#else
"Maximum Performance",
"High Performance",
"Boost Performance",
@@ -70,25 +27,12 @@ static char *SWITCH_CPU_PROFILES[] = {
"Powersaving Mode 1",
"Powersaving Mode 2",
"Powersaving Mode 3",
-#endif
};
#define SWITCH_DEFAULT_CPU_PROFILE 3 /* Stock Performance */
#define LIBNX_MAX_CPU_PROFILE 0 /* Max Performance */
static char *SWITCH_CPU_SPEEDS[] = {
-#ifndef HAVE_LIBNX
- " **UNSTABLE** 2091 MHz",
- " **UNSTABLE** 1989 MHz",
- " **UNSTABLE** 1887 MHz",
- "1785 MHz",
- "1581 MHz",
- "1224 MHz",
- "1020 MHz",
- "918 MHz",
- "816 MHz",
- "714 MHz"
-#else
"1785 MHz",
"1581 MHz",
"1224 MHz",
@@ -96,11 +40,8 @@ static char *SWITCH_CPU_SPEEDS[] = {
"918 MHz",
"816 MHz",
"714 MHz"
-#endif
};
-#ifdef HAVE_LIBNX
-// not used in switch-lakka
static unsigned SWITCH_CPU_SPEEDS_VALUES[] = {
1785000000,
1581000000,
@@ -110,7 +51,6 @@ static unsigned SWITCH_CPU_SPEEDS_VALUES[] = {
816000000,
714000000
};
-#endif
#endif