diff --git a/src/modules/joystick/JoystickModule.h b/src/modules/joystick/JoystickModule.h index b437d0bd3..438c90add 100644 --- a/src/modules/joystick/JoystickModule.h +++ b/src/modules/joystick/JoystickModule.h @@ -70,12 +70,6 @@ public: **/ virtual int getJoystickCount() const = 0; - /** - * Determines whether the Joystick at the specified index is a recognized - * Gamepad. - **/ - virtual bool isGamepad(int joyindex) const = 0; - /** * Sets the virtual Gamepad mapping for a joystick input value for all * joystick devices with the specified joystick GUID. diff --git a/src/modules/joystick/sdl/JoystickModule.cpp b/src/modules/joystick/sdl/JoystickModule.cpp index 3c1a75054..878406a61 100644 --- a/src/modules/joystick/sdl/JoystickModule.cpp +++ b/src/modules/joystick/sdl/JoystickModule.cpp @@ -93,14 +93,6 @@ int JoystickModule::getJoystickCount() const return (int) activeSticks.size(); } -bool JoystickModule::isGamepad(int joyindex) const -{ - if (joyindex < 0 || (size_t) joyindex >= activeSticks.size()) - return false; - - return activeSticks[joyindex]->isGamepad(); -} - love::joystick::Joystick *JoystickModule::getJoystickFromID(int instanceid) { for (size_t i = 0; i < activeSticks.size(); i++) diff --git a/src/modules/joystick/sdl/JoystickModule.h b/src/modules/joystick/sdl/JoystickModule.h index 1c06f6026..55f224ffe 100644 --- a/src/modules/joystick/sdl/JoystickModule.h +++ b/src/modules/joystick/sdl/JoystickModule.h @@ -52,7 +52,6 @@ public: love::joystick::Joystick *getJoystick(int joyindex); int getIndex(const love::joystick::Joystick *joystick); int getJoystickCount() const; - bool isGamepad(int joyindex) const; bool setGamepadMapping(const std::string &guid, Joystick::GamepadInput gpinput, Joystick::JoystickInput joyinput); Joystick::JoystickInput getGamepadMapping(const std::string &guid, Joystick::GamepadInput gpinput); diff --git a/src/modules/joystick/sdl/wrap_JoystickModule.cpp b/src/modules/joystick/sdl/wrap_JoystickModule.cpp index 67cad791e..29b7720fc 100644 --- a/src/modules/joystick/sdl/wrap_JoystickModule.cpp +++ b/src/modules/joystick/sdl/wrap_JoystickModule.cpp @@ -63,13 +63,6 @@ int w_getJoystickCount(lua_State *L) return 1; } -int w_isGamepad(lua_State *L) -{ - int index = luaL_checkint(L, 1) - 1; - luax_pushboolean(L, instance->isGamepad(index)); - return 1; -} - int w_setGamepadMapping(lua_State *L) { // Only accept a GUID string. We don't accept a Joystick object because @@ -200,9 +193,7 @@ int w_getGamepadMapping(lua_State *L) static const luaL_Reg functions[] = { { "getJoysticks", w_getJoysticks }, -// { "getIndex", w_getIndex }, { "getJoystickCount", w_getJoystickCount }, - { "isGamepad", w_isGamepad }, { "setGamepadMapping", w_setGamepadMapping }, { "getGamepadMapping", w_getGamepadMapping }, { 0, 0 } diff --git a/src/modules/joystick/sdl/wrap_JoystickModule.h b/src/modules/joystick/sdl/wrap_JoystickModule.h index 492c6c004..9373c529e 100644 --- a/src/modules/joystick/sdl/wrap_JoystickModule.h +++ b/src/modules/joystick/sdl/wrap_JoystickModule.h @@ -35,7 +35,6 @@ namespace sdl int w_getJoysticks(lua_State *L); int w_getIndex(lua_State *L); int w_getJoystickCount(lua_State *L); -int w_isGamepad(lua_State *L); int w_setGamepadMapping(lua_State *L); int w_getGamepadMapping(lua_State *L); extern "C" LOVE_EXPORT int luaopen_love_joystick(lua_State *L);