Skip to content

Commit 0218683

Browse files
committed
Revert & cleanup
1 parent d0be9a1 commit 0218683

6 files changed

Lines changed: 9 additions & 21 deletions

File tree

.github/workflows/shellbat.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,14 @@ jobs:
3131
./bootstrap-vitasdk.sh
3232
./install-all.sh
3333
34-
cd /usr/local/vitasdk
35-
git clone https://github.com/vitasdk/vita-headers.git
36-
cd vita-headers
37-
make install
38-
39-
4034
- name: Build
4135
run: |
4236
mkdir build
4337
cd build
4438
cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/local/vitasdk/share/vita.toolchain.cmake
4539
make
4640
47-
- name: Upload shellbat artifact
41+
- name: Upload artifact
4842
uses: actions/upload-artifact@v4
4943
with:
5044
name: shellbat-suprx

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
build
2+
*.psd

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ target_link_libraries(shellbat
3838
gcc
3939
ScePower_stub
4040
SceKernelModulemgr_stub
41-
SceShellUtil_stub
4241
)
4342

4443
set_target_properties(shellbat

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ a taiHEN plugin that adds battery percentage to the statusbar
33

44
![34% screenshot](https://github.com/user-attachments/assets/70d4df18-80bf-4ad6-bedf-ae5c536d2599) ![2% screenshot](https://github.com/user-attachments/assets/70988e70-5ede-48cd-bc0a-c91f901f4aa3)
55

6-
**It's more common for devices to turn off at 1-2% instead of 13%**
6+
## Features
7+
- Percentage reflects usable charge rather than the raw internal battery value
8+
- Connecting or disconnecting the charger triggers a small animation
79

810
## Installation
9-
10-
Add this plugin under `*main` section in `ur0:tai/config.txt` / `ux0:tai/config.txt`:
11+
Add this plugin under `*main` in `ur0:tai/config.txt`:
1112

1213
```c
1314
*main
1415
ur0:tai/shellbat.suprx
1516
```
1617

1718
## Why?
18-
19-
PlayStation Vita doesn't allow the battery to fully drain so usually the console goes into deep sleep at around 12-13%. <br> This plugin is meant to recalculate the percentage based on this fact thanks to [leonardputra's fork for IRS-1001 models]([https://github.com/leonardputra/vita-shellbat-irs-1001)
19+
PlayStation Vita doesn't allow the battery to fully drain so usually the console goes into deep sleep at around 12-13%.
20+
<br>
21+
This plugin is meant to recalculate the percentage based on this fact thanks to [leonardputra's fork for IRS-1001 models]([https://github.com/leonardputra/vita-shellbat-irs-1001)
2022

doc/screenshot.jpg

-5.07 KB
Binary file not shown.

main.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,6 @@ static int status_draw_time_patched(void *a1, int a2)
137137
else if (!is_charging && was_charging) {
138138
scePafWidgetSetFontSize(a1, 22.0f, 1, bat_num_start, bat_num_len);
139139
scePafWidgetSetFontSize(a1, 18.0f, 1, percent_start, 1);
140-
// Charging estimate
141-
int percent = scePowerGetBatteryLifePercent();
142-
float hours_remaining = (100 - percent) * 0.022f;
143-
int hrs = (int)hours_remaining;
144-
int mins = (int)((hours_remaining - hrs) * 60.0f);
145-
char msg[64];
146-
sceClibSnprintf(msg, sizeof(msg), "Charging: %dh %dm remaining", hrs, mins);
147-
sceShellUtilNotifyMessage(0, msg);
148140
}
149141
was_charging = is_charging;
150142
}

0 commit comments

Comments
 (0)