From: Holger Schemel Date: Thu, 18 Jun 2020 18:32:11 +0000 (+0200) Subject: added pre-processor directive to set if platform has touch device X-Git-Tag: 4.2.0.0~14 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=544783044dc509bba661c1bf4a9d7fa64877d8cf added pre-processor directive to set if platform has touch device --- diff --git a/src/libgame/system.c b/src/libgame/system.c index 6dcf5496..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) diff --git a/src/libgame/system.h b/src/libgame/system.h index 29f1c28e..221d1eef 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -112,6 +112,7 @@ // values for special settings for mobile devices #if defined(PLATFORM_ANDROID) +#define HAS_TOUCH_DEVICE #define USE_TOUCH_INPUT_OVERLAY #define USE_COMPLETE_DISPLAY #define HAS_SCREEN_KEYBOARD