used in an "emergency" where no configs could be loaded from the inputmanager config file allows the user to select to reconfigure in menus if this happens without having to delete es_input.cfg manually
| 404 | //used in an "emergency" where no configs could be loaded from the inputmanager config file |
| 405 | //allows the user to select to reconfigure in menus if this happens without having to delete es_input.cfg manually |
| 406 | void InputManager::loadDefaultConfig() |
| 407 | { |
| 408 | InputConfig* cfg = getInputConfigByDevice(DEVICE_KEYBOARD); |
| 409 | |
| 410 | mNumPlayers++; |
| 411 | cfg->setPlayerNum(0); |
| 412 | cfg->mapInput("up", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_UP, 1, true)); |
| 413 | cfg->mapInput("down", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_DOWN, 1, true)); |
| 414 | cfg->mapInput("left", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_LEFT, 1, true)); |
| 415 | cfg->mapInput("right", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_RIGHT, 1, true)); |
| 416 | |
| 417 | cfg->mapInput("a", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_RETURN, 1, true)); |
| 418 | cfg->mapInput("b", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_ESCAPE, 1, true)); |
| 419 | cfg->mapInput("menu", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F1, 1, true)); |
| 420 | cfg->mapInput("select", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F2, 1, true)); |
| 421 | cfg->mapInput("pageup", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_RIGHTBRACKET, 1, true)); |
| 422 | cfg->mapInput("pagedown", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_LEFTBRACKET, 1, true)); |
| 423 | |
| 424 | cfg->mapInput("mastervolup", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_PLUS, 1, true)); |
| 425 | cfg->mapInput("mastervoldown", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_MINUS, 1, true)); |
| 426 | |
| 427 | cfg->mapInput("sortordernext", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F7, 1, true)); |
| 428 | cfg->mapInput("sortorderprevious", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F8, 1, true)); |
| 429 | } |
| 430 | |
| 431 | void InputManager::writeConfig() |
| 432 | { |
nothing calls this directly
no test coverage detected