Fix Switch Issue's in upstream 5.x (#1888)

* Retroarch: Hack in extra repo until PR is merged and remove old patches

* ppsspp: Fix ffmpeg build script

* Switch: Retroarch: Update PR version
This commit is contained in:
GavinDarkglider 2023-10-04 15:42:20 -07:00 committed by GitHub
parent 85c28da44b
commit cae4ac3f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 126 additions and 3322 deletions

View File

@ -51,10 +51,10 @@ elif [ "${TARGET_ARCH}" = "aarch64" ]; then
fi
pre_make_target() {
#This script should work on any board that has issues with system ffmpeg in ppsspp
if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
. ${PKG_BUILD}/ffmpeg/linux_arm64.sh
. ${PKG_BUILD}/ffmpeg/linux_lakka.sh
fi
find ${PKG_BUILD} -name flags.make -exec sed -i "s:isystem :I:g" \{} \;
find ${PKG_BUILD} -name build.ninja -exec sed -i "s:isystem :I:g" \{} \;
}

View File

@ -1,17 +1,11 @@
diff -Naur ppsspp-845b6b7f3e8060c1ab462f3680e371082ff4253e/ffmpeg/linux_arm64.sh ppsspp-845b6b7f3e8060c1ab462f3680e371082ff4253e-2/ffmpeg/linux_arm64.sh
--- ppsspp-845b6b7f3e8060c1ab462f3680e371082ff4253e/ffmpeg/linux_arm64.sh 2023-06-04 05:30:16.719535828 +0200
+++ ppsspp-845b6b7f3e8060c1ab462f3680e371082ff4253e-2/ffmpeg/linux_arm64.sh 2023-06-04 07:28:16.981119457 +0200
@@ -2,13 +2,29 @@
set -e
-GENERAL="\
- --enable-cross-compile \
- --extra-libs="-lgcc" \
- --arch=aarch64 \
- --cc=aarch64-linux-gnu-gcc \
- --cross-prefix=aarch64-linux-gnu- \
- --nm=aarch64-linux-gnu-gcc-nm"
diff -Naur ppsspp-d18dea4f6a8064fef7b8a36c3eaf1012e6b25d9c/ffmpeg/linux_lakka.sh ppsspp-d18dea4f6a8064fef7b8a36c3eaf1012e6b25d9c-2/ffmpeg/linux_lakka.sh
--- ppsspp-d18dea4f6a8064fef7b8a36c3eaf1012e6b25d9c/ffmpeg/linux_lakka.sh 1970-01-01 01:00:00.000000000 +0100
+++ ppsspp-d18dea4f6a8064fef7b8a36c3eaf1012e6b25d9c-2/ffmpeg/linux_lakka.sh 2023-09-30 21:39:12.419941225 +0200
@@ -0,0 +1,130 @@
+#!/bin/bash
+
+set -e
+
+#GENERAL="\
+# --enable-cross-compile \
+# --extra-libs="-lgcc" \
@ -20,49 +14,121 @@ diff -Naur ppsspp-845b6b7f3e8060c1ab462f3680e371082ff4253e/ffmpeg/linux_arm64.sh
+# --cross-prefix=aarch64-linux-gnu- \
+# --nm=aarch64-linux-gnu-gcc-nm"
+
+#GENERAL="\
+# --cpu=\"${TARGET_CPU}\" \
+# --arch=\"${TARGET_ARCH}\" \
+# --enable-cross-compile \
+# --sysinclude=\"${SYSROOT_PREFIX}/usr/include\" \
+# --nm=\"${NM}\" \
+# --ar=\"${AR}\" \
+# --as=\"${CC}\" \
+# --cc=\"${CC}\" \
+# --ld=\"${CC}\" \
+# --host-cc=\"${HOST_CC}\" \
+# --extra-libs=\"-lgcc\""
+GENERAL="\
+ --cpu=${TARGET_CPU} \
+ --arch=${TARGET_ARCH} \
+ --enable-cross-compile \
+ --sysinclude=${SYSROOT_PREFIX}/usr/include \
+ --nm=${NM} \
+ --ar=${AR} \
+ --as=${CC} \
+ --cc=${CC} \
+ --ld=${CC} \
+ --host-cc=${HOST_CC} \
+ --extra-libs=-lgcc"
+
+#GENERAL="--cpu="cortex-a57" --arch="aarch64" --enable-cross-compile --sysinclude="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/aarch64-libreelec-linux-gnu/sysroot/usr/include" --nm="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-nm" --ar="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-ar" --as="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-gcc" --cc="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-gcc" --ld="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-gcc" --host-cc="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/host-gcc" --extra-libs="-lgcc""
+
+#~ GENERAL="\
+ #~ --enable-cross-compile \
+ #~ --extra-libs="-lgcc" \
+ #~ --arch=arm \
+ #~ --cc=arm-linux-gnueabi-gcc \
+ #~ --cross-prefix=arm-linux-gnueabi- \
+ #~ --nm=arm-linux-gnueabi-nm"
+
+MODULES="\
+ --disable-avdevice \
+ --disable-filters \
+ --disable-programs \
+ --disable-network \
+ --disable-avfilter \
+ --disable-postproc \
+ --disable-encoders \
+ --disable-protocols \
+ --disable-hwaccels \
+ --disable-doc"
+
+VIDEO_DECODERS="\
+ --enable-decoder=h264 \
+ --enable-decoder=mpeg4 \
+ --enable-decoder=mpeg2video \
+ --enable-decoder=mjpeg \
+ --enable-decoder=mjpegb"
+
+AUDIO_DECODERS="\
+ --enable-decoder=aac \
+ --enable-decoder=aac_latm \
+ --enable-decoder=atrac3 \
+ --enable-decoder=atrac3p \
+ --enable-decoder=mp3 \
+ --enable-decoder=pcm_s16le \
+ --enable-decoder=pcm_s8"
+
+DEMUXERS="\
+ --enable-demuxer=h264 \
+ --enable-demuxer=m4v \
+ --enable-demuxer=mpegvideo \
+ --enable-demuxer=mpegps \
+ --enable-demuxer=mp3 \
+ --enable-demuxer=avi \
+ --enable-demuxer=aac \
+ --enable-demuxer=pmp \
+ --enable-demuxer=oma \
+ --enable-demuxer=pcm_s16le \
+ --enable-demuxer=pcm_s8 \
+ --enable-demuxer=wav"
+
+VIDEO_ENCODERS="\
+ --enable-encoder=huffyuv \
+ --enable-encoder=ffv1 \
+ --enable-encoder=mjpeg"
+
+AUDIO_ENCODERS="\
+ --enable-encoder=pcm_s16le"
+
+MUXERS="\
+ --enable-muxer=avi"
+
+
+GENERAL="--cpu="cortex-a57" --arch="aarch64" --enable-cross-compile --sysinclude="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/aarch64-libreelec-linux-gnu/sysroot/usr/include" --nm="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-nm" --ar="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-ar" --as="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-gcc" --cc="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-gcc" --ld="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/aarch64-libreelec-linux-gnu-gcc" --host-cc="/home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64-5.0-devel/toolchain/bin/host-gcc" --extra-libs="-lgcc""
#~ GENERAL="\
#~ --enable-cross-compile \
@@ -83,10 +99,13 @@
function build_ARM64
{
+PARSERS="\
+ --enable-parser=h264 \
+ --enable-parser=mpeg4video \
+ --enable-parser=mpegaudio \
+ --enable-parser=mpegvideo \
+ --enable-parser=aac \
+ --enable-parser=aac_latm"
+
+
+function build_ARM64
+{
+PWD="$(pwd)"
+ORIG_PWD="${PWD}"
+cd ${PKG_BUILD}/ffmpeg
./configure --target-os=linux \
--prefix=./linux/aarch64 \
${GENERAL} \
- --extra-cflags=" -O3 -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 " \
+./configure --target-os=linux \
+ --prefix=./linux/aarch64 \
+ ${GENERAL} \
+ --extra-cflags=" -O3 -fasm -Wno-psabi -mno-outline-atomics -fno-short-enums -fno-strict-aliasing -finline-limit=300 " \
--disable-shared \
--enable-static \
--enable-zlib \
@@ -102,8 +121,11 @@
${PARSERS}
make clean
make install
+ --disable-shared \
+ --enable-static \
+ --enable-zlib \
+ --enable-pic \
+ --disable-everything \
+ ${MODULES} \
+ ${VIDEO_DECODERS} \
+ ${AUDIO_DECODERS} \
+ ${VIDEO_ENCODERS} \
+ ${AUDIO_ENCODERS} \
+ ${DEMUXERS} \
+ ${MUXERS} \
+ ${PARSERS}
+make clean
+make install
+cd "${ORIG_PWD}"
+PWD=""
+ORIG_PWD=""
}
build_ARM64
-echo Linux ARM builds finished
+}
+
+build_ARM64
+
+echo Linux ARM64 build finished

