fixing bugs

This commit is contained in:
Vladislav Khorev 2026-03-05 10:15:55 +03:00
parent cca1d0ece2
commit 92b288d978
2 changed files with 5 additions and 4 deletions

View File

@ -170,8 +170,8 @@ namespace ZL
networkClient = std::make_unique<WebSocketClientEmscripten>(); networkClient = std::make_unique<WebSocketClientEmscripten>();
networkClient->Connect("localhost", 8081); networkClient->Connect("localhost", 8081);
#else #else
//networkClient = std::make_unique<WebSocketClient>(taskManager.getIOContext()); networkClient = std::make_unique<WebSocketClient>(taskManager.getIOContext());
//networkClient->Connect("localhost", 8081); networkClient->Connect("localhost", 8081);
#endif #endif
if (networkClient) { if (networkClient) {

View File

@ -55,7 +55,8 @@ EM_BOOL onWebGLContextRestored(int /*eventType*/, const void* /*reserved*/, void
static void applyResize(int logicalW, int logicalH) { static void applyResize(int logicalW, int logicalH) {
// Получаем коэффициент плотности пикселей (например, 2.625 на Pixel или 3.0 на Samsung) // Получаем коэффициент плотности пикселей (например, 2.625 на Pixel или 3.0 на Samsung)
/*double dpr = emscripten_get_device_pixel_ratio(); //double dpr = emscripten_get_device_pixel_ratio();
double dpr = 1; // low quality
// Вычисляем реальные физические пиксели // Вычисляем реальные физические пиксели
int physicalW = static_cast<int>(logicalW * dpr); int physicalW = static_cast<int>(logicalW * dpr);
@ -81,7 +82,7 @@ static void applyResize(int logicalW, int logicalH) {
e.window.event = SDL_WINDOWEVENT_RESIZED; e.window.event = SDL_WINDOWEVENT_RESIZED;
e.window.data1 = physicalW; e.window.data1 = physicalW;
e.window.data2 = physicalH; e.window.data2 = physicalH;
SDL_PushEvent(&e);*/ SDL_PushEvent(&e);
} }
EM_BOOL onWindowResized(int /*eventType*/, const EmscriptenUiEvent* e, void* /*userData*/) { EM_BOOL onWindowResized(int /*eventType*/, const EmscriptenUiEvent* e, void* /*userData*/) {