| 410 | } |
| 411 | |
| 412 | static void ShortcutQuickSaveGame() |
| 413 | { |
| 414 | // Do a quick save in playing mode and a regular save in Scenario Editor mode. In other cases, don't do anything. |
| 415 | if (gLegacyScene == LegacyScene::playing) |
| 416 | { |
| 417 | ToolCancel(); |
| 418 | SaveGame(); |
| 419 | } |
| 420 | else if (gLegacyScene == LegacyScene::scenarioEditor) |
| 421 | { |
| 422 | auto intent = Intent(WindowClass::loadsave); |
| 423 | intent.PutEnumExtra<LoadSaveAction>(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); |
| 424 | intent.PutEnumExtra<LoadSaveType>(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); |
| 425 | intent.PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioOptions.name); |
| 426 | ContextOpenIntent(&intent); |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | static void ShortcutLoadGame() |
| 431 | { |
nothing calls this directly
no test coverage detected