Skip to content

Commit 819a614

Browse files
MikhailGorobetsTheMostDiligent
authored andcommitted
WebGL: Fixed swapchain size
1 parent cfd25b2 commit 819a614

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Graphics/GraphicsEngineOpenGL/src/SwapChainGLImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ SwapChainGLImpl::SwapChainGLImpl(IReferenceCounters* pRefCounters,
9595
m_SwapChainDesc.Width = 1024;
9696
m_SwapChainDesc.Height = 768;
9797
#elif PLATFORM_EMSCRIPTEN
98-
double CanvasWidth = 0;
99-
double CanvasHeight = 0;
100-
emscripten_get_element_css_size(InitAttribs.Window.pCanvasId, &CanvasWidth, &CanvasHeight);
98+
int32_t CanvasWidth = 0;
99+
int32_t CanvasHeight = 0;
100+
emscripten_get_canvas_element_size(InitAttribs.Window.pCanvasId, &CanvasWidth, &CanvasHeight);
101101
m_SwapChainDesc.Width = static_cast<uint32_t>(CanvasWidth);
102102
m_SwapChainDesc.Height = static_cast<uint32_t>(CanvasHeight);
103103
#else

0 commit comments

Comments
 (0)