change to width/height

main
Brett 2024-04-30 02:56:02 -04:00
parent 99715470ee
commit 96521c51be
2 changed files with 5 additions and 5 deletions

View File

@ -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})

View File

@ -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