general: Convert use_docked_mode to an enumeration

Allows some special interactions with it in the Qt frontend.
This commit is contained in:
lat9nq
2023-08-21 16:03:30 -04:00
parent 8a4cb3f902
commit 387ede76d2
17 changed files with 74 additions and 35 deletions

View File

@ -331,7 +331,7 @@ Controller_Gesture::GestureProperties Controller_Gesture::GetGestureProperties()
};
// Hack: There is no touch in docked but games still allow it
if (Settings::values.use_docked_mode.GetValue()) {
if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) {
gesture.points[id] = {
.x = static_cast<s32>(active_x * Layout::ScreenDocked::Width),
.y = static_cast<s32>(active_y * Layout::ScreenDocked::Height),

View File

@ -1518,7 +1518,7 @@ bool Controller_NPad::IsControllerSupported(Core::HID::NpadStyleIndex controller
return false;
}
// Handheld shouldn't be supported in docked mode
if (Settings::values.use_docked_mode.GetValue()) {
if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) {
return false;
}