View File

@ -1,7 +1,15 @@
PKG_NAME="retroarch"
PKG_VERSION="6c2cc456284fcfa6fa5f94664950926c020d2f7b"
#HACK waiting for upstream PR #15754
if [ "${DEVICE}" = "Switch" ]; then
PKG_VERSION="ae4b13fc390f8cebf414efdf054572f1ef0c98ee"
fi
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/libretro/RetroArch"
#HACK waiting for upstream PR #15754
if [ "${DEVICE}" = "Switch" ]; then
PKG_SITE="https://github.com/libretro/RetroArch"
fi
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain freetype zlib ffmpeg libass libvdpau libxkbcommon glsl_shaders slang_shaders systemd libpng fontconfig"
PKG_LONGDESC="Reference frontend for the libretro API."

View File

@ -1,107 +0,0 @@
From b96c973964f84a1815633be3c7bd6b3320748b2f Mon Sep 17 00:00:00 2001
From: Ronald Brown <rbrown4014@yahoo.com>
Date: Mon, 30 Jan 2023 08:09:53 -0800
Subject: [PATCH 2/7] Retroarch: Lakka: Remove Gamemode from Lakka Builds
---
menu/cbs/menu_cbs_sublabel.c | 4 ++++
menu/menu_displaylist.c | 4 ++++
menu/menu_setting.c | 5 ++++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
index c13741c31c..3344b0a4da 100644
--- a/menu/cbs/menu_cbs_sublabel.c
+++ b/menu/cbs/menu_cbs_sublabel.c
@@ -1160,11 +1160,13 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_discord_allow,
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_switch_cpu_profile, MENU_ENUM_SUBLABEL_SWITCH_CPU_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)
@@ -4948,9 +4950,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_switch_cpu_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/menu_displaylist.c b/menu/menu_displaylist.c
index a21c200af5..f6af4a9148 100644
--- a/menu/menu_displaylist.c
+++ b/menu/menu_displaylist.c
@@ -9482,9 +9482,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:
@@ -9966,7 +9968,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++)
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 1f024440f5..5e8e514331 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -8050,6 +8050,7 @@ static void general_write_handler(rarch_setting_t *setting)
task_queue_unset_threaded();
}
break;
+#ifndef HAVE_LAKKA
case MENU_ENUM_LABEL_GAMEMODE_ENABLE:
if (frontend_driver_has_gamemode())
{
@@ -8074,7 +8075,7 @@ static void general_write_handler(rarch_setting_t *setting)
}
}
break;
-
+#endif /*HAVE_LAKKA*/
case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
core_set_poll_type(*setting->value.target.integer);
break;
@@ -18578,6 +18579,7 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
#endif
+#ifndef HAVE_LAKKA
if (frontend_driver_has_gamemode())
CONFIG_BOOL(
list, list_info,
@@ -18597,6 +18599,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),
--
2.25.1

