fixing bugs
This commit is contained in:
1 parent
cca1d0ece2
commit
92b288d978
2 files changed
+5
-4
No files matched your search
+2
-2
@@ -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) {
|
||||
|
||||
+3
-2
@@ -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*/) {
|
||||
|
||||
Reference in new issue
Block a user