Skip to content

Commit

Permalink
DSi-based themes: Derp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Dec 9, 2021
1 parent 975f54a commit ad78fff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions romsel_dsimenutheme/arm9/source/graphics/ThemeTextures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,16 +1117,8 @@ ITCM_CODE int ThemeTextures::getVolumeLevel(void) {

ITCM_CODE int ThemeTextures::getBatteryLevel(void) {
u8 batteryLevel = sys().batteryStatus();
if (!sys().isDSPhat() && (batteryLevel & BIT(7)))
if (batteryLevel & BIT(7))
return 7;

if (!dsiFeatures()) {
if (batteryLevel & BIT(0))
return 1;
return 0;
}

// DSi Mode
if (batteryLevel == 0xF)
return 4;
if (batteryLevel == 0xB)
Expand Down
4 changes: 2 additions & 2 deletions romsel_dsimenutheme/arm9/source/graphics/ThemeTextures.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ class ThemeTextures
case 7:
return _batterychargeTexture.get();
case 4:
default:
return _battery4Texture.get();
case 3:
return _battery3Texture.get();
case 2:
return _battery2Texture.get();
case 1:
case 0:
default:
return _battery1Texture.get();
case -1:
return _battery0Texture.get();
Expand All @@ -215,9 +215,9 @@ class ThemeTextures
return _batterychargeblinkTexture.get();
case 7:
return _batterychargeTexture.get();
case 1:
default:
return regularDS ? _batteryfullDSTexture.get() : _batteryfullTexture.get();
case 1:
case 0:
return _batterylowTexture.get();
}
Expand Down

0 comments on commit ad78fff

Please sign in to comment.