summaryrefslogtreecommitdiff
path: root/platform/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript')
-rw-r--r--platform/javascript/detect.py5
-rw-r--r--platform/javascript/os_javascript.cpp11
2 files changed, 8 insertions, 8 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 8c7a904bca..74d6536343 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -28,6 +28,11 @@ def get_flags():
return [
('tools', False),
('module_theora_enabled', False),
+ # Disabling the OpenSSL module noticeably reduces file size.
+ # The module has little use due to the limited networking functionality
+ # in this platform. For the available networking methods, the browser
+ # manages TLS.
+ ('module_openssl_enabled', False),
]
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 3590c30579..e226ab6332 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -430,16 +430,11 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
// can't fulfil fullscreen request due to browser security
video_mode.fullscreen = false;
/* clang-format off */
- bool resize_canvas_on_start = EM_ASM_INT_V(
- return Module.resizeCanvasOnStart;
- );
- /* clang-format on */
- if (resize_canvas_on_start) {
+ if (EM_ASM_INT_V({ return Module.resizeCanvasOnStart })) {
+ /* clang-format on */
set_window_size(Size2(video_mode.width, video_mode.height));
} else {
- Size2 canvas_size = get_window_size();
- video_mode.width = canvas_size.width;
- video_mode.height = canvas_size.height;
+ set_window_size(get_window_size());
}
char locale_ptr[16];