X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=a10016dc94f8e69967b0a950a536f3d217e76739;hb=b8f99b63bf8c0ba0fefe2889c85feb4d46646e88;hp=de59d77a6ce4bf501d8d278fa43f12c29216c617;hpb=cad3c0cde6926a8a379725b1ffc6fc657272a76d;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index de59d77a..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; @@ -1620,7 +1636,7 @@ void InitJoysticks() /* always start with reliable default values */ joystick.status = JOYSTICK_NOT_AVAILABLE; for (i = 0; i < MAX_PLAYERS; i++) - joystick.fd[i] = -1; /* joystick device closed */ + joystick.nr[i] = -1; /* no joystick configured */ SDLInitJoysticks(); } @@ -1634,3 +1650,8 @@ boolean CheckJoystickOpened(int nr) { return SDLCheckJoystickOpened(nr); } + +void ClearJoystickState() +{ + SDLClearJoystickState(); +}