Merge pull request #43986 from Faless/js/3.x_em_fixes
[3.2] [HTML5] HiDPI, emscripten fixes
This commit is contained in:
commit
58ca8de52c
@ -200,7 +200,7 @@ const GodotFS = {
|
||||
}
|
||||
FS.mkdirTree(dir);
|
||||
}
|
||||
FS.writeFile(path, new Uint8Array(buffer), { 'flags': 'wx+' });
|
||||
FS.writeFile(path, new Uint8Array(buffer));
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -174,8 +174,8 @@ void OS_JavaScript::set_window_size(const Size2 p_size) {
|
||||
window_maximized = false;
|
||||
}
|
||||
double scale = godot_js_display_pixel_ratio_get();
|
||||
emscripten_set_canvas_element_size(canvas_id, p_size.x * scale, p_size.y * scale);
|
||||
emscripten_set_element_css_size(canvas_id, p_size.x, p_size.y);
|
||||
emscripten_set_canvas_element_size(canvas_id, p_size.x, p_size.y);
|
||||
emscripten_set_element_css_size(canvas_id, p_size.x / scale, p_size.y / scale);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user