diff options
| author | 2018-11-01 21:57:13 -0400 | |
|---|---|---|
| committer | 2018-11-18 23:22:36 -0500 | |
| commit | d1b7c65b9ec9e76e299ef96710a86311e3cecd2f (patch) | |
| tree | 4bc1a5c0c96d911cfd94e7b57aabcbf5d53a59ba /src | |
| parent | yuzu_cmd/config: Add config deserialization for multiplayer (diff) | |
| download | yuzu-d1b7c65b9ec9e76e299ef96710a86311e3cecd2f.tar.gz yuzu-d1b7c65b9ec9e76e299ef96710a86311e3cecd2f.tar.xz yuzu-d1b7c65b9ec9e76e299ef96710a86311e3cecd2f.zip | |
yuzu/config: Add (de-)serialization for multiplayer
Defaults to full keyboard for keyboard -- It did not seem to be necessary to make the keyboard configurable (besides enabled/disabled).
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 348 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.h | 4 |
2 files changed, 331 insertions, 21 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index be69fb831..c931c7cd6 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -47,39 +47,283 @@ const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> Config: | |||
| 47 | }, | 47 | }, |
| 48 | }}; | 48 | }}; |
| 49 | 49 | ||
| 50 | const std::array<int, Settings::NativeMouseButton::NumMouseButtons> Config::default_mouse_buttons = | ||
| 51 | { | ||
| 52 | Qt::Key_BracketLeft, Qt::Key_BracketRight, Qt::Key_Apostrophe, Qt::Key_Minus, Qt::Key_Equal, | ||
| 53 | }; | ||
| 54 | |||
| 55 | const std::array<int, Settings::NativeKeyboard::NumKeyboardKeys> Config::default_keyboard_keys = { | ||
| 56 | 0, | ||
| 57 | 0, | ||
| 58 | 0, | ||
| 59 | 0, | ||
| 60 | Qt::Key_A, | ||
| 61 | Qt::Key_B, | ||
| 62 | Qt::Key_C, | ||
| 63 | Qt::Key_D, | ||
| 64 | Qt::Key_E, | ||
| 65 | Qt::Key_F, | ||
| 66 | Qt::Key_G, | ||
| 67 | Qt::Key_H, | ||
| 68 | Qt::Key_I, | ||
| 69 | Qt::Key_J, | ||
| 70 | Qt::Key_K, | ||
| 71 | Qt::Key_L, | ||
| 72 | Qt::Key_M, | ||
| 73 | Qt::Key_N, | ||
| 74 | Qt::Key_O, | ||
| 75 | Qt::Key_P, | ||
| 76 | Qt::Key_Q, | ||
| 77 | Qt::Key_R, | ||
| 78 | Qt::Key_S, | ||
| 79 | Qt::Key_T, | ||
| 80 | Qt::Key_U, | ||
| 81 | Qt::Key_V, | ||
| 82 | Qt::Key_W, | ||
| 83 | Qt::Key_X, | ||
| 84 | Qt::Key_Y, | ||
| 85 | Qt::Key_Z, | ||
| 86 | Qt::Key_1, | ||
| 87 | Qt::Key_2, | ||
| 88 | Qt::Key_3, | ||
| 89 | Qt::Key_4, | ||
| 90 | Qt::Key_5, | ||
| 91 | Qt::Key_6, | ||
| 92 | Qt::Key_7, | ||
| 93 | Qt::Key_8, | ||
| 94 | Qt::Key_9, | ||
| 95 | Qt::Key_0, | ||
| 96 | Qt::Key_Enter, | ||
| 97 | Qt::Key_Escape, | ||
| 98 | Qt::Key_Backspace, | ||
| 99 | Qt::Key_Tab, | ||
| 100 | Qt::Key_Space, | ||
| 101 | Qt::Key_Minus, | ||
| 102 | Qt::Key_Equal, | ||
| 103 | Qt::Key_BracketLeft, | ||
| 104 | Qt::Key_BracketRight, | ||
| 105 | Qt::Key_Backslash, | ||
| 106 | Qt::Key_Dead_Tilde, | ||
| 107 | Qt::Key_Semicolon, | ||
| 108 | Qt::Key_Apostrophe, | ||
| 109 | Qt::Key_Dead_Grave, | ||
| 110 | Qt::Key_Comma, | ||
| 111 | Qt::Key_Period, | ||
| 112 | Qt::Key_Slash, | ||
| 113 | Qt::Key_CapsLock, | ||
| 114 | |||
| 115 | Qt::Key_F1, | ||
| 116 | Qt::Key_F2, | ||
| 117 | Qt::Key_F3, | ||
| 118 | Qt::Key_F4, | ||
| 119 | Qt::Key_F5, | ||
| 120 | Qt::Key_F6, | ||
| 121 | Qt::Key_F7, | ||
| 122 | Qt::Key_F8, | ||
| 123 | Qt::Key_F9, | ||
| 124 | Qt::Key_F10, | ||
| 125 | Qt::Key_F11, | ||
| 126 | Qt::Key_F12, | ||
| 127 | |||
| 128 | Qt::Key_SysReq, | ||
| 129 | Qt::Key_ScrollLock, | ||
| 130 | Qt::Key_Pause, | ||
| 131 | Qt::Key_Insert, | ||
| 132 | Qt::Key_Home, | ||
| 133 | Qt::Key_PageUp, | ||
| 134 | Qt::Key_Delete, | ||
| 135 | Qt::Key_End, | ||
| 136 | Qt::Key_PageDown, | ||
| 137 | Qt::Key_Right, | ||
| 138 | Qt::Key_Left, | ||
| 139 | Qt::Key_Down, | ||
| 140 | Qt::Key_Up, | ||
| 141 | |||
| 142 | Qt::Key_NumLock, | ||
| 143 | Qt::Key_Slash, | ||
| 144 | Qt::Key_Asterisk, | ||
| 145 | Qt::Key_Minus, | ||
| 146 | Qt::Key_Plus, | ||
| 147 | Qt::Key_Enter, | ||
| 148 | Qt::Key_1, | ||
| 149 | Qt::Key_2, | ||
| 150 | Qt::Key_3, | ||
| 151 | Qt::Key_4, | ||
| 152 | Qt::Key_5, | ||
| 153 | Qt::Key_6, | ||
| 154 | Qt::Key_7, | ||
| 155 | Qt::Key_8, | ||
| 156 | Qt::Key_9, | ||
| 157 | Qt::Key_0, | ||
| 158 | Qt::Key_Period, | ||
| 159 | |||
| 160 | 0, | ||
| 161 | 0, | ||
| 162 | Qt::Key_PowerOff, | ||
| 163 | Qt::Key_Equal, | ||
| 164 | |||
| 165 | Qt::Key_F13, | ||
| 166 | Qt::Key_F14, | ||
| 167 | Qt::Key_F15, | ||
| 168 | Qt::Key_F16, | ||
| 169 | Qt::Key_F17, | ||
| 170 | Qt::Key_F18, | ||
| 171 | Qt::Key_F19, | ||
| 172 | Qt::Key_F20, | ||
| 173 | Qt::Key_F21, | ||
| 174 | Qt::Key_F22, | ||
| 175 | Qt::Key_F23, | ||
| 176 | Qt::Key_F24, | ||
| 177 | |||
| 178 | Qt::Key_Open, | ||
| 179 | Qt::Key_Help, | ||
| 180 | Qt::Key_Menu, | ||
| 181 | 0, | ||
| 182 | Qt::Key_Stop, | ||
| 183 | Qt::Key_AudioRepeat, | ||
| 184 | Qt::Key_Undo, | ||
| 185 | Qt::Key_Cut, | ||
| 186 | Qt::Key_Copy, | ||
| 187 | Qt::Key_Paste, | ||
| 188 | Qt::Key_Find, | ||
| 189 | Qt::Key_VolumeMute, | ||
| 190 | Qt::Key_VolumeUp, | ||
| 191 | Qt::Key_VolumeDown, | ||
| 192 | Qt::Key_CapsLock, | ||
| 193 | Qt::Key_NumLock, | ||
| 194 | Qt::Key_ScrollLock, | ||
| 195 | Qt::Key_Comma, | ||
| 196 | |||
| 197 | Qt::Key_ParenLeft, | ||
| 198 | Qt::Key_ParenRight, | ||
| 199 | }; | ||
| 200 | |||
| 201 | const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> Config::default_keyboard_mods = { | ||
| 202 | Qt::Key_Control, Qt::Key_Shift, Qt::Key_Alt, Qt::Key_ApplicationLeft, | ||
| 203 | Qt::Key_Control, Qt::Key_Shift, Qt::Key_AltGr, Qt::Key_ApplicationRight, | ||
| 204 | }; | ||
| 205 | |||
| 50 | void Config::ReadValues() { | 206 | void Config::ReadValues() { |
| 51 | qt_config->beginGroup("Controls"); | 207 | qt_config->beginGroup("Controls"); |
| 208 | for (std::size_t p = 0; p < 10; ++p) { | ||
| 209 | Settings::values.players[p].connected = | ||
| 210 | qt_config->value(QString("player_%1_connected").arg(p), false).toBool(); | ||
| 211 | |||
| 212 | Settings::values.players[p].type = static_cast<Settings::ControllerType>( | ||
| 213 | qt_config | ||
| 214 | ->value(QString("player_%1_type").arg(p), | ||
| 215 | static_cast<u8>(Settings::ControllerType::DualJoycon)) | ||
| 216 | .toUInt()); | ||
| 217 | |||
| 218 | Settings::values.players[p].body_color_left = | ||
| 219 | qt_config | ||
| 220 | ->value(QString("player_%1_body_color_left").arg(p), | ||
| 221 | Settings::JOYCON_BODY_NEON_BLUE) | ||
| 222 | .toUInt(); | ||
| 223 | Settings::values.players[p].body_color_right = | ||
| 224 | qt_config | ||
| 225 | ->value(QString("player_%1_body_color_right").arg(p), | ||
| 226 | Settings::JOYCON_BODY_NEON_RED) | ||
| 227 | .toUInt(); | ||
| 228 | Settings::values.players[p].button_color_left = | ||
| 229 | qt_config | ||
| 230 | ->value(QString("player_%1_button_color_left").arg(p), | ||
| 231 | Settings::JOYCON_BUTTONS_NEON_BLUE) | ||
| 232 | .toUInt(); | ||
| 233 | Settings::values.players[p].button_color_right = | ||
| 234 | qt_config | ||
| 235 | ->value(QString("player_%1_button_color_right").arg(p), | ||
| 236 | Settings::JOYCON_BUTTONS_NEON_RED) | ||
| 237 | .toUInt(); | ||
| 238 | |||
| 239 | for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) { | ||
| 240 | std::string default_param = InputCommon::GenerateKeyboardParam(default_buttons[i]); | ||
| 241 | Settings::values.players[p].buttons[i] = | ||
| 242 | qt_config | ||
| 243 | ->value(QString("player_%1_").arg(p) + Settings::NativeButton::mapping[i], | ||
| 244 | QString::fromStdString(default_param)) | ||
| 245 | .toString() | ||
| 246 | .toStdString(); | ||
| 247 | if (Settings::values.players[p].buttons[i].empty()) | ||
| 248 | Settings::values.players[p].buttons[i] = default_param; | ||
| 249 | } | ||
| 250 | |||
| 251 | for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) { | ||
| 252 | std::string default_param = InputCommon::GenerateAnalogParamFromKeys( | ||
| 253 | default_analogs[i][0], default_analogs[i][1], default_analogs[i][2], | ||
| 254 | default_analogs[i][3], default_analogs[i][4], 0.5f); | ||
| 255 | Settings::values.players[p].analogs[i] = | ||
| 256 | qt_config | ||
| 257 | ->value(QString("player_%1_").arg(p) + Settings::NativeAnalog::mapping[i], | ||
| 258 | QString::fromStdString(default_param)) | ||
| 259 | .toString() | ||
| 260 | .toStdString(); | ||
| 261 | if (Settings::values.players[p].analogs[i].empty()) | ||
| 262 | Settings::values.players[p].analogs[i] = default_param; | ||
| 263 | } | ||
| 264 | } | ||
| 265 | |||
| 266 | std::stable_partition(Settings::values.players.begin(), Settings::values.players.end(), | ||
| 267 | [](const auto& player) { return player.connected; }); | ||
| 268 | |||
| 269 | Settings::values.motion_device = | ||
| 270 | qt_config->value("motion_device", "engine:motion_emu,update_period:100,sensitivity:0.01") | ||
| 271 | .toString() | ||
| 272 | .toStdString(); | ||
| 273 | |||
| 274 | Settings::values.mouse_enabled = qt_config->value("mouse_enabled", false).toBool(); | ||
| 275 | |||
| 276 | for (int i = 0; i < Settings::NativeMouseButton::NumMouseButtons; ++i) { | ||
| 277 | std::string default_param = InputCommon::GenerateKeyboardParam(default_mouse_buttons[i]); | ||
| 278 | Settings::values.mouse_buttons[i] = | ||
| 279 | qt_config | ||
| 280 | ->value(QString("mouse_") + Settings::NativeMouseButton::mapping[i], | ||
| 281 | QString::fromStdString(default_param)) | ||
| 282 | .toString() | ||
| 283 | .toStdString(); | ||
| 284 | if (Settings::values.mouse_buttons[i].empty()) | ||
| 285 | Settings::values.mouse_buttons[i] = default_param; | ||
| 286 | } | ||
| 287 | |||
| 288 | Settings::values.keyboard_enabled = qt_config->value("keyboard_enabled", false).toBool(); | ||
| 289 | |||
| 290 | Settings::values.debug_pad_enabled = qt_config->value("debug_pad_enabled", false).toBool(); | ||
| 52 | for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) { | 291 | for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) { |
| 53 | std::string default_param = InputCommon::GenerateKeyboardParam(default_buttons[i]); | 292 | std::string default_param = InputCommon::GenerateKeyboardParam(default_buttons[i]); |
| 54 | Settings::values.buttons[i] = | 293 | Settings::values.debug_pad_buttons[i] = |
| 55 | qt_config | 294 | qt_config |
| 56 | ->value(Settings::NativeButton::mapping[i], QString::fromStdString(default_param)) | 295 | ->value(QString("debug_pad_") + Settings::NativeButton::mapping[i], |
| 296 | QString::fromStdString(default_param)) | ||
| 57 | .toString() | 297 | .toString() |
| 58 | .toStdString(); | 298 | .toStdString(); |
| 59 | if (Settings::values.buttons[i].empty()) | 299 | if (Settings::values.debug_pad_buttons[i].empty()) |
| 60 | Settings::values.buttons[i] = default_param; | 300 | Settings::values.debug_pad_buttons[i] = default_param; |
| 61 | } | 301 | } |
| 62 | 302 | ||
| 63 | for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) { | 303 | for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) { |
| 64 | std::string default_param = InputCommon::GenerateAnalogParamFromKeys( | 304 | std::string default_param = InputCommon::GenerateAnalogParamFromKeys( |
| 65 | default_analogs[i][0], default_analogs[i][1], default_analogs[i][2], | 305 | default_analogs[i][0], default_analogs[i][1], default_analogs[i][2], |
| 66 | default_analogs[i][3], default_analogs[i][4], 0.5f); | 306 | default_analogs[i][3], default_analogs[i][4], 0.5f); |
| 67 | Settings::values.analogs[i] = | 307 | Settings::values.debug_pad_analogs[i] = |
| 68 | qt_config | 308 | qt_config |
| 69 | ->value(Settings::NativeAnalog::mapping[i], QString::fromStdString(default_param)) | 309 | ->value(QString("debug_pad_") + Settings::NativeAnalog::mapping[i], |
| 310 | QString::fromStdString(default_param)) | ||
| 70 | .toString() | 311 | .toString() |
| 71 | .toStdString(); | 312 | .toStdString(); |
| 72 | if (Settings::values.analogs[i].empty()) | 313 | if (Settings::values.debug_pad_analogs[i].empty()) |
| 73 | Settings::values.analogs[i] = default_param; | 314 | Settings::values.debug_pad_analogs[i] = default_param; |
| 74 | } | 315 | } |
| 75 | 316 | ||
| 76 | Settings::values.motion_device = | 317 | Settings::values.touchscreen.enabled = qt_config->value("touchscreen_enabled", true).toBool(); |
| 77 | qt_config->value("motion_device", "engine:motion_emu,update_period:100,sensitivity:0.01") | 318 | Settings::values.touchscreen.device = |
| 78 | .toString() | 319 | qt_config->value("touchscreen_device", "engine:emu_window").toString().toStdString(); |
| 79 | .toStdString(); | ||
| 80 | Settings::values.touch_device = | ||
| 81 | qt_config->value("touch_device", "engine:emu_window").toString().toStdString(); | ||
| 82 | 320 | ||
| 321 | Settings::values.touchscreen.finger = qt_config->value("touchscreen_finger", 0).toUInt(); | ||
| 322 | Settings::values.touchscreen.rotation_angle = qt_config->value("touchscreen_angle", 0).toUInt(); | ||
| 323 | Settings::values.touchscreen.diameter_x = | ||
| 324 | qt_config->value("touchscreen_diameter_x", 15).toUInt(); | ||
| 325 | Settings::values.touchscreen.diameter_y = | ||
| 326 | qt_config->value("touchscreen_diameter_y", 15).toUInt(); | ||
| 83 | qt_config->endGroup(); | 327 | qt_config->endGroup(); |
| 84 | 328 | ||
| 85 | qt_config->beginGroup("Core"); | 329 | qt_config->beginGroup("Core"); |
| @@ -126,6 +370,20 @@ void Config::ReadValues() { | |||
| 126 | .toStdString()); | 370 | .toStdString()); |
| 127 | qt_config->endGroup(); | 371 | qt_config->endGroup(); |
| 128 | 372 | ||
| 373 | std::transform(default_keyboard_keys.begin(), default_keyboard_keys.end(), | ||
| 374 | Settings::values.keyboard_keys.begin(), InputCommon::GenerateKeyboardParam); | ||
| 375 | std::transform(default_keyboard_mods.begin(), default_keyboard_mods.end(), | ||
| 376 | Settings::values.keyboard_keys.begin() + | ||
| 377 | Settings::NativeKeyboard::LeftControlKey, | ||
| 378 | InputCommon::GenerateKeyboardParam); | ||
| 379 | std::transform(default_keyboard_mods.begin(), default_keyboard_mods.end(), | ||
| 380 | Settings::values.keyboard_mods.begin(), InputCommon::GenerateKeyboardParam); | ||
| 381 | |||
| 382 | qt_config->beginGroup("Core"); | ||
| 383 | Settings::values.use_cpu_jit = qt_config->value("use_cpu_jit", true).toBool(); | ||
| 384 | Settings::values.use_multi_core = qt_config->value("use_multi_core", false).toBool(); | ||
| 385 | qt_config->endGroup(); | ||
| 386 | |||
| 129 | qt_config->beginGroup("System"); | 387 | qt_config->beginGroup("System"); |
| 130 | Settings::values.use_docked_mode = qt_config->value("use_docked_mode", false).toBool(); | 388 | Settings::values.use_docked_mode = qt_config->value("use_docked_mode", false).toBool(); |
| 131 | Settings::values.enable_nfc = qt_config->value("enable_nfc", true).toBool(); | 389 | Settings::values.enable_nfc = qt_config->value("enable_nfc", true).toBool(); |
| @@ -232,16 +490,65 @@ void Config::ReadValues() { | |||
| 232 | 490 | ||
| 233 | void Config::SaveValues() { | 491 | void Config::SaveValues() { |
| 234 | qt_config->beginGroup("Controls"); | 492 | qt_config->beginGroup("Controls"); |
| 493 | for (int p = 0; p < 10; ++p) { | ||
| 494 | qt_config->setValue(QString("player_%1_connected").arg(p), | ||
| 495 | Settings::values.players[p].connected); | ||
| 496 | qt_config->setValue(QString("player_%1_type").arg(p), | ||
| 497 | static_cast<u8>(Settings::values.players[p].type)); | ||
| 498 | |||
| 499 | qt_config->setValue(QString("player_%1_body_color_left").arg(p), | ||
| 500 | Settings::values.players[p].body_color_left); | ||
| 501 | qt_config->setValue(QString("player_%1_body_color_right").arg(p), | ||
| 502 | Settings::values.players[p].body_color_right); | ||
| 503 | qt_config->setValue(QString("player_%1_button_color_left").arg(p), | ||
| 504 | Settings::values.players[p].button_color_left); | ||
| 505 | qt_config->setValue(QString("player_%1_button_color_right").arg(p), | ||
| 506 | Settings::values.players[p].button_color_right); | ||
| 507 | |||
| 508 | for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) { | ||
| 509 | qt_config->setValue(QString("player_%1_").arg(p) + | ||
| 510 | QString::fromStdString(Settings::NativeButton::mapping[i]), | ||
| 511 | QString::fromStdString(Settings::values.players[p].buttons[i])); | ||
| 512 | } | ||
| 513 | for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) { | ||
| 514 | qt_config->setValue(QString("player_%1_").arg(p) + | ||
| 515 | QString::fromStdString(Settings::NativeAnalog::mapping[i]), | ||
| 516 | QString::fromStdString(Settings::values.players[p].analogs[i])); | ||
| 517 | } | ||
| 518 | } | ||
| 519 | |||
| 520 | qt_config->setValue("motion_device", QString::fromStdString(Settings::values.motion_device)); | ||
| 521 | |||
| 522 | qt_config->setValue("mouse_enabled", Settings::values.mouse_enabled); | ||
| 523 | |||
| 524 | for (int i = 0; i < Settings::NativeMouseButton::NumMouseButtons; ++i) { | ||
| 525 | qt_config->setValue(QString("mouse_") + | ||
| 526 | QString::fromStdString(Settings::NativeMouseButton::mapping[i]), | ||
| 527 | QString::fromStdString(Settings::values.mouse_buttons[i])); | ||
| 528 | } | ||
| 529 | |||
| 530 | qt_config->setValue("keyboard_enabled", Settings::values.keyboard_enabled); | ||
| 531 | |||
| 532 | qt_config->setValue("debug_pad_enabled", Settings::values.debug_pad_enabled); | ||
| 235 | for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) { | 533 | for (int i = 0; i < Settings::NativeButton::NumButtons; ++i) { |
| 236 | qt_config->setValue(QString::fromStdString(Settings::NativeButton::mapping[i]), | 534 | qt_config->setValue(QString("debug_pad_") + |
| 237 | QString::fromStdString(Settings::values.buttons[i])); | 535 | QString::fromStdString(Settings::NativeButton::mapping[i]), |
| 536 | QString::fromStdString(Settings::values.debug_pad_buttons[i])); | ||
| 238 | } | 537 | } |
| 239 | for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) { | 538 | for (int i = 0; i < Settings::NativeAnalog::NumAnalogs; ++i) { |
| 240 | qt_config->setValue(QString::fromStdString(Settings::NativeAnalog::mapping[i]), | 539 | qt_config->setValue(QString("debug_pad_") + |
| 241 | QString::fromStdString(Settings::values.analogs[i])); | 540 | QString::fromStdString(Settings::NativeAnalog::mapping[i]), |
| 541 | QString::fromStdString(Settings::values.debug_pad_analogs[i])); | ||
| 242 | } | 542 | } |
| 243 | qt_config->setValue("motion_device", QString::fromStdString(Settings::values.motion_device)); | 543 | |
| 244 | qt_config->setValue("touch_device", QString::fromStdString(Settings::values.touch_device)); | 544 | qt_config->setValue("touchscreen_enabled", Settings::values.touchscreen.enabled); |
| 545 | qt_config->setValue("touchscreen_device", | ||
| 546 | QString::fromStdString(Settings::values.touchscreen.device)); | ||
| 547 | |||
| 548 | qt_config->setValue("touchscreen_finger", Settings::values.touchscreen.finger); | ||
| 549 | qt_config->setValue("touchscreen_angle", Settings::values.touchscreen.rotation_angle); | ||
| 550 | qt_config->setValue("touchscreen_diameter_x", Settings::values.touchscreen.diameter_x); | ||
| 551 | qt_config->setValue("touchscreen_diameter_y", Settings::values.touchscreen.diameter_y); | ||
| 245 | qt_config->endGroup(); | 552 | qt_config->endGroup(); |
| 246 | 553 | ||
| 247 | qt_config->beginGroup("Core"); | 554 | qt_config->beginGroup("Core"); |
| @@ -280,7 +587,6 @@ void Config::SaveValues() { | |||
| 280 | qt_config->setValue("use_docked_mode", Settings::values.use_docked_mode); | 587 | qt_config->setValue("use_docked_mode", Settings::values.use_docked_mode); |
| 281 | qt_config->setValue("enable_nfc", Settings::values.enable_nfc); | 588 | qt_config->setValue("enable_nfc", Settings::values.enable_nfc); |
| 282 | qt_config->setValue("current_user", Settings::values.current_user); | 589 | qt_config->setValue("current_user", Settings::values.current_user); |
| 283 | |||
| 284 | qt_config->setValue("language_index", Settings::values.language_index); | 590 | qt_config->setValue("language_index", Settings::values.language_index); |
| 285 | 591 | ||
| 286 | qt_config->setValue("rng_seed_enabled", Settings::values.rng_seed.has_value()); | 592 | qt_config->setValue("rng_seed_enabled", Settings::values.rng_seed.has_value()); |
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index 9c99c1b75..1facd6b55 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h | |||
| @@ -22,6 +22,10 @@ public: | |||
| 22 | 22 | ||
| 23 | static const std::array<int, Settings::NativeButton::NumButtons> default_buttons; | 23 | static const std::array<int, Settings::NativeButton::NumButtons> default_buttons; |
| 24 | static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs; | 24 | static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs; |
| 25 | static const std::array<int, Settings::NativeMouseButton::NumMouseButtons> | ||
| 26 | default_mouse_buttons; | ||
| 27 | static const std::array<int, Settings::NativeKeyboard::NumKeyboardKeys> default_keyboard_keys; | ||
| 28 | static const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> default_keyboard_mods; | ||
| 25 | 29 | ||
| 26 | private: | 30 | private: |
| 27 | void ReadValues(); | 31 | void ReadValues(); |