From 3e6399490ced04b66c7e659c7850b4c68a85ff88 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:40:30 +0200 Subject: [PATCH] Hide "force audio output" option --- arm9/data/config_template.ini | Bin 6777 -> 6777 bytes arm9/source/config.c | 47 +++++++++---------- arm9/source/config.h | 2 +- sysmodules/rosalina/data/config_template.ini | Bin 6777 -> 6777 bytes sysmodules/rosalina/source/luma_config.c | 4 +- 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/arm9/data/config_template.ini b/arm9/data/config_template.ini index 1d3cd2548db251264ebaf2c7534875b402049fcd..762a903761791cddda2d0071372f4bc53ceda1b3 100644 GIT binary patch delta 22 ecmexq^3!C41n=f@J_*jvQoON@n|sCIFaZE%!w3cd delta 22 ecmexq^3!C41n*`&v3SPK61)multiConfig |= 0 << (2 * (u32)FORCEAUDIOOUTPUT); - return 1; - } else if (strcasecmp(value, "headphones") == 0) { - cfg->multiConfig |= 1 << (2 * (u32)FORCEAUDIOOUTPUT); - return 1; - } else if (strcasecmp(value, "speakers") == 0) { - cfg->multiConfig |= 2 << (2 * (u32)FORCEAUDIOOUTPUT); - return 1; - } else { - CHECK_PARSE_OPTION(-1); - } } else { CHECK_PARSE_OPTION(-1); } @@ -559,7 +546,23 @@ static int configIniHandler(void* user, const char* section, const char* name, c return 1; } } - CHECK_PARSE_OPTION(-1); + + if (strcmp(name, "force_audio_output") == 0) { + if (strcasecmp(value, "off") == 0) { + cfg->multiConfig |= 0 << (2 * (u32)FORCEAUDIOOUTPUT); + return 1; + } else if (strcasecmp(value, "headphones") == 0) { + cfg->multiConfig |= 1 << (2 * (u32)FORCEAUDIOOUTPUT); + return 1; + } else if (strcasecmp(value, "speakers") == 0) { + cfg->multiConfig |= 2 << (2 * (u32)FORCEAUDIOOUTPUT); + return 1; + } else { + CHECK_PARSE_OPTION(-1); + } + } else { + CHECK_PARSE_OPTION(-1); + } } else { CHECK_PARSE_OPTION(-1); } @@ -647,7 +650,7 @@ static size_t saveLumaIniConfigToStr(char *out) 1 + (int)MULTICONFIG(DEFAULTEMU), 4 - (int)MULTICONFIG(BRIGHTNESS), splashPosStr, (unsigned int)cfg->splashDurationMsec, pinNumDigits, n3dsCpuStr, - autobootModeStr, forceAudioOutputStr, + autobootModeStr, cfg->hbldr3dsxTitleId, rosalinaMenuComboStr, (int)cfg->ntpTzOffetMinutes, @@ -660,6 +663,8 @@ static size_t saveLumaIniConfigToStr(char *out) cfg->autobootTwlTitleId, (int)cfg->autobootCtrAppmemtype, + forceAudioOutputStr, + (int)CONFIG(PATCHUNITINFO), (int)CONFIG(DISABLEARM11EXCHANDLERS), (int)CONFIG(ENABLESAFEFIRMROSALINA) ); @@ -812,7 +817,6 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) "PIN lock: Off( ) 4( ) 6( ) 8( ) digits", "New 3DS CPU: Off( ) Clock( ) L2( ) Clock+L2( )", "Hbmenu autoboot: Off( ) 3DS( ) DSi( )", - "Force audio: Off( ) Headphones( ) Speakers( )" }; static const char *singleOptionsText[] = { "( ) Autoboot EmuNAND", @@ -864,15 +868,6 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) "configuration file to configure\n" "this feature.", - "Force audio output to HPs or speakers.\n\n" - "Currently only for NATIVE_FIRM.\n\n" - "Due to software limitations, this gets\n" - "undone if you actually insert then\n" - "remove HPs (just enter then exit sleep\n" - "mode if this happens).\n\n" - "Also gets bypassed for camera shutter\n" - "sound.", - "If enabled, an EmuNAND\n" "will be launched on boot.\n\n" "Otherwise, SysNAND will.\n\n" @@ -951,7 +946,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) { .visible = true }, { .visible = ISN3DS }, { .visible = true }, - { .visible = true }, + // { .visible = true }, audio rerouting, hidden }; struct singleOption { diff --git a/arm9/source/config.h b/arm9/source/config.h index 6115091..f7920db 100644 --- a/arm9/source/config.h +++ b/arm9/source/config.h @@ -36,7 +36,7 @@ #define CONFIG_FILE "config.ini" #define CONFIG_VERSIONMAJOR 3 -#define CONFIG_VERSIONMINOR 6 +#define CONFIG_VERSIONMINOR 7 #define BOOTCFG_NAND BOOTCONFIG(0, 7) #define BOOTCFG_FIRM BOOTCONFIG(3, 7) diff --git a/sysmodules/rosalina/data/config_template.ini b/sysmodules/rosalina/data/config_template.ini index 1d3cd2548db251264ebaf2c7534875b402049fcd..762a903761791cddda2d0071372f4bc53ceda1b3 100644 GIT binary patch delta 22 ecmexq^3!C41n=f@J_*jvQoON@n|sCIFaZE%!w3cd delta 22 ecmexq^3!C41n*`&v3SPK61)splashDurationMsec, pinNumDigits, n3dsCpuStr, - autobootModeStr, forceAudioOutputStr, + autobootModeStr, cfg->hbldr3dsxTitleId, rosalinaMenuComboStr, (int)cfg->ntpTzOffetMinutes, @@ -182,6 +182,8 @@ static size_t LumaConfig_SaveLumaIniConfigToStr(char *out, const CfgData *cfg) cfg->autobootTwlTitleId, (int)cfg->autobootCtrAppmemtype, + forceAudioOutputStr, + (int)CONFIG(PATCHUNITINFO), (int)CONFIG(DISABLEARM11EXCHANDLERS), (int)CONFIG(ENABLESAFEFIRMROSALINA) );