From 1add8b3172612d82bd0901824a212114ae60d6c0 Mon Sep 17 00:00:00 2001 From: vitika9 Date: Tue, 27 Jul 2021 14:51:42 +0530 Subject: [PATCH] Removed Redundant assignement of name inside configure_joypad function --- platform/osx/joypad_osx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp index 126ebc1908b..d778271350f 100644 --- a/platform/osx/joypad_osx.cpp +++ b/platform/osx/joypad_osx.cpp @@ -286,8 +286,9 @@ bool JoypadOSX::configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy) { } if ((!refCF) || (!CFStringGetCString((CFStringRef)refCF, c_name, sizeof(c_name), kCFStringEncodingUTF8))) { name = "Unidentified Joypad"; + } else { + name = c_name; } - name = c_name; int id = input->get_unused_joy_id(); ERR_FAIL_COND_V(id == -1, false);