Skip to content

Commit 14e0aa5

Browse files
authored
[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
1 parent b0b9c90 commit 14e0aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/glcontext_html5.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace bgfx { namespace gl
2828

2929
struct SwapChainGL
3030
{
31-
SwapChainGL(int _context, const char* _canvas)
31+
SwapChainGL(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE _context, const char* _canvas)
3232
: m_context(_context)
3333
{
3434
size_t length = bx::strLen(_canvas) + 1;
@@ -60,7 +60,7 @@ namespace bgfx { namespace gl
6060
// to the browser.
6161
}
6262

63-
int m_context;
63+
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE m_context;
6464
char* m_canvas;
6565
};
6666

0 commit comments

Comments
 (0)