1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-20 06:03:01 +00:00

Merge pull request #287 from jruderman/event_targets

emscripten: specify event targets to fix a JS error
This commit is contained in:
Zeno Rogue 2021-08-07 11:50:57 +02:00 committed by GitHub
commit fad27e34c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
} }