changeset 351:a628b48a745f

Fix timeout display issue (> 99 should be displayed as 99)
author Thibaut Girka <thib@sitedethib.com>
date Sat, 07 Jul 2012 21:33:17 +0200
parents b3049fb5c448
children cca5843c2e95
files pytouhou/games/eosd.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/games/eosd.py
+++ b/pytouhou/games/eosd.py
@@ -186,7 +186,7 @@ class EoSDInterface(object):
             self.labels['boss_lives'].set_text('%d' % boss.remaining_lives)
             self.labels['boss_lives'].changed = True
 
-            timeout = (boss.timeout - boss.frame) // 60
+            timeout = min((boss.timeout - boss.frame) // 60, 99)
             timeout_label = self.labels['timeout']
             if timeout >= 20:
                 timeout_label.set_color('blue')