mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
Removed some redundant code.
--HG-- branch : minor
This commit is contained in:
@@ -122,17 +122,7 @@ bool Joystick::isConnected() const
|
|||||||
|
|
||||||
const char *Joystick::getName() const
|
const char *Joystick::getName() const
|
||||||
{
|
{
|
||||||
// Use the saved name if this Joystick isn't connected anymore.
|
return name.c_str();
|
||||||
if (!isConnected())
|
|
||||||
return name.c_str();
|
|
||||||
|
|
||||||
// Prefer the Joystick name for consistency.
|
|
||||||
const char *joyname = SDL_JoystickName(joyhandle);
|
|
||||||
|
|
||||||
if (!joyname && isGamepad())
|
|
||||||
joyname = SDL_GameControllerName(controller);
|
|
||||||
|
|
||||||
return joyname;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Joystick::getAxisCount() const
|
int Joystick::getAxisCount() const
|
||||||
|
|||||||
Reference in New Issue
Block a user