fixing bugs
This commit is contained in:
parent
cca1d0ece2
commit
92b288d978
@ -170,8 +170,8 @@ namespace ZL
|
||||
networkClient = std::make_unique<WebSocketClientEmscripten>();
|
||||
networkClient->Connect("localhost", 8081);
|
||||
#else
|
||||
//networkClient = std::make_unique<WebSocketClient>(taskManager.getIOContext());
|
||||
//networkClient->Connect("localhost", 8081);
|
||||
networkClient = std::make_unique<WebSocketClient>(taskManager.getIOContext());
|
||||
networkClient->Connect("localhost", 8081);
|
||||
#endif
|
||||
|
||||
if (networkClient) {
|
||||
|
||||
@ -55,7 +55,8 @@ EM_BOOL onWebGLContextRestored(int /*eventType*/, const void* /*reserved*/, void
|
||||
|
||||
static void applyResize(int logicalW, int logicalH) {
|
||||
// Получаем коэффициент плотности пикселей (например, 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);
|
||||
@ -81,7 +82,7 @@ static void applyResize(int logicalW, int logicalH) {
|
||||
e.window.event = SDL_WINDOWEVENT_RESIZED;
|
||||
e.window.data1 = physicalW;
|
||||
e.window.data2 = physicalH;
|
||||
SDL_PushEvent(&e);*/
|
||||
SDL_PushEvent(&e);
|
||||
}
|
||||
|
||||
EM_BOOL onWindowResized(int /*eventType*/, const EmscriptenUiEvent* e, void* /*userData*/) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user