mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 09:48:50 +01:00
run.py RestoreLastBackLightBrightness bug fix
This commit is contained in:
parent
5db3db2ee3
commit
42fd86bce6
@ -817,7 +817,7 @@ class GameStorePage(Page):
|
||||
self._FootMsg[2] = "Remove"
|
||||
self._FootMsg[1] = "UpdateWare"
|
||||
else:
|
||||
self._FootMsg[2] = "Up"
|
||||
self._FootMsg[2] = ""
|
||||
self._FootMsg[1] = ""
|
||||
|
||||
self.SyncList()
|
||||
@ -831,9 +831,24 @@ class GameStorePage(Page):
|
||||
"""
|
||||
def KeyDown(self,event):
|
||||
if IsKeyMenuOrB(event.key):
|
||||
self.ReturnToUpLevelPage()
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
if self._MyStack.Length() > 1:
|
||||
self._MyStack.Pop()
|
||||
if self._MyStack.Length() == 1:
|
||||
self._FootMsg[2] = "Remove"
|
||||
self._FootMsg[1] = "UpdateWare"
|
||||
else:
|
||||
self._FootMsg[2] = ""
|
||||
self._FootMsg[1] = "Preview"
|
||||
|
||||
self.SyncList()
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
elif self._MyStack.Length() == 1:
|
||||
self.ReturnToUpLevelPage()
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
if IsKeyStartOrA(event.key):
|
||||
self.Click()
|
||||
@ -842,7 +857,7 @@ class GameStorePage(Page):
|
||||
self._FootMsg[2] = "Remove"
|
||||
self._FootMsg[1] = "UpdateWare"
|
||||
else:
|
||||
self._FootMsg[2] = "Up"
|
||||
self._FootMsg[2] = ""
|
||||
self._FootMsg[1] = "Preview"
|
||||
|
||||
self._Screen.Draw()
|
||||
@ -858,6 +873,7 @@ class GameStorePage(Page):
|
||||
self._Screen.SwapAndShow()
|
||||
return
|
||||
|
||||
"""
|
||||
if self._MyStack.Length() > 1:
|
||||
self._MyStack.Pop()
|
||||
if self._MyStack.Length() == 1:
|
||||
@ -866,6 +882,7 @@ class GameStorePage(Page):
|
||||
else:
|
||||
self._FootMsg[2] = "Up"
|
||||
self._FootMsg[1] = "Preview"
|
||||
"""
|
||||
|
||||
self.SyncList()
|
||||
self._Screen.Draw()
|
||||
|
||||
@ -183,11 +183,11 @@ class TitleBar(Widget):
|
||||
self._Icons["battery_charging"]._IconIndex = cap_ge
|
||||
self._Icons["battery"] = self._Icons["battery_charging"]
|
||||
|
||||
print("Charging %d" % cap_ge)
|
||||
#print("Charging %d" % cap_ge)
|
||||
else:
|
||||
self._Icons["battery_discharging"]._IconIndex = cap_ge
|
||||
self._Icons["battery"] = self._Icons["battery_discharging"]
|
||||
print("Discharging %d" % cap_ge)
|
||||
#print("Discharging %d" % cap_ge)
|
||||
|
||||
|
||||
return True
|
||||
|
||||
@ -163,11 +163,9 @@ def RestoreLastBackLightBrightness(main_screen):
|
||||
f.seek(0)
|
||||
f.write(str( last_brt ))
|
||||
f.truncate()
|
||||
f.close()
|
||||
last_brt = -1
|
||||
else:
|
||||
f.close()
|
||||
|
||||
f.close()
|
||||
last_brt = -1
|
||||
try:
|
||||
f = open("/proc/driver/led1","w")
|
||||
except IOError:
|
||||
@ -198,7 +196,6 @@ def InspectionTeam(main_screen):
|
||||
|
||||
if cur_time - everytime_keydown > time_1 and passout_time_stage == 0:
|
||||
print("timeout, dim screen %d" % int(cur_time - everytime_keydown))
|
||||
|
||||
try:
|
||||
f = open(config.BackLight,"r+")
|
||||
except IOError:
|
||||
@ -226,7 +223,6 @@ def InspectionTeam(main_screen):
|
||||
|
||||
elif cur_time - everytime_keydown > time_2 and passout_time_stage == 1:
|
||||
print("timeout, close screen %d" % int(cur_time - everytime_keydown))
|
||||
|
||||
try:
|
||||
f = open(config.BackLight,"r+")
|
||||
except IOError:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user