Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e7da24
)
samples/Blokus: Work-around for Flash() lockups when running with timers on Windows
author
Jerome St-Louis
<jerome@ecere.com>
Sat, 4 Feb 2012 18:16:01 +0000
(
01:16
+0700)
committer
Jerome St-Louis
<jerome@ecere.com>
Sat, 4 Feb 2012 18:16:01 +0000
(
01:16
+0700)
samples/games/blokus/blokus.ec
patch
|
blob
|
history
diff --git
a/samples/games/blokus/blokus.ec
b/samples/games/blokus/blokus.ec
index
9929d25
..
9dd52f5
100644
(file)
--- a/
samples/games/blokus/blokus.ec
+++ b/
samples/games/blokus/blokus.ec
@@
-518,6
+518,27
@@
class Blokus : Window
gotMove = true;
#endif
+#ifdef __WIN32__
+ // To work around Flash() lockups on Windows...
+ bool flash;
+ Timer flashTimer
+ {
+ this, delay = 0.2, true;
+
+ bool DelayExpired()
+ {
+ if(flash)
+ Window::Flash();
+ return true;
+ }
+ };
+
+ void Flash()
+ {
+ flash = true;
+ }
+#endif
+
void NextColorPlayed()
{
if(gameState.numPlayers == 1)