Skip to content

Commit

Permalink
opengl support for memory64
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMuigg committed Aug 29, 2023
1 parent e69b6cf commit 68cf024
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 137 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -594,3 +594,4 @@ a license to everyone to use it as detailed in LICENSE.)
* Skye Gibney <skyejgibney@gmail.com>
* Piotr Wierciński <laminowany@gmail.com>
* 郑苏波 (Super Zheng) <superzheng@tencent.com>
* Philipp Muigg <philipp.muigg@siemens.com> (copyright owned by Siemens)
8 changes: 4 additions & 4 deletions src/library_html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ var LibraryHTML5 = {
if (targetThread) {
var mouseEventData = _malloc({{{ C_STRUCTS.EmscriptenMouseEvent.__size__ }}}); // This allocated block is passed as satellite data to the proxied function call, so the call frees up the data block when done.
fillMouseEventData(mouseEventData, e, target);
JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, mouseEventData, userData);
JSEvents.queueEventHandlerOnThread_iipp(targetThread, callbackfunc, eventTypeId, mouseEventData, userData);
} else
#endif
if ({{{ makeDynCall('iiii', 'callbackfunc') }}}(eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault();
if ({{{ makeDynCall('iipp', 'callbackfunc') }}}(eventTypeId, JSEvents.mouseEvent, userData)) e.preventDefault();
};

var eventHandler = {
Expand Down Expand Up @@ -646,7 +646,7 @@ var LibraryHTML5 = {
if (targetThread) JSEvents.queueEventHandlerOnThread_iiii(targetThread, callbackfunc, eventTypeId, wheelEvent, userData);
else
#endif
if ({{{ makeDynCall('iiii', 'callbackfunc') }}}(eventTypeId, wheelEvent, userData)) e.preventDefault();
if ({{{ makeDynCall('iipp', 'callbackfunc') }}}(eventTypeId, wheelEvent, userData)) e.preventDefault();
};
#if MIN_IE_VERSION <= 8 || MIN_SAFARI_VERSION < 60100 // Browsers that do not support https://caniuse.com/#feat=mdn-api_wheelevent
// The 'mousewheel' event as implemented in Safari 6.0.5
Expand All @@ -658,7 +658,7 @@ var LibraryHTML5 = {
{{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'wheelDeltaY', 'double') }}};
{{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, '0 /* Not available */', 'double') }}};
{{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, '0 /* DOM_DELTA_PIXEL */', 'i32') }}};
var shouldCancel = {{{ makeDynCall('iiii', 'callbackfunc') }}}( eventTypeId, JSEvents.wheelEvent, userData);
var shouldCancel = {{{ makeDynCall('iipp', 'callbackfunc') }}}( eventTypeId, JSEvents.wheelEvent, userData);
if (shouldCancel) {
e.preventDefault();
}
Expand Down
Loading

0 comments on commit 68cf024

Please sign in to comment.