Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skeleton/SYSTEM/tg5040/bin/suspend
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# set -eu
set -euo pipefail
exec 0<&-

# wpa_running=0
Expand Down
15 changes: 10 additions & 5 deletions workspace/all/common/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2872,16 +2872,21 @@ static void PWR_waitForWake(void) {
if(sleepDelay > 0) {
SDL_Delay(200);
if (SDL_GetTicks()-sleep_ticks>=sleepDelay) { // increased to two minutes
// if (pwr.is_charging) {
// sleep_ticks += 60000; // check again in a minute
// continue;
// }
if (pwr.is_charging) {
sleep_ticks += 60000; // check again in a minute
continue;
}
if (PLAT_supportsDeepSleep()) {
int ret = PWR_deepSleep();
if (ret == 0) {
return;
} else if (deep_sleep_attempts < 3) {
LOG_warn("failed to enter deep sleep - retrying in 5 seconds\n");
sleep_ticks += 5000;
deep_sleep_attempts++;
continue;
} else {
LOG_info("failed to enter deep sleep - powering off\n");
LOG_warn("failed to enter deep sleep - powering off\n");
}
}
if (pwr.can_poweroff) {
Expand Down
6 changes: 5 additions & 1 deletion workspace/all/nextui/nextui.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,11 @@ int main (int argc, char *argv[]) {
int new_w = max_w;
int new_h = max_h;
had_thumb = 1;
ox = (int)(max_w) - SCALE1(BUTTON_MARGIN*5);
if(exists(thumbpath))
ox = (int)(max_w) - SCALE1(BUTTON_MARGIN*5);
else
ox = screen->w;


SDL_UnlockMutex(thumbMutex);
}
Expand Down