projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed handling global animation key event actions multiple times
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index c7270d93f77540db4e19f1bd2392db493551e3ec..15e86a4afbc7084012132acac0f133577914085f 100644
(file)
--- a/
src/libgame/system.c
+++ b/
src/libgame/system.c
@@
-1733,12
+1733,18
@@
void StopTextInput(void)
#endif
}
#endif
}
-
boolean CheckCloseWindowEvent(ClientMessageEvent *event
)
+
void PushUserEvent(int code, int value1, int value2
)
{
{
- if (event->type != EVENT_CLIENTMESSAGE)
- return FALSE;
+ UserEvent event;
+
+ SDL_memset(&event, 0, sizeof(event));
+
+ event.type = EVENT_USER;
+ event.code = code;
+ event.value1 = value1;
+ event.value2 = value2;
- return TRUE; // the only possible message here is SDL_QUIT
+ SDL_PushEvent((SDL_Event *)&event);
}
}