X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=4d4c448f486755e90a03f97dcc6608d1d3ef1793;hb=47da774c66f9325f9d27cddb5a697514154e2de9;hp=b5de8c9e6959ee11848072c3ec9599f0e52a9850;hpb=b10d40ccb1a79ec0053848080edf3bcab12b9b67;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index b5de8c9e..4d4c448f 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) @@ -1620,7 +1631,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(); } @@ -1629,3 +1640,13 @@ boolean ReadJoystick(int nr, int *x, int *y, boolean *b1, boolean *b2) { return SDLReadJoystick(nr, x, y, b1, b2); } + +boolean CheckJoystickOpened(int nr) +{ + return SDLCheckJoystickOpened(nr); +} + +void ClearJoystickState() +{ + SDLClearJoystickState(); +}