瀏覽代碼

Use HEAPU8.set rather than Module.HEAPU8.set (thanks @sbc100!)

The Module object is the external interface to the application, internal symbols like HEAPU8 don't need to be exported to be used and usage should not be prefixed with Module.

Fixes https://github.com/libsdl-org/SDL/issues/13156
Closes https://github.com/libsdl-org/SDL/pull/13157
Sam Lantinga 2 月之前
父節點
當前提交
cf6c42e6e6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/camera/emscripten/SDL_camera_emscripten.c

+ 1 - 1
src/camera/emscripten/SDL_camera_emscripten.c

@@ -61,7 +61,7 @@ static SDL_CameraFrameResult EMSCRIPTENCAMERA_AcquireFrame(SDL_Camera *device, S
 
 
         SDL3.camera.ctx2d.drawImage(SDL3.camera.video, 0, 0, w, h);
         SDL3.camera.ctx2d.drawImage(SDL3.camera.video, 0, 0, w, h);
         const imgrgba = SDL3.camera.ctx2d.getImageData(0, 0, w, h).data;
         const imgrgba = SDL3.camera.ctx2d.getImageData(0, 0, w, h).data;
-        Module.HEAPU8.set(imgrgba, rgba);
+        HEAPU8.set(imgrgba, rgba);
 
 
         return 1;
         return 1;
     }, device->actual_spec.width, device->actual_spec.height, rgba);
     }, device->actual_spec.width, device->actual_spec.height, rgba);