From 2b62267541dafe47a319d0d349f613cdd3199018 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 19 Nov 2026 03:06:02 -0600 Subject: ControllerInterface/SDL: Replace empty string comparisons with .empty() function calls to fix clang-tidy warnings. --- Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/SDL') diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp index 49b86a7274..a28c6ed19e 100644 --- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp @@ -132,15 +132,15 @@ InputBackend::InputBackend(ControllerInterface* controller_interface) { EnableSDLLogging(); - if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_ENHANCED_REPORTS) == "") + if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_ENHANCED_REPORTS).empty()) Config::SetBase(Config::MAIN_SDL_HINT_JOYSTICK_ENHANCED_REPORTS, "1"); // We have our own WGI backend. Enabling SDL's WGI handling creates even more redundant devices. - if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_WGI) == "") + if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_WGI).empty()) Config::SetBase(Config::MAIN_SDL_HINT_JOYSTICK_WGI, "0"); // Disable DualSense Player LEDs; We already colorize the Primary LED - if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED) == "") + if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED).empty()) Config::SetBase(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "0"); // Disabling DirectInput support apparently solves hangs on shutdown for users with @@ -148,14 +148,14 @@ InputBackend::InputBackend(ControllerInterface* controller_interface) // and DS4 Controllers, so we leave it enabled for now. // It also works around a possibly related random hang on a IDirectInputDevice8_Acquire // call within SDL. - if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_DIRECTINPUT) == "") + if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_DIRECTINPUT).empty()) Config::SetBase(Config::MAIN_SDL_HINT_JOYSTICK_DIRECTINPUT, "1"); // Pre-populate the default Joy-Con hints so they can be easily changed - if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS) == "") + if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS).empty()) Config::SetBase(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "1"); - if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS) == "") + if (Config::Get(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS).empty()) Config::SetBase(Config::MAIN_SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS, "0"); // Disable SDL's GC Adapter handling when we want to handle it ourselves. -- cgit v1.2.3