X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=af3e053607781e7e1b83ed5dfb911396584f6441;hb=544783044dc509bba661c1bf4a9d7fa64877d8cf;hp=d6ede9ffd169ed8808177c144864940f957fe260;hpb=ed7934511c4ad252316e32e00af2ce89a40c5609;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index d6ede9ff..af3e0536 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -117,7 +117,11 @@ void InitNetworkInfo(boolean enabled, boolean connected, boolean serveronly, void InitRuntimeInfo() { +#if defined(HAS_TOUCH_DEVICE) + runtime.uses_touch_device = TRUE; +#else runtime.uses_touch_device = FALSE; +#endif } void InitScoresInfo(void) @@ -320,8 +324,9 @@ void InitGfxOtherSettings(void) gfx.cursor_mode_override = CURSOR_UNDEFINED; gfx.cursor_mode_final = gfx.cursor_mode; - gfx.mouse_x = 0; - gfx.mouse_y = 0; + // prevent initially displaying custom mouse cursor in upper left corner + gfx.mouse_x = POS_OFFSCREEN; + gfx.mouse_y = POS_OFFSCREEN; } void InitTileCursorInfo(void) @@ -570,6 +575,7 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) video.window_scaling_available = WINDOW_SCALING_STATUS; + video.frame_counter = 0; video.frame_delay = 0; video.frame_delay_value = GAME_FRAME_DELAY; @@ -1690,7 +1696,7 @@ KeyMod HandleKeyModState(Key key, int key_status) { KeyMod new_modifier = KMOD_None; - switch(key) + switch (key) { case KSYM_Shift_L: new_modifier = KMOD_Shift_L;