added message when attempting to quit game on Emscripten platform
authorHolger Schemel <info@artsoft.org>
Sat, 25 Sep 2021 00:31:58 +0000 (02:31 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 25 Sep 2021 00:31:58 +0000 (02:31 +0200)
src/screens.c

index a1470f20dd5a6c305f169c598767144485406837..d648b00e914a95b3a618cf3ce23b0c1a891ca85f 100644 (file)
@@ -2232,9 +2232,13 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
        SaveLevelSetup_LastSeries();
        SaveLevelSetup_SeriesInfo();
 
+#if defined(PLATFORM_EMSCRIPTEN)
+       Request("Close the browser window to quit!", REQ_CONFIRM);
+#else
        if (!setup.ask_on_quit_program ||
            Request("Do you really want to quit?", REQ_ASK | REQ_STAY_CLOSED))
          SetGameStatus(GAME_MODE_QUIT);
+#endif
       }
     }
   }