|
39 | 39 | #include "pin.h" |
40 | 40 | #include "i2c.h" |
41 | 41 | #include "ini.h" |
| 42 | +#include "firm.h" |
42 | 43 |
|
43 | 44 | #include "config_template_ini.h" // note that it has an extra NUL byte inserted |
44 | 45 |
|
@@ -566,6 +567,11 @@ static int configIniHandler(void* user, const char* section, const char* name, c |
566 | 567 | } else { |
567 | 568 | CHECK_PARSE_OPTION(-1); |
568 | 569 | } |
| 570 | + } else if (strcmp(name, "volume_slider_override") == 0) { |
| 571 | + s64 opt; |
| 572 | + CHECK_PARSE_OPTION(parseDecIntOption(&opt, value, -1, 100)); |
| 573 | + cfg->volumeSliderOverride = (s8)opt; |
| 574 | + return 1; |
569 | 575 | } else { |
570 | 576 | CHECK_PARSE_OPTION(-1); |
571 | 577 | } |
@@ -670,6 +676,7 @@ static size_t saveLumaIniConfigToStr(char *out) |
670 | 676 | cfg->autobootTwlTitleId, (int)cfg->autobootCtrAppmemtype, |
671 | 677 |
|
672 | 678 | forceAudioOutputStr, |
| 679 | + cfg->volumeSliderOverride, |
673 | 680 |
|
674 | 681 | (int)CONFIG(PATCHUNITINFO), (int)CONFIG(DISABLEARM11EXCHANDLERS), |
675 | 682 | (int)CONFIG(ENABLESAFEFIRMROSALINA) |
@@ -774,6 +781,7 @@ bool readConfig(void) |
774 | 781 | configData.formatVersionMinor = CONFIG_VERSIONMINOR; |
775 | 782 | configData.config |= 1u << PATCHVERSTRING; |
776 | 783 | configData.splashDurationMsec = 3000; |
| 784 | + configData.volumeSliderOverride = -1; |
777 | 785 | configData.hbldr3dsxTitleId = HBLDR_DEFAULT_3DSX_TID; |
778 | 786 | configData.rosalinaMenuCombo = 1u << 9 | 1u << 7 | 1u << 2; // L+Start+Select |
779 | 787 | configData.topScreenFilter.cct = 6500; // default temp, no-op |
@@ -834,8 +842,9 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) |
834 | 842 | "( ) Enable custom upscaling filters for DSi", |
835 | 843 | "( ) Allow Left+Right / Up+Down combos for DSi", |
836 | 844 |
|
837 | | - // Should always be the last entry |
838 | | - "\nSave and exit" |
| 845 | + // Should always be the last 2 entries |
| 846 | + "\nBoot chainloader", |
| 847 | + "Save and exit" |
839 | 848 | }; |
840 | 849 |
|
841 | 850 | static const char *optionsDescription[] = { "Select the default EmuNAND.\n\n" |
@@ -933,7 +942,10 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) |
933 | 942 | "Commercial software filter these\n" |
934 | 943 | "combos on their own too, though.", |
935 | 944 |
|
936 | | - // Should always be the last entry |
| 945 | + |
| 946 | + // Should always be the last 2 entries |
| 947 | + "Boot to the Luma3DS chainloader menu.", |
| 948 | + |
937 | 949 | "Save the changes and exit. To discard\n" |
938 | 950 | "any changes press the POWER button.\n" |
939 | 951 | "Use START as a shortcut to this entry." |
@@ -977,6 +989,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) |
977 | 989 | { .visible = true }, |
978 | 990 | { .visible = true }, |
979 | 991 | { .visible = true }, |
| 992 | + { .visible = true }, |
980 | 993 | }; |
981 | 994 |
|
982 | 995 | //Calculate the amount of the various kinds of options and pre-select the first single one |
@@ -1154,6 +1167,10 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) |
1154 | 1167 | startPressed = false; |
1155 | 1168 | break; |
1156 | 1169 | } |
| 1170 | + else if (singleSelected == singleOptionsAmount - 2) { |
| 1171 | + loadHomebrewFirm(0); |
| 1172 | + break; |
| 1173 | + } |
1157 | 1174 | else |
1158 | 1175 | { |
1159 | 1176 | bool oldEnabled = singleOptions[singleSelected].enabled; |
|
0 commit comments