View File

@ -1,24 +0,0 @@
From 901f0feb8b6b97b445b0623cd5d105544911f060 Mon Sep 17 00:00:00 2001
From: Ronald Brown <rbrown4014@yahoo.com>
Date: Mon, 30 Jan 2023 08:46:42 -0800
Subject: [PATCH 3/7] Lakka: Always show Power Management Settings menu
---
menu/menu_setting.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 5e8e514331..89fdda3fe9 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -10315,7 +10315,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,
--
2.25.1

View File

@ -1,479 +0,0 @@
From f1898216c4aaf2a6f508ff04e88503137b627248 Mon Sep 17 00:00:00 2001
From: Ronald Brown <rbrown4014@yahoo.com>
Date: Mon, 30 Jan 2023 08:47:30 -0800
Subject: [PATCH 4/7] Lakka: Switch: Add Nintendo Switch Options List, with
first option to enable overclocking.
---
configuration.h | 3 ++
intl/msg_hash_lbl.h | 15 +++++++
intl/msg_hash_us.h | 18 ++++++++
lakka-switch.h | 21 ++++++++++
menu/cbs/menu_cbs_deferred_push.c | 6 +++
menu/cbs/menu_cbs_ok.c | 13 ++++++
menu/cbs/menu_cbs_sublabel.c | 12 ++++++
menu/cbs/menu_cbs_title.c | 6 +++
menu/menu_cbs.h | 1 +
menu/menu_displaylist.c | 23 +++++++++++
menu/menu_displaylist.h | 3 ++
menu/menu_setting.c | 68 +++++++++++++++++++++++++++++--
msg_hash.h | 7 ++++
13 files changed, 193 insertions(+), 3 deletions(-)
create mode 100644 lakka-switch.h
diff --git a/configuration.h b/configuration.h
index 3619ca7f0a..69984fed87 100644
--- a/configuration.h
+++ b/configuration.h
@@ -931,6 +931,9 @@ typedef struct settings
bool screenshots_in_content_dir;
bool systemfiles_in_content_dir;
bool ssh_enable;
+#ifdef HAVE_LAKKA_SWITCH
+ bool switch_oc;
+#endif
bool samba_enable;
bool bluetooth_enable;
bool localap_enable;
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
index fbc3326315..fbe296a792 100644
--- a/intl/msg_hash_lbl.h
+++ b/intl/msg_hash_lbl.h
@@ -3481,6 +3481,21 @@ 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"
+ )
+#endif
MSG_HASH(
MENU_ENUM_LABEL_START_CORE,
"start_core"
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
index 85db8480fd..062b454d0a 100644
--- a/intl/msg_hash_us.h
+++ b/intl/msg_hash_us.h
@@ -14971,6 +14971,24 @@ 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"
+ )
+#endif
MSG_HASH(
MSG_LOCALAP_SWITCHING_OFF,
"Switching off Wi-Fi Access Point."
diff --git a/lakka-switch.h b/lakka-switch.h
new file mode 100644
index 0000000000..7525b22286
--- /dev/null
+++ b/lakka-switch.h
@@ -0,0 +1,21 @@
+/* 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __RARCH_LAKKA_SWITCH_H
+#define __RARCH_LAKKA_SWITCH_H
+
+#define SWITCH_OC_TOGGLE_PATH "/sys/kernel/tegra_cpufreq/overclock"
+
+#endif
diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c
index 17c53d8758..ae9fca0fd7 100644
--- a/menu/cbs/menu_cbs_deferred_push.c
+++ b/menu/cbs/menu_cbs_deferred_push.c
@@ -218,6 +218,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)
@@ -737,6 +740,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},
diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c
index 6104dc6e37..668d49b8ff 100644
--- a/menu/cbs/menu_cbs_ok.c
+++ b/menu/cbs/menu_cbs_ok.c
@@ -447,6 +447,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:
@@ -1662,6 +1666,9 @@ int generic_action_ok_displaylist_push(const char *path,
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:
@@ -5888,6 +5895,9 @@ DEFAULT_ACTION_OK_FUNC(action_ok_cheevos_appearance_list, ACTION_OK_DL_CHEEVOS_A
DEFAULT_ACTION_OK_FUNC(action_ok_cheevos_visibility_list, ACTION_OK_DL_CHEEVOS_VISIBILITY_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_updater_list, ACTION_OK_DL_UPDATER_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_lakka_services, ACTION_OK_DL_LAKKA_SERVICES_LIST)
+#ifdef HAVE_LAKKA_SWITCH
+DEFAULT_ACTION_OK_FUNC(action_ok_lakka_switch_options, ACTION_OK_DL_LAKKA_SWITCH_OPTIONS_LIST)
+#endif
DEFAULT_ACTION_OK_FUNC(action_ok_user_list, ACTION_OK_DL_USER_SETTINGS_LIST)
DEFAULT_ACTION_OK_FUNC(action_ok_netplay_sublist, ACTION_OK_DL_NETPLAY)
DEFAULT_ACTION_OK_FUNC(action_ok_directory_list, ACTION_OK_DL_DIRECTORY_SETTINGS_LIST)
@@ -8485,6 +8495,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},
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
index 3344b0a4da..d3e5a46d74 100644
--- a/menu/cbs/menu_cbs_sublabel.c
+++ b/menu/cbs/menu_cbs_sublabel.c
@@ -366,6 +366,10 @@ 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)
+#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)
@@ -4856,6 +4860,14 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CPU_PERF_MODE:
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;
#endif
case MENU_ENUM_LABEL_USER_LANGUAGE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_user_language);
diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c
index b24d740949..905722736c 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)
@@ -1031,6 +1034,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},
diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h
index 85a5e95561..57f11cf23b 100644
--- a/menu/menu_cbs.h
+++ b/menu/menu_cbs.h
@@ -217,6 +217,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 f6af4a9148..8544609b38 100644
--- a/menu/menu_displaylist.c
+++ b/menu/menu_displaylist.c
@@ -9099,6 +9099,23 @@ 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},
+ };
+
+ 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:
{
@@ -9854,6 +9871,9 @@ unsigned menu_displaylist_build_list(
{MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS, PARSE_ACTION, true},
#endif
{MENU_ENUM_LABEL_LAKKA_SERVICES, PARSE_ACTION, true},
+#ifdef HAVE_LAKKA_SWITCH
+ {MENU_ENUM_LABEL_LAKKA_SWITCH_OPTIONS, PARSE_ACTION, true},
+#endif
{MENU_ENUM_LABEL_PLAYLIST_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_USER_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_DIRECTORY_SETTINGS, PARSE_ACTION, true},
@@ -13258,6 +13278,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 af54c0cb7b..44b2f068af 100644
--- a/menu/menu_displaylist.h
+++ b/menu/menu_displaylist.h
@@ -230,6 +230,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,
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 89fdda3fe9..09af706203 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -21,7 +21,6 @@
#else
#include <unistd.h>
#endif
-
#include <libretro.h>
#include <lists/file_list.h>
#include <file/file_path.h>
@@ -98,6 +97,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
@@ -311,6 +313,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,
@@ -9067,6 +9072,19 @@ 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);
+}
+#endif
+
static void ssh_enable_toggle_change_handler(rarch_setting_t *setting)
{
systemd_service_toggle(LAKKA_SSH_PATH, (char*)"sshd.service",
@@ -10407,7 +10425,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,
@@ -21277,7 +21303,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,
@@ -21366,6 +21391,40 @@ 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,
+ true,
+ 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;
+
+ 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),
@@ -22578,6 +22637,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 88f3c85d61..861881024b 100644
--- a/msg_hash.h
+++ b/msg_hash.h
@@ -1914,6 +1914,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,
@@ -2247,6 +2248,9 @@ 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),
#endif
MENU_LABEL(NETPLAY_DELAY_FRAMES), /* deprecated */
MENU_LABEL(NETPLAY_PUBLIC_ANNOUNCE),
@@ -3048,6 +3052,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),
--
2.25.1

