1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 09:00:34 +00:00

emscripten: specify event targets to fix a JS error

This commit is contained in:
Jesse Ruderman 2021-08-06 11:30:30 -07:00
parent cba7ed1db9
commit 75d67fb7d9

View File

@ -242,8 +242,8 @@ EM_BOOL resize_callback(int eventType, const EmscriptenUiEvent *resizeEvent, voi
EX void initweb() { EX void initweb() {
// toggleanim(false); // toggleanim(false);
emscripten_set_fullscreenchange_callback(0, NULL, false, fsc_callback); emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, NULL, false, fsc_callback);
emscripten_set_resize_callback(0, NULL, false, resize_callback); emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, false, resize_callback);
printf("showstartmenu = %d\n", showstartmenu); printf("showstartmenu = %d\n", showstartmenu);
if(showstartmenu) pushScreen(showDemo); if(showstartmenu) pushScreen(showDemo);
} }