diff --git a/ball/main.c b/ball/main.c index 2be4199e..bdbcb4ec 100644 --- a/ball/main.c +++ b/ball/main.c @@ -269,9 +269,11 @@ static int handle_key_dn(SDL_Event *e) case SDLK_KP_ENTER: d = st_buttn(config_get_d(CONFIG_JOYSTICK_BUTTON_A), 1); break; +#ifndef __EMSCRIPTEN__ case KEY_FULLSCREEN: video_fullscreen(!config_get_d(CONFIG_FULLSCREEN)); break; +#endif default: if (config_tst_d(CONFIG_KEY_FORWARD, c)) diff --git a/share/st_common.c b/share/st_common.c index 95091c22..4e267dc1 100644 --- a/share/st_common.c +++ b/share/st_common.c @@ -366,8 +366,10 @@ static int video_gui(void) gui_set_label(jd, display); } +#ifndef __EMSCRIPTEN__ conf_toggle(id, _("Fullscreen"), VIDEO_FULLSCREEN, config_get_d(CONFIG_FULLSCREEN), _("On"), 1, _("Off"), 0); +#endif if ((jd = conf_state (id, _("Resolution"), resolution, VIDEO_RESOLUTION))) diff --git a/share/video.c b/share/video.c index 6218f99d..30163e65 100644 --- a/share/video.c +++ b/share/video.c @@ -229,6 +229,11 @@ int video_mode(int f, int w, int h) int hmd = config_get_d(CONFIG_HMD) ? 1 : 0; int highdpi = config_get_d(CONFIG_HIGHDPI) ? 1 : 0; +#ifdef __EMSCRIPTEN__ + /* The page has its own full screen; SDL's takes the page over. */ + f = 0; +#endif + int dpy = config_get_d(CONFIG_DISPLAY); int X = SDL_WINDOWPOS_CENTERED_DISPLAY(dpy);