[emscripten] Fix MEMORY64 mode (#3437)

EMSCRIPTEN_WEBGL_CONTEXT_HANDLE is 64bit when using MEMORY64 but it's stored as an int 32 bit causing overflow
This commit is contained in:
Francisco Facioni
2025-06-28 21:31:59 +02:00
committed by GitHub
parent b0b9c90b47
commit 14e0aa5aff

View File

@@ -28,7 +28,7 @@ namespace bgfx { namespace gl
struct SwapChainGL
{
SwapChainGL(int _context, const char* _canvas)
SwapChainGL(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE _context, const char* _canvas)
: m_context(_context)
{
size_t length = bx::strLen(_canvas) + 1;
@@ -60,7 +60,7 @@ namespace bgfx { namespace gl
// to the browser.
}
int m_context;
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE m_context;
char* m_canvas;
};