diff options
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 174 |
1 files changed, 0 insertions, 174 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 7ca09a635..8e9c7d211 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -83,163 +83,6 @@ static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> | |||
| 83 | }, | 83 | }, |
| 84 | }}; | 84 | }}; |
| 85 | 85 | ||
| 86 | static const std::array<int, Settings::NativeMouseButton::NumMouseButtons> default_mouse_buttons = { | ||
| 87 | SDL_SCANCODE_LEFTBRACKET, SDL_SCANCODE_RIGHTBRACKET, SDL_SCANCODE_APOSTROPHE, | ||
| 88 | SDL_SCANCODE_MINUS, SDL_SCANCODE_EQUALS, | ||
| 89 | }; | ||
| 90 | |||
| 91 | static const std::array<int, 0x8A> keyboard_keys = { | ||
| 92 | 0, | ||
| 93 | 0, | ||
| 94 | 0, | ||
| 95 | 0, | ||
| 96 | SDL_SCANCODE_A, | ||
| 97 | SDL_SCANCODE_B, | ||
| 98 | SDL_SCANCODE_C, | ||
| 99 | SDL_SCANCODE_D, | ||
| 100 | SDL_SCANCODE_E, | ||
| 101 | SDL_SCANCODE_F, | ||
| 102 | SDL_SCANCODE_G, | ||
| 103 | SDL_SCANCODE_H, | ||
| 104 | SDL_SCANCODE_I, | ||
| 105 | SDL_SCANCODE_J, | ||
| 106 | SDL_SCANCODE_K, | ||
| 107 | SDL_SCANCODE_L, | ||
| 108 | SDL_SCANCODE_M, | ||
| 109 | SDL_SCANCODE_N, | ||
| 110 | SDL_SCANCODE_O, | ||
| 111 | SDL_SCANCODE_P, | ||
| 112 | SDL_SCANCODE_Q, | ||
| 113 | SDL_SCANCODE_R, | ||
| 114 | SDL_SCANCODE_S, | ||
| 115 | SDL_SCANCODE_T, | ||
| 116 | SDL_SCANCODE_U, | ||
| 117 | SDL_SCANCODE_V, | ||
| 118 | SDL_SCANCODE_W, | ||
| 119 | SDL_SCANCODE_X, | ||
| 120 | SDL_SCANCODE_Y, | ||
| 121 | SDL_SCANCODE_Z, | ||
| 122 | SDL_SCANCODE_1, | ||
| 123 | SDL_SCANCODE_2, | ||
| 124 | SDL_SCANCODE_3, | ||
| 125 | SDL_SCANCODE_4, | ||
| 126 | SDL_SCANCODE_5, | ||
| 127 | SDL_SCANCODE_6, | ||
| 128 | SDL_SCANCODE_7, | ||
| 129 | SDL_SCANCODE_8, | ||
| 130 | SDL_SCANCODE_9, | ||
| 131 | SDL_SCANCODE_0, | ||
| 132 | SDL_SCANCODE_RETURN, | ||
| 133 | SDL_SCANCODE_ESCAPE, | ||
| 134 | SDL_SCANCODE_BACKSPACE, | ||
| 135 | SDL_SCANCODE_TAB, | ||
| 136 | SDL_SCANCODE_SPACE, | ||
| 137 | SDL_SCANCODE_MINUS, | ||
| 138 | SDL_SCANCODE_EQUALS, | ||
| 139 | SDL_SCANCODE_LEFTBRACKET, | ||
| 140 | SDL_SCANCODE_RIGHTBRACKET, | ||
| 141 | SDL_SCANCODE_BACKSLASH, | ||
| 142 | 0, | ||
| 143 | SDL_SCANCODE_SEMICOLON, | ||
| 144 | SDL_SCANCODE_APOSTROPHE, | ||
| 145 | SDL_SCANCODE_GRAVE, | ||
| 146 | SDL_SCANCODE_COMMA, | ||
| 147 | SDL_SCANCODE_PERIOD, | ||
| 148 | SDL_SCANCODE_SLASH, | ||
| 149 | SDL_SCANCODE_CAPSLOCK, | ||
| 150 | |||
| 151 | SDL_SCANCODE_F1, | ||
| 152 | SDL_SCANCODE_F2, | ||
| 153 | SDL_SCANCODE_F3, | ||
| 154 | SDL_SCANCODE_F4, | ||
| 155 | SDL_SCANCODE_F5, | ||
| 156 | SDL_SCANCODE_F6, | ||
| 157 | SDL_SCANCODE_F7, | ||
| 158 | SDL_SCANCODE_F8, | ||
| 159 | SDL_SCANCODE_F9, | ||
| 160 | SDL_SCANCODE_F10, | ||
| 161 | SDL_SCANCODE_F11, | ||
| 162 | SDL_SCANCODE_F12, | ||
| 163 | |||
| 164 | 0, | ||
| 165 | SDL_SCANCODE_SCROLLLOCK, | ||
| 166 | SDL_SCANCODE_PAUSE, | ||
| 167 | SDL_SCANCODE_INSERT, | ||
| 168 | SDL_SCANCODE_HOME, | ||
| 169 | SDL_SCANCODE_PAGEUP, | ||
| 170 | SDL_SCANCODE_DELETE, | ||
| 171 | SDL_SCANCODE_END, | ||
| 172 | SDL_SCANCODE_PAGEDOWN, | ||
| 173 | SDL_SCANCODE_RIGHT, | ||
| 174 | SDL_SCANCODE_LEFT, | ||
| 175 | SDL_SCANCODE_DOWN, | ||
| 176 | SDL_SCANCODE_UP, | ||
| 177 | |||
| 178 | SDL_SCANCODE_NUMLOCKCLEAR, | ||
| 179 | SDL_SCANCODE_KP_DIVIDE, | ||
| 180 | SDL_SCANCODE_KP_MULTIPLY, | ||
| 181 | SDL_SCANCODE_KP_MINUS, | ||
| 182 | SDL_SCANCODE_KP_PLUS, | ||
| 183 | SDL_SCANCODE_KP_ENTER, | ||
| 184 | SDL_SCANCODE_KP_1, | ||
| 185 | SDL_SCANCODE_KP_2, | ||
| 186 | SDL_SCANCODE_KP_3, | ||
| 187 | SDL_SCANCODE_KP_4, | ||
| 188 | SDL_SCANCODE_KP_5, | ||
| 189 | SDL_SCANCODE_KP_6, | ||
| 190 | SDL_SCANCODE_KP_7, | ||
| 191 | SDL_SCANCODE_KP_8, | ||
| 192 | SDL_SCANCODE_KP_9, | ||
| 193 | SDL_SCANCODE_KP_0, | ||
| 194 | SDL_SCANCODE_KP_PERIOD, | ||
| 195 | |||
| 196 | 0, | ||
| 197 | 0, | ||
| 198 | SDL_SCANCODE_POWER, | ||
| 199 | SDL_SCANCODE_KP_EQUALS, | ||
| 200 | |||
| 201 | SDL_SCANCODE_F13, | ||
| 202 | SDL_SCANCODE_F14, | ||
| 203 | SDL_SCANCODE_F15, | ||
| 204 | SDL_SCANCODE_F16, | ||
| 205 | SDL_SCANCODE_F17, | ||
| 206 | SDL_SCANCODE_F18, | ||
| 207 | SDL_SCANCODE_F19, | ||
| 208 | SDL_SCANCODE_F20, | ||
| 209 | SDL_SCANCODE_F21, | ||
| 210 | SDL_SCANCODE_F22, | ||
| 211 | SDL_SCANCODE_F23, | ||
| 212 | SDL_SCANCODE_F24, | ||
| 213 | |||
| 214 | 0, | ||
| 215 | SDL_SCANCODE_HELP, | ||
| 216 | SDL_SCANCODE_MENU, | ||
| 217 | 0, | ||
| 218 | 0, | ||
| 219 | 0, | ||
| 220 | 0, | ||
| 221 | 0, | ||
| 222 | 0, | ||
| 223 | 0, | ||
| 224 | 0, | ||
| 225 | 0, | ||
| 226 | 0, | ||
| 227 | 0, | ||
| 228 | 0, | ||
| 229 | SDL_SCANCODE_KP_COMMA, | ||
| 230 | SDL_SCANCODE_KP_LEFTPAREN, | ||
| 231 | SDL_SCANCODE_KP_RIGHTPAREN, | ||
| 232 | 0, | ||
| 233 | 0, | ||
| 234 | 0, | ||
| 235 | 0, | ||
| 236 | }; | ||
| 237 | |||
| 238 | static const std::array<int, 8> keyboard_mods{ | ||
| 239 | SDL_SCANCODE_LCTRL, SDL_SCANCODE_LSHIFT, SDL_SCANCODE_LALT, SDL_SCANCODE_LGUI, | ||
| 240 | SDL_SCANCODE_RCTRL, SDL_SCANCODE_RSHIFT, SDL_SCANCODE_RALT, SDL_SCANCODE_RGUI, | ||
| 241 | }; | ||
| 242 | |||
| 243 | template <> | 86 | template <> |
| 244 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<std::string>& setting) { | 87 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<std::string>& setting) { |
| 245 | setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); | 88 | setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); |
| @@ -283,14 +126,6 @@ void Config::ReadValues() { | |||
| 283 | } | 126 | } |
| 284 | 127 | ||
| 285 | ReadSetting("ControlsGeneral", Settings::values.mouse_enabled); | 128 | ReadSetting("ControlsGeneral", Settings::values.mouse_enabled); |
| 286 | for (int i = 0; i < Settings::NativeMouseButton::NumMouseButtons; ++i) { | ||
| 287 | std::string default_param = InputCommon::GenerateKeyboardParam(default_mouse_buttons[i]); | ||
| 288 | Settings::values.mouse_buttons[i] = sdl2_config->Get( | ||
| 289 | "ControlsGeneral", std::string("mouse_") + Settings::NativeMouseButton::mapping[i], | ||
| 290 | default_param); | ||
| 291 | if (Settings::values.mouse_buttons[i].empty()) | ||
| 292 | Settings::values.mouse_buttons[i] = default_param; | ||
| 293 | } | ||
| 294 | 129 | ||
| 295 | ReadSetting("ControlsGeneral", Settings::values.touch_device); | 130 | ReadSetting("ControlsGeneral", Settings::values.touch_device); |
| 296 | 131 | ||
| @@ -365,15 +200,6 @@ void Config::ReadValues() { | |||
| 365 | 200 | ||
| 366 | ReadSetting("ControlsGeneral", Settings::values.udp_input_servers); | 201 | ReadSetting("ControlsGeneral", Settings::values.udp_input_servers); |
| 367 | 202 | ||
| 368 | std::transform(keyboard_keys.begin(), keyboard_keys.end(), | ||
| 369 | Settings::values.keyboard_keys.begin(), InputCommon::GenerateKeyboardParam); | ||
| 370 | std::transform(keyboard_mods.begin(), keyboard_mods.end(), | ||
| 371 | Settings::values.keyboard_keys.begin() + | ||
| 372 | Settings::NativeKeyboard::LeftControlKey, | ||
| 373 | InputCommon::GenerateKeyboardParam); | ||
| 374 | std::transform(keyboard_mods.begin(), keyboard_mods.end(), | ||
| 375 | Settings::values.keyboard_mods.begin(), InputCommon::GenerateKeyboardParam); | ||
| 376 | |||
| 377 | // Data Storage | 203 | // Data Storage |
| 378 | ReadSetting("Data Storage", Settings::values.use_virtual_sd); | 204 | ReadSetting("Data Storage", Settings::values.use_virtual_sd); |
| 379 | FS::SetYuzuPath(FS::YuzuPath::NANDDir, | 205 | FS::SetYuzuPath(FS::YuzuPath::NANDDir, |