change to width/height
parent
99715470ee
commit
96521c51be
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
|
|
||||||
set(BLT_GRAPHICS_VERSION 0.12.0)
|
set(BLT_GRAPHICS_VERSION 0.12.1)
|
||||||
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
||||||
|
|
||||||
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
||||||
|
|
|
@ -189,8 +189,8 @@ namespace blt::gfx
|
||||||
|
|
||||||
EM_BOOL emscripten_resize_callback(int, const EmscriptenUiEvent* event, void* data)
|
EM_BOOL emscripten_resize_callback(int, const EmscriptenUiEvent* event, void* data)
|
||||||
{
|
{
|
||||||
int width = event->windowInnerWidth;
|
int width = event->documentBodyClientWidth;
|
||||||
int height = event->windowInnerHeight;
|
int height = event->documentBodyClientHeight;
|
||||||
|
|
||||||
glfwSetWindowSize(window_state.window, width, height);
|
glfwSetWindowSize(window_state.window, width, height);
|
||||||
|
|
||||||
|
@ -198,11 +198,11 @@ namespace blt::gfx
|
||||||
}
|
}
|
||||||
|
|
||||||
EM_JS(int, get_screen_width, (), {
|
EM_JS(int, get_screen_width, (), {
|
||||||
return window.innerWidth;
|
return document.body.clientWidth;
|
||||||
});
|
});
|
||||||
|
|
||||||
EM_JS(int, get_screen_height, (), {
|
EM_JS(int, get_screen_height, (), {
|
||||||
return window.innerHeight;
|
return document.body.clientHeight;
|
||||||
});
|
});
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue