Skip to content

Commit

Permalink
Hide I2C-related features if I2C chip is found bricked
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Sep 5, 2024
1 parent e21a3cb commit 8e103ff
Show file tree
Hide file tree
Showing 19 changed files with 158 additions and 82 deletions.
19 changes: 14 additions & 5 deletions 3dssplash/arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@
void my_touchInit();
void my_installSystemFIFO(void);

u8 my_i2cReadRegister(u8 device, u8 reg);

#define BIT_SET(c, n) ((c) << (n))

#define SD_IRQ_STATUS (*(vu32*)0x400481C)

volatile int status = 0;
volatile u32 status = 0;
static bool i2cBricked = false;

//---------------------------------------------------------------------------------
void ReturntoDSiMenu() {
//---------------------------------------------------------------------------------
if (isDSiMode()) {
if (isDSiMode() && !i2cBricked) {
i2cWriteRegister(0x4A, 0x70, 0x01); // Bootflag = Warmboot/SkipHealthSafety
i2cWriteRegister(0x4A, 0x11, 0x01); // Reset to DSi Menu
} else {
Expand Down Expand Up @@ -112,24 +115,30 @@ int main() {

setPowerButtonCB(powerButtonCB);

if (isDSiMode() || REG_SCFG_EXT != 0) {
const u8 i2cVer = my_i2cReadRegister(0x4A, 0);
i2cBricked = (i2cVer == 0 || i2cVer == 0xFF);
}

u8 pmBacklight = readPowerManagement(PM_BACKLIGHT_LEVEL);

// 01: Fade Out
// 02: Return
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat)
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked)


// 03: Status: Init/Volume/Battery/SD
// https://problemkaputt.de/gbatek.htm#dsii2cdevice4ahbptwlchip
// Battery is 7 bits -- bits 0-7
// Volume is 00h to 1Fh = 5 bits -- bits 8-12
// SD status -- bits 13-14
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat)
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked)

u8 initStatus = (BIT_SET(!!(REG_SNDEXTCNT), SNDEXTCNT_BIT)
| BIT_SET(!!(REG_SCFG_EXT), REGSCFG_BIT)
| BIT_SET(!!(pmBacklight & BIT(4) || pmBacklight & BIT(5) || pmBacklight & BIT(6) || pmBacklight & BIT(7)), BACKLIGHT_BIT)
| BIT_SET(isPhat(), DSPHAT_BIT));
| BIT_SET(isPhat(), DSPHAT_BIT)
| BIT_SET(i2cBricked, I2CBRICKED_BIT));

status = (status & ~INIT_MASK) | ((initStatus << INIT_OFF) & INIT_MASK);
fifoSendValue32(FIFO_USER_03, status);
Expand Down
19 changes: 14 additions & 5 deletions imageview/arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@
void my_touchInit();
void my_installSystemFIFO(void);

u8 my_i2cReadRegister(u8 device, u8 reg);

#define BIT_SET(c, n) ((c) << (n))

#define SD_IRQ_STATUS (*(vu32*)0x400481C)

volatile int status = 0;
volatile u32 status = 0;
static bool i2cBricked = false;

//---------------------------------------------------------------------------------
void ReturntoDSiMenu() {
//---------------------------------------------------------------------------------
if (isDSiMode()) {
if (isDSiMode() && !i2cBricked) {
i2cWriteRegister(0x4A, 0x70, 0x01); // Bootflag = Warmboot/SkipHealthSafety
i2cWriteRegister(0x4A, 0x11, 0x01); // Reset to DSi Menu
} else {
Expand Down Expand Up @@ -115,24 +118,30 @@ int main() {

setPowerButtonCB(powerButtonCB);

if (isDSiMode() || REG_SCFG_EXT != 0) {
const u8 i2cVer = my_i2cReadRegister(0x4A, 0);
i2cBricked = (i2cVer == 0 || i2cVer == 0xFF);
}

u8 pmBacklight = readPowerManagement(PM_BACKLIGHT_LEVEL);

// 01: Fade Out
// 02: Return
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat)
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked)


// 03: Status: Init/Volume/Battery/SD
// https://problemkaputt.de/gbatek.htm#dsii2cdevice4ahbptwlchip
// Battery is 7 bits -- bits 0-7
// Volume is 00h to 1Fh = 5 bits -- bits 8-12
// SD status -- bits 13-14
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat)
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked)

u8 initStatus = (BIT_SET(!!(REG_SNDEXTCNT), SNDEXTCNT_BIT)
| BIT_SET(!!(REG_SCFG_EXT), REGSCFG_BIT)
| BIT_SET(!!(pmBacklight & BIT(4) || pmBacklight & BIT(5) || pmBacklight & BIT(6) || pmBacklight & BIT(7)), BACKLIGHT_BIT)
| BIT_SET(isPhat(), DSPHAT_BIT));
| BIT_SET(isPhat(), DSPHAT_BIT)
| BIT_SET(i2cBricked, I2CBRICKED_BIT));

status = (status & ~INIT_MASK) | ((initStatus << INIT_OFF) & INIT_MASK);
fifoSendValue32(FIFO_USER_03, status);
Expand Down
19 changes: 14 additions & 5 deletions manual/arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@
void my_touchInit();
void my_installSystemFIFO(void);

u8 my_i2cReadRegister(u8 device, u8 reg);

#define BIT_SET(c, n) ((c) << (n))

#define SD_IRQ_STATUS (*(vu32*)0x400481C)

volatile int status = 0;
volatile u32 status = 0;
static bool i2cBricked = false;

//---------------------------------------------------------------------------------
void ReturntoDSiMenu() {
//---------------------------------------------------------------------------------
if (isDSiMode()) {
if (isDSiMode() && !i2cBricked) {
i2cWriteRegister(0x4A, 0x70, 0x01); // Bootflag = Warmboot/SkipHealthSafety
i2cWriteRegister(0x4A, 0x11, 0x01); // Reset to DSi Menu
} else {
Expand Down Expand Up @@ -113,24 +116,30 @@ int main() {

irqEnable(IRQ_VBLANK | IRQ_VCOUNT);

if (isDSiMode() || REG_SCFG_EXT != 0) {
const u8 i2cVer = my_i2cReadRegister(0x4A, 0);
i2cBricked = (i2cVer == 0 || i2cVer == 0xFF);
}

u8 pmBacklight = readPowerManagement(PM_BACKLIGHT_LEVEL);

// 01: Fade Out
// 02: Return
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat)
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked)


// 03: Status: Init/Volume/Battery/SD
// https://problemkaputt.de/gbatek.htm#dsii2cdevice4ahbptwlchip
// Battery is 7 bits -- bits 0-7
// Volume is 00h to 1Fh = 5 bits -- bits 8-12
// SD status -- bits 13-14
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat)
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked)

u8 initStatus = (BIT_SET(!!(REG_SNDEXTCNT), SNDEXTCNT_BIT)
| BIT_SET(!!(REG_SCFG_EXT), REGSCFG_BIT)
| BIT_SET(!!(pmBacklight & BIT(4) || pmBacklight & BIT(5) || pmBacklight & BIT(6) || pmBacklight & BIT(7)), BACKLIGHT_BIT)
| BIT_SET(isPhat(), DSPHAT_BIT));
| BIT_SET(isPhat(), DSPHAT_BIT)
| BIT_SET(i2cBricked, I2CBRICKED_BIT));

status = (status & ~INIT_MASK) | ((initStatus << INIT_OFF) & INIT_MASK);
fifoSendValue32(FIFO_USER_03, status);
Expand Down
19 changes: 13 additions & 6 deletions quickmenu/arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ u8 my_i2cWriteRegister(u8 device, u8 reg, u8 data);
volatile int timeTilVolumeLevelRefresh = 0;
static int soundVolume = 127;
volatile int rebootTimer = 0;
volatile int status = 0;
volatile u32 status = 0;
static int backlightLevel = 0;
static bool isDSPhat = false;
static bool hasRegulableBacklight = false;
static bool i2cBricked = false;

//static bool gotCartHeader = false;

Expand All @@ -70,7 +71,7 @@ void soundFadeOut(void) {
void ReturntoDSiMenu(void) {
//---------------------------------------------------------------------------------
nocashMessage("ARM7 ReturnToDSiMenu");
if (isDSiMode()) {
if (isDSiMode() && !i2cBricked) {
i2cWriteRegister(0x4A, 0x70, 0x01); // Bootflag = Warmboot/SkipHealthSafety
i2cWriteRegister(0x4A, 0x11, 0x01); // Reset to DSi Menu
} else {
Expand Down Expand Up @@ -247,27 +248,33 @@ int main() {
getConsoleID();
}

if (isDSiMode() || REG_SCFG_EXT != 0) {
const u8 i2cVer = my_i2cReadRegister(0x4A, 0);
i2cBricked = (i2cVer == 0 || i2cVer == 0xFF);
}

u8 pmBacklight = readPowerManagement(PM_BACKLIGHT_LEVEL);

hasRegulableBacklight = !!(pmBacklight & BIT(4) || pmBacklight & BIT(5) || pmBacklight & BIT(6) || pmBacklight & BIT(7));
isDSPhat = isPhat();

// 01: Fade Out
// 02: Return
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat)
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked)


// 03: Status: Init/Volume/Battery/SD
// https://problemkaputt.de/gbatek.htm#dsii2cdevice4ahbptwlchip
// Battery is 7 bits -- bits 0-7
// Volume is 00h to 1Fh = 5 bits -- bits 8-12
// SD status -- bits 13-14
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat)
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked)

u8 initStatus = (BIT_SET(!!(REG_SNDEXTCNT), SNDEXTCNT_BIT)
| BIT_SET(!!(REG_SCFG_EXT), REGSCFG_BIT)
| BIT_SET(hasRegulableBacklight, BACKLIGHT_BIT)
| BIT_SET(isDSPhat, DSPHAT_BIT));
| BIT_SET(isDSPhat, DSPHAT_BIT)
| BIT_SET(i2cBricked, I2CBRICKED_BIT));

status = (status & ~INIT_MASK) | ((initStatus << INIT_OFF) & INIT_MASK);
fifoSendValue32(FIFO_USER_03, status);
Expand Down Expand Up @@ -307,7 +314,7 @@ int main() {

timeTilVolumeLevelRefresh++;
if (timeTilVolumeLevelRefresh == 8) {
if (isDSiMode() || REG_SCFG_EXT != 0) { //vol
if ((isDSiMode() || REG_SCFG_EXT != 0) && !i2cBricked) { //vol
status = (status & ~VOL_MASK) | ((my_i2cReadRegister(I2C_PM, I2CREGPM_VOL) << VOL_OFF) & VOL_MASK);
status = (status & ~BAT_MASK) | ((my_i2cReadRegister(I2C_PM, I2CREGPM_BATTERY) << BAT_OFF) & BAT_MASK);
} else {
Expand Down
8 changes: 4 additions & 4 deletions quickmenu/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void batteryIconLoad() {
// Load full battery icon

const char* filePath = "nitro:/graphics/battery/batteryfull.png";
if (dsiFeatures() && ms().consoleModel < 2 && ms().powerLedColor) {
if (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2 && ms().powerLedColor) {
filePath = "nitro:/graphics/battery/batteryfullPurple.png";
} else if (sys().isRegularDS()) {
filePath = "nitro:/graphics/battery/batteryfullDS.png";
Expand Down Expand Up @@ -356,7 +356,7 @@ void batteryIconLoad() {
// Load low battery icon

filePath = "nitro:/graphics/battery/batterylow.png";
if (dsiFeatures() && ms().consoleModel < 2 && ms().powerLedColor) {
if (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2 && ms().powerLedColor) {
filePath = "nitro:/graphics/battery/batteryfullPurple.png";
}

Expand Down Expand Up @@ -393,7 +393,7 @@ void batteryIconLoad() {
}

static bool isBatteryLow(void) {
u8 batteryLevel = sys().batteryStatus();
const u8 batteryLevel = sys().batteryStatus();
if (batteryLevel & BIT(7)) // charging
return false;

Expand Down Expand Up @@ -733,7 +733,7 @@ void vBlankHandler()
glSprite(40, iconYpos[3]+6, GL_FLIP_NONE, &icon_gbamode.images[(((u8*)GBAROM)[0xB2] == 0x96) ? 0 : 1]);
}
else drawIcon(num, 40, iconYpos[3]+6);
if (sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2)) {
if (sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2)) {
glSprite(10, iconYpos[4], GL_FLIP_NONE, getMenuEntryTexture(MenuEntry::BRIGHTNESS));
}
if (bnrWirelessIcon[num] > 0) glSprite(207, iconYpos[3]+30, GL_FLIP_NONE, &wirelessicons.images[(bnrWirelessIcon[1]-1) & 31]);
Expand Down
6 changes: 3 additions & 3 deletions quickmenu/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@ int dsClassicMenu(void) {
}
/*fallthrough*/
case MenuEntry::SETTINGS:
if(!(sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2)))
if(!(sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2)))
break;
cursorPosition = MenuEntry::BRIGHTNESS;
/*fallthrough*/
Expand Down Expand Up @@ -1806,7 +1806,7 @@ int dsClassicMenu(void) {
return MenuEntry::GBA;
}
if (touchPoint.px >= 10 && touchPoint.px <= 20 && touchPoint.py >= 175 && touchPoint.py <= 185
&& (sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2))) {
&& (sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2))) {
return MenuEntry::BRIGHTNESS;
}
if (touchPoint.px >= 117 && touchPoint.px <= 137 && touchPoint.py >= 170 && touchPoint.py <= 190 && !ms().kioskMode) {
Expand Down Expand Up @@ -2164,7 +2164,7 @@ int dsClassicMenu(void) {
break;
case MenuEntry::BRIGHTNESS:
// Adjust backlight level
if (sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2)) {
if (sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2)) {
fifoSendValue32(FIFO_USER_04, 1);
mmEffectEx(&snd_backlight);
}
Expand Down
19 changes: 13 additions & 6 deletions romsel_aktheme/arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ u8 my_i2cWriteRegister(u8 device, u8 reg, u8 data);
volatile int timeTilVolumeLevelRefresh = 0;
static int soundVolume = 127;
volatile int rebootTimer = 0;
volatile int status = 0;
volatile u32 status = 0;
static int backlightLevel = 0;
static bool isDSPhat = false;
static bool hasRegulableBacklight = false;
static bool i2cBricked = false;

//static bool gotCartHeader = false;

Expand All @@ -66,7 +67,7 @@ void soundFadeOut() {
void ReturntoDSiMenu() {
//---------------------------------------------------------------------------------
nocashMessage("ARM7 ReturnToDSiMenu");
if (isDSiMode()) {
if (isDSiMode() && !i2cBricked) {
i2cWriteRegister(0x4A, 0x70, 0x01); // Bootflag = Warmboot/SkipHealthSafety
i2cWriteRegister(0x4A, 0x11, 0x01); // Reset to DSi Menu
} else {
Expand Down Expand Up @@ -179,27 +180,33 @@ int main() {
*(vu32*)0x037C0000 = wordBak;
}

if (isDSiMode() || REG_SCFG_EXT != 0) {
const u8 i2cVer = my_i2cReadRegister(0x4A, 0);
i2cBricked = (i2cVer == 0 || i2cVer == 0xFF);
}

u8 pmBacklight = readPowerManagement(PM_BACKLIGHT_LEVEL);

hasRegulableBacklight = !!(pmBacklight & BIT(4) || pmBacklight & BIT(5) || pmBacklight & BIT(6) || pmBacklight & BIT(7));
isDSPhat = isPhat();

// 01: Fade Out
// 02: Return
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat)
// 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked)


// 03: Status: Init/Volume/Battery/SD
// https://problemkaputt.de/gbatek.htm#dsii2cdevice4ahbptwlchip
// Battery is 7 bits -- bits 0-7
// Volume is 00h to 1Fh = 5 bits -- bits 8-12
// SD status -- bits 13-14
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat)
// Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked)

u8 initStatus = (BIT_SET(!!(REG_SNDEXTCNT), SNDEXTCNT_BIT)
| BIT_SET(!!(REG_SCFG_EXT), REGSCFG_BIT)
| BIT_SET(hasRegulableBacklight, BACKLIGHT_BIT)
| BIT_SET(isDSPhat, DSPHAT_BIT));
| BIT_SET(isDSPhat, DSPHAT_BIT)
| BIT_SET(i2cBricked, I2CBRICKED_BIT));

status = (status & ~INIT_MASK) | ((initStatus << INIT_OFF) & INIT_MASK);
fifoSendValue32(FIFO_USER_03, status);
Expand Down Expand Up @@ -229,7 +236,7 @@ int main() {

timeTilVolumeLevelRefresh++;
if (timeTilVolumeLevelRefresh == 8) {
if (isDSiMode() || REG_SCFG_EXT != 0) { //vol
if ((isDSiMode() || REG_SCFG_EXT != 0) && !i2cBricked) { //vol
status = (status & ~VOL_MASK) | ((my_i2cReadRegister(I2C_PM, I2CREGPM_VOL) << VOL_OFF) & VOL_MASK);
status = (status & ~BAT_MASK) | ((my_i2cReadRegister(I2C_PM, I2CREGPM_BATTERY) << BAT_OFF) & BAT_MASK);
} else {
Expand Down
2 changes: 1 addition & 1 deletion romsel_aktheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
return "null";
}

if ((sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2)) && (pressed & KEY_TOUCH) && touch.px >= brightnessX && touch.px < brightnessX+brightnessW && touch.py >= brightnessY && touch.py < brightnessY+brightnessH) {
if ((sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2)) && (pressed & KEY_TOUCH) && touch.px >= brightnessX && touch.px < brightnessX+brightnessW && touch.py >= brightnessY && touch.py < brightnessY+brightnessH) {
fifoSendValue32(FIFO_USER_04, 1);
while (1) {
scanKeys();
Expand Down
2 changes: 1 addition & 1 deletion romsel_aktheme/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,7 @@ void graphicsLoad()
dmaCopyHalfWordsAsynch(2, bottomImage[0], bottomImageWithBar[0], 0x18000);
dmaCopyHalfWordsAsynch(3, bottomImage[1], bottomImageWithBar[1], 0x18000);

if (sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2)) {
if (sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2)) {
std::string pathBrightness;
if (access((themePath + "/brightness.bmp").c_str(), F_OK) == 0) {
pathBrightness = themePath + "/brightness.bmp";
Expand Down
2 changes: 1 addition & 1 deletion romsel_aktheme/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ int akTheme(void) {
startTextX = startX + startW/5;
startTextY = startY + startH/5;

if (sys().isRegularDS() || (dsiFeatures() && ms().consoleModel < 2)) {
if (sys().isRegularDS() || (dsiFeatures() && !sys().i2cBricked() && ms().consoleModel < 2)) {
brightnessX = ini.GetInt("brightness btn", "x", brightnessX);
brightnessY = ini.GetInt("brightness btn", "y", brightnessY);
brightnessW = ini.GetInt("brightness btn", "w", brightnessW);
Expand Down
Loading

0 comments on commit 8e103ff

Please sign in to comment.