View File

@ -1,106 +0,0 @@
From 2a89b3e4925358c926c5e0848e149e2aa9c4a923 Mon Sep 17 00:00:00 2001
From: Ronald Brown <rbrown4014@yahoo.com>
Date: Wed, 1 Feb 2023 18:52:43 -0800
Subject: [PATCH 5/7] Sort Me, working loading from config
---
config.def.h | 4 +++-
configuration.c | 24 +++++++++++++++++++-----
menu/menu_setting.c | 2 +-
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/config.def.h b/config.def.h
index fc9ff578ba..fcb16ef070 100644
--- a/config.def.h
+++ b/config.def.h
@@ -176,7 +176,9 @@
#define DEFAULT_USER_LANGUAGE 0
#define DEFAULT_GAMEMODE_ENABLE true
-
+#ifdef HAVE_LAKKA_SWITCH
+#define DEFAULT_SWITCH_OC 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 665e6d61d2..202de4ff24 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
+
+#ifdef HAVE_LIBNX
#include "switch_performance_profiles.h"
#endif
@@ -2069,8 +2073,12 @@ 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);
+#endif
#ifdef ANDROID
SETTING_BOOL("android_input_disconnect_workaround", &settings->bools.android_input_disconnect_workaround, true, false, false);
#endif
@@ -2703,7 +2711,6 @@ void config_set_defaults(void *data)
configuration_set_bool(settings, settings->bools.localap_enable, false);
load_timezone(settings->arrays.timezone);
#endif
-
#ifdef HAVE_MENU
if (first_initialized)
configuration_set_bool(settings,
@@ -3832,7 +3839,6 @@ static bool config_load_file(global_t *global,
configuration_set_bool(settings,
settings->bools.bluetooth_enable, filestream_exists(LAKKA_BLUETOOTH_PATH));
#endif
-
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL) &&
config_get_path(conf, "savefile_directory", tmp_str, sizeof(tmp_str)))
{
@@ -3887,7 +3893,15 @@ static bool config_load_file(global_t *global,
extern void libnx_apply_overclock();
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);
+#endif
frontend_driver_set_sustained_performance_mode(settings->bools.sustained_performance_mode);
recording_driver_update_streaming_url();
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 09af706203..91bc6f70f3 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -21409,7 +21409,7 @@ static bool setting_append_list(
&settings->bools.switch_oc,
MENU_ENUM_LABEL_SWITCH_OC_ENABLE,
MENU_ENUM_LABEL_VALUE_SWITCH_OC_ENABLE,
- true,
+ DEFAULT_SWITCH_OC,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
--
2.25.1

View File

@ -1,218 +0,0 @@
From dda90500a8492dec866cb0a8a4f2b37aad3aa3fc Mon Sep 17 00:00:00 2001
From: Ronald Brown <rbrown4014@yahoo.com>
Date: Sat, 4 Feb 2023 22:36:45 -0800
Subject: [PATCH 6/7] Lakka-Switch: Add CEC Toggle
---
config.def.h | 1 +
configuration.c | 8 ++++++++
configuration.h | 1 +
intl/msg_hash_lbl.h | 4 ++++
intl/msg_hash_us.h | 8 ++++++++
lakka-switch.h | 11 +++++++++++
menu/cbs/menu_cbs_sublabel.c | 4 ++++
menu/menu_displaylist.c | 1 +
menu/menu_setting.c | 28 ++++++++++++++++++++++++++++
msg_hash.h | 1 +
10 files changed, 67 insertions(+)
diff --git a/config.def.h b/config.def.h
index fcb16ef070..24aacf2943 100644
--- a/config.def.h
+++ b/config.def.h
@@ -178,6 +178,7 @@
#define DEFAULT_GAMEMODE_ENABLE true
#ifdef HAVE_LAKKA_SWITCH
#define DEFAULT_SWITCH_OC false
+#define DEFAULT_SWITCH_CEC true
#endif
#if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN)
#define DEFAULT_MOUSE_ENABLE true
diff --git a/configuration.c b/configuration.c
index 202de4ff24..7130d0432d 100644
--- a/configuration.c
+++ b/configuration.c
@@ -2078,6 +2078,7 @@ static struct config_bool_setting *populate_settings_bool(
#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);
#endif
#ifdef ANDROID
SETTING_BOOL("android_input_disconnect_workaround", &settings->bools.android_input_disconnect_workaround, true, false, false);
@@ -3901,6 +3902,13 @@ static bool config_load_file(global_t *global,
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);
+ }
#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 69984fed87..882af40a04 100644
--- a/configuration.h
+++ b/configuration.h
@@ -933,6 +933,7 @@ typedef struct settings
bool ssh_enable;
#ifdef HAVE_LAKKA_SWITCH
bool switch_oc;
+ bool switch_cec;
#endif
bool samba_enable;
bool bluetooth_enable;
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
index fbe296a792..1a026f1d51 100644
--- a/intl/msg_hash_lbl.h
+++ b/intl/msg_hash_lbl.h
@@ -3495,6 +3495,10 @@ MSG_HASH(
MENU_ENUM_LABEL_SWITCH_OC_ENABLE,
"Switch_OC_enable"
)
+MSG_HASH(
+ MENU_ENUM_LABEL_SWITCH_CEC_ENABLE,
+ "Switch_CEC_enable"
+ )
#endif
MSG_HASH(
MENU_ENUM_LABEL_START_CORE,
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
index 062b454d0a..a655217a80 100644
--- a/intl/msg_hash_us.h
+++ b/intl/msg_hash_us.h
@@ -14988,6 +14988,14 @@ 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"
+ )
#endif
MSG_HASH(
MSG_LOCALAP_SWITCHING_OFF,
diff --git a/lakka-switch.h b/lakka-switch.h
index 7525b22286..fe037a0da1 100644
--- a/lakka-switch.h
+++ b/lakka-switch.h
@@ -17,5 +17,16 @@
#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 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_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
index d3e5a46d74..f3a39dd519 100644
--- a/menu/cbs/menu_cbs_sublabel.c
+++ b/menu/cbs/menu_cbs_sublabel.c
@@ -369,6 +369,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_timezone, MENU_
#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)
#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)
@@ -4868,6 +4869,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
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;
#endif
case MENU_ENUM_LABEL_USER_LANGUAGE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_user_language);
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c
index 8544609b38..c23808d904 100644
--- a/menu/menu_displaylist.c
+++ b/menu/menu_displaylist.c
@@ -9105,6 +9105,7 @@ unsigned menu_displaylist_build_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},
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 91bc6f70f3..5a444aef90 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -9083,6 +9083,18 @@ static void switch_oc_enable_toggle_change_handler(rarch_setting_t *setting)
}
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);
+ }
+
+}
#endif
static void ssh_enable_toggle_change_handler(rarch_setting_t *setting)
@@ -21419,6 +21431,22 @@ static bool setting_append_list(
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;
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
diff --git a/msg_hash.h b/msg_hash.h
index 861881024b..990a0564fa 100644
--- a/msg_hash.h
+++ b/msg_hash.h
@@ -2251,6 +2251,7 @@ enum msg_hash_enums
#endif
#ifdef HAVE_LAKKA_SWITCH
MENU_LABEL(SWITCH_OC_ENABLE),
+ MENU_LABEL(SWITCH_CEC_ENABLE),
#endif
MENU_LABEL(NETPLAY_DELAY_FRAMES), /* deprecated */
MENU_LABEL(NETPLAY_PUBLIC_ANNOUNCE),
--
2.25.1

View File

@ -1,212 +0,0 @@
From f9d9bca1b0ab9cd84f436d4b8951acfbae1b4ea3 Mon Sep 17 00:00:00 2001
From: Ronald Brown <rbrown4014@yahoo.com>
Date: Sat, 25 Mar 2023 11:00:41 -0700
Subject: [PATCH] Lakka-Switch: Add Bluetooth ERTM Disable
---
config.def.h | 1 +
configuration.c | 10 ++++++++++
configuration.h | 1 +
intl/msg_hash_lbl.h | 4 ++++
intl/msg_hash_us.h | 8 ++++++++
lakka-switch.h | 2 ++
menu/cbs/menu_cbs_sublabel.c | 4 ++++
menu/menu_displaylist.c | 1 +
menu/menu_setting.c | 31 ++++++++++++++++++++++++++++++-
msg_hash.h | 1 +
10 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/config.def.h b/config.def.h
index 24aacf2943e..dc8ce046dd2 100644
--- a/config.def.h
+++ b/config.def.h
@@ -179,6 +179,7 @@
#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
diff --git a/configuration.c b/configuration.c
index 7130d0432d1..8288c5a681f 100644
--- a/configuration.c
+++ b/configuration.c
@@ -2079,6 +2079,7 @@ static struct config_bool_setting *populate_settings_bool(
#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
#ifdef ANDROID
SETTING_BOOL("android_input_disconnect_workaround", &settings->bools.android_input_disconnect_workaround, true, false, false);
@@ -3909,6 +3910,15 @@ static bool config_load_file(global_t *global,
} 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 882af40a041..1f843d1a6be 100644
--- a/configuration.h
+++ b/configuration.h
@@ -934,6 +934,7 @@ typedef struct settings
#ifdef HAVE_LAKKA_SWITCH
bool switch_oc;
bool switch_cec;
+ bool bluetooth_ertm_disable;
#endif
bool samba_enable;
bool bluetooth_enable;
diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h
index 1a026f1d515..a62c0abb25b 100644
--- a/intl/msg_hash_lbl.h
+++ b/intl/msg_hash_lbl.h
@@ -3499,6 +3499,10 @@ 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,
diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h
index a655217a80e..8afe3ea10e3 100644
--- a/intl/msg_hash_us.h
+++ b/intl/msg_hash_us.h
@@ -14996,6 +14996,14 @@ 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,
diff --git a/lakka-switch.h b/lakka-switch.h
index fe037a0da13..2100199a8cc 100644
--- a/lakka-switch.h
+++ b/lakka-switch.h
@@ -24,6 +24,8 @@
#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
diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c
index f3a39dd5193..27dc46ce387 100644
--- a/menu/cbs/menu_cbs_sublabel.c
+++ b/menu/cbs/menu_cbs_sublabel.c
@@ -370,6 +370,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_timezone, MENU_
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)
@@ -4872,6 +4873,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
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);
diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c
index c23808d9042..7f93b121028 100644
--- a/menu/menu_displaylist.c
+++ b/menu/menu_displaylist.c
@@ -9106,6 +9106,7 @@ unsigned menu_displaylist_build_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++)
diff --git a/menu/menu_setting.c b/menu/menu_setting.c
index 5a444aef90c..b6d2cef29c9 100644
--- a/menu/menu_setting.c
+++ b/menu/menu_setting.c
@@ -9094,6 +9094,20 @@ static void switch_cec_enable_toggle_change_handler(rarch_setting_t *setting)
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
@@ -21447,7 +21461,22 @@ static bool setting_append_list(
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);
}
diff --git a/msg_hash.h b/msg_hash.h
index 990a0564fa9..f5039e14ad0 100644
--- a/msg_hash.h
+++ b/msg_hash.h
@@ -2252,6 +2252,7 @@ enum msg_hash_enums
#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),