mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +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
|
||||
{
|
||||
// Use the saved name if this Joystick isn't connected anymore.
|
||||
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;
|
||||
return name.c_str();
|
||||
}
|
||||
|
||||
int Joystick::getAxisCount() const
|
||||
|
||||
Reference in New Issue
Block a user