X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=15e86a4afbc7084012132acac0f133577914085f;hp=488e838e8c4b82650edbcd48caee246420f1c6d8;hb=c38790fcee093efb156366bb4a02dbde55085ca4;hpb=85019a08c195ac31e548b0549053fbc9f71b427f diff --git a/src/libgame/system.c b/src/libgame/system.c index 488e838e..15e86a4a 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -317,6 +317,8 @@ void InitGfxCustomArtworkInfo(void) void InitGfxOtherSettings(void) { gfx.cursor_mode = CURSOR_DEFAULT; + gfx.mouse_x = 0; + gfx.mouse_y = 0; } void InitTileCursorInfo(void) @@ -1731,12 +1733,18 @@ void StopTextInput(void) #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); }