X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=a10016dc94f8e69967b0a950a536f3d217e76739;hb=b8f99b63bf8c0ba0fefe2889c85feb4d46646e88;hp=5ccf3fb3784650147bc1f70aed77af72925dd0bb;hpb=cea8726203188984c5d94dc15934d1e186d18c37;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 5ccf3fb3..a10016dc 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -300,7 +300,18 @@ void InitGfxOtherSettings() void InitOverlayInfo() { + overlay.enabled = FALSE; overlay.active = FALSE; + +#if defined(PLATFORM_ANDROID) + if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS)) + overlay.enabled = TRUE; +#endif +} + +void SetOverlayEnabled(boolean enabled) +{ + overlay.enabled = enabled; } void SetOverlayActive(boolean active) @@ -318,6 +329,11 @@ void SetDrawDeactivationMask(int draw_deactivation_mask) gfx.draw_deactivation_mask = draw_deactivation_mask; } +int GetDrawDeactivationMask() +{ + return gfx.draw_deactivation_mask; +} + void SetDrawBackgroundMask(int draw_background_mask) { gfx.draw_background_mask = draw_background_mask; @@ -1634,3 +1650,8 @@ boolean CheckJoystickOpened(int nr) { return SDLCheckJoystickOpened(nr); } + +void ClearJoystickState() +{ + SDLClearJoystickState(); +}