diff --git a/source/application.cpp b/source/application.cpp index ce9588f..7068d7f 100644 --- a/source/application.cpp +++ b/source/application.cpp @@ -2548,7 +2548,11 @@ namespace gmtk private: context const & context_; +#ifdef __EMSCRIPTEN__ + bool is_windowed_ = true; +#else bool is_windowed_ = false; +#endif std::unique_ptr audio_; audio::mixer_ptr mixer_; @@ -2659,7 +2663,9 @@ namespace gmtk menu_buttons_.push_back({"Challenge mode", [this]{ start_new_game(true, false, true); }}); menu_buttons_.push_back({"Sandbox mode", [this]{ start_new_game(true, true, true); }}); menu_buttons_.push_back({is_windowed_ ? "Windowed" : "Fullscreen", [this]{ is_windowed_ ^= true; context_.windowed(is_windowed_); set_start_menu_buttons(); }}); +#ifndef __EMSCRIPTEN__ menu_buttons_.push_back({"Exit", [this]{ stop(); }}); +#endif } void set_escape_menu_buttons() @@ -2675,7 +2681,9 @@ namespace gmtk }}); menu_buttons_.push_back({"Main menu", [this]{ set_start_menu(); }}); menu_buttons_.push_back({is_windowed_ ? "Windowed" : "Fullscreen", [this]{ is_windowed_ ^= true; context_.windowed(is_windowed_); set_escape_menu_buttons(); }}); +#ifndef __EMSCRIPTEN__ menu_buttons_.push_back({"Exit", [this]{ stop(); }}); +#endif } void set_victory_menu_buttons() @@ -2685,7 +2693,9 @@ namespace gmtk menu_buttons_.push_back({"One more turn", [this]{ in_victory_menu_ = false; }}); menu_buttons_.push_back({"Play again", [this]{ start_new_game(is_challenge_mode_, is_sandbox_mode_, true); }}); menu_buttons_.push_back({"Main menu", [this]{ set_start_menu(); }}); +#ifndef __EMSCRIPTEN__ menu_buttons_.push_back({"Exit", [this]{ stop(); }}); +#endif } random::generator map_rng_;