Allow using shift-f11 in kart selection screen

This commit is contained in:
Benau
2021-09-01 11:17:07 +08:00
parent f9fa9a764b
commit e3a88c71e2
2 changed files with 4 additions and 2 deletions

View File

@@ -363,7 +363,7 @@ void InputManager::handleStaticAction(int key, int value)
}
case IRR_KEY_F11:
{
if (value && world)
if (value)
{
if (control_is_pressed)
{

View File

@@ -132,6 +132,9 @@ void History::updateReplay(int world_ticks)
*/
void History::Save()
{
World *world = World::getWorld();
if (!world)
return;
FILE *fd = fopen("history.dat","w");
if(fd)
Log::info("History", "Saved in ./history.dat.");
@@ -150,7 +153,6 @@ void History::Save()
return;
}
World *world = World::getWorld();
const int num_karts = world->getNumKarts();
fprintf(fd, "STK-version: %s\n", STK_VERSION);
fprintf(fd, "History-version: %d\n", 1);