Skip to content

Commit

Permalink
jslib fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
nokotan committed Dec 30, 2024
1 parent 5bcd367 commit 273c325
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/HTML5/DxBaseImageHTML5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ EM_JS(void, DecodeImage, (DECODEDIMAGE* Decoded),
Module["decodeContext"].drawImage(image, 0, 0);

const decodedImageData = Module["decodeContext"].getImageData(0, 0, image.width, image.height).data;
const dataBuffer = Module["_malloc"](decodedImageData.length);
const dataBuffer = _malloc(decodedImageData.length);

HEAPU8.set(decodedImageData, dataBuffer);

Expand Down
2 changes: 1 addition & 1 deletion src/HTML5/DxBrowserFontHTML5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int RenderFontBitmap(int FontId, DWORD CharCode, FONTDATA* FontData) {
Module["DxLib"].TextRenderingContext.fillText(text, 0, Math.ceil(textMetrix.actualBoundingBoxAscent));

const textBitmap = Module["DxLib"].TextRenderingContext.getImageData(0, 0, fontWidth, fontHeight).data;
const dataBuffer = Module["_malloc"](textBitmap.length);
const dataBuffer = _malloc(textBitmap.length);

HEAPU8.set(textBitmap, dataBuffer);

Expand Down
2 changes: 1 addition & 1 deletion src/HTML5/DxSystemHTML5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ void WaitForNewFrame( void ) {
auto defaultQueue = emscripten_proxy_get_system_queue();
emscripten_proxy_sync_with_ctx(
defaultQueue,
emscripten_main_browser_thread_id(),
emscripten_main_runtime_thread_id(),
&WaitForNewFrameOnMainThread,
nullptr);
#endif
Expand Down

0 comments on commit 273c325

Please sign in to comment.