From f92541fbd9da5091636aac09fdabd1a5fd0191ce Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 19 Jul 2022 15:13:26 -0700 Subject: StripSpaces: only strip spaces StripWhitespace maintains old behavior --- Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm | 2 +- Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/OSX') diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm index 10c30ffb21..2d0651b6bd 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm @@ -139,7 +139,7 @@ static std::string GetDeviceRefName(IOHIDDeviceRef inIOHIDDeviceRef) { const NSString* name = reinterpret_cast( IOHIDDeviceGetProperty(inIOHIDDeviceRef, CFSTR(kIOHIDProductKey))); - return (name != nullptr) ? std::string(StripSpaces([name UTF8String])) : "Unknown device"; + return (name != nullptr) ? std::string(StripWhitespace([name UTF8String])) : "Unknown device"; } static void DeviceRemovalCallback(void* inContext, IOReturn inResult, void* inSender, diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm index f8ee6e5446..82ad68e205 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm @@ -164,7 +164,7 @@ std::string Joystick::Button::GetName() const { std::ostringstream s; s << IOHIDElementGetUsage(m_element); - return std::string("Button ").append(StripSpaces(s.str())); + return std::string("Button ").append(StripWhitespace(s.str())); } Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction dir) @@ -210,7 +210,7 @@ Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction d std::ostringstream s; s << "CK-"; s << elementCookie; - description = StripSpaces(s.str()); + description = StripWhitespace(s.str()); break; } } -- cgit v1.2.3