X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=b7ad82d4d4fcd2e8bbf7827b577d95001912a677;hb=9e5b242142cda73a8b1ae8ae52aa927999b5481d;hp=809d7c2d6c738811a0b58933d3b50a145852e884;hpb=e89a21e95b3cb84d1515c0fb3378ce902a48c1c8;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 809d7c2d..b7ad82d4 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1729,6 +1729,11 @@ void DrawMainMenu(void) if (leveldir_current != leveldir_last_valid) { + // level setup config may have been loaded to "last played" tree node copy, + // but "leveldir_current" now points to the "original" level set tree node, + // in which case "handicap_level" may still default to the first level + LoadLevelSetup_SeriesInfo(); + UpdateLastPlayedLevels_TreeInfo(); levelset_has_changed = TRUE; @@ -7133,7 +7138,12 @@ static void ToggleUseApiServerIfNeeded(void) runtime.use_api_server = setup.use_api_server; if (runtime.use_api_server) + { + if (setup.has_remaining_tapes) + setup.ask_for_uploading_tapes = TRUE; + CheckApiServerTasks(); + } } static void ModifyGameSpeedIfNeeded(void) @@ -7672,7 +7682,7 @@ static Key getSetupKey(void) { case EVENT_KEYPRESS: { - key = GetEventKey((KeyEvent *)&event, TRUE); + key = GetEventKey((KeyEvent *)&event); // press 'Escape' or 'Enter' to keep the existing key binding if (key == KSYM_Escape || key == KSYM_Return) @@ -8469,7 +8479,7 @@ static boolean CustomizeKeyboardMain(int player_nr) { case EVENT_KEYPRESS: { - Key key = GetEventKey((KeyEvent *)&event, FALSE); + Key key = GetEventKey((KeyEvent *)&event); // press 'Escape' to abort and keep the old key bindings if (key == KSYM_Escape) @@ -9120,7 +9130,7 @@ static boolean ConfigureVirtualButtonsMain(void) case EVENT_KEYPRESS: { - Key key = GetEventKey((KeyEvent *)&event, FALSE); + Key key = GetEventKey((KeyEvent *)&event); action = (key == KSYM_Escape ? ACTION_ESCAPE : key == KSYM_BackSpace || @@ -10477,6 +10487,9 @@ static boolean OfferUploadTapes(void) "Upload all your tapes to the high score server now?", REQ_ASK)) return FALSE; + // when uploading tapes, make sure that high score server is enabled + runtime.use_api_server = setup.use_api_server = TRUE; + int num_tapes_uploaded = UploadTapes(); char message[100];