diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2026-11-19 03:06:02 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2026-11-21 15:05:45 -0600 |
| commit | 2b62267541dafe47a319d0d349f613cdd3199018 (patch) | |
| tree | 197b491bf93f1f9794e7530ca93ce987beebbeca /Source/Core/InputCommon/ControllerInterface/SDL | |
| parent | 737fd4cbb075095a3bc7a943a87439e10889fdba (diff) | |
ControllerInterface/SDL: Replace empty string comparisons with .empty() function calls to fix clang-tidy warnings.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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. |
