summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/javascript/js/engine/config.js41
-rw-r--r--platform/javascript/js/libs/library_godot_input.js2
-rw-r--r--platform/linuxbsd/display_server_x11.h2
-rw-r--r--platform/windows/godot_windows.cpp5
4 files changed, 28 insertions, 22 deletions
diff --git a/platform/javascript/js/engine/config.js b/platform/javascript/js/engine/config.js
index ba61b14eb7..5628ddbab5 100644
--- a/platform/javascript/js/engine/config.js
+++ b/platform/javascript/js/engine/config.js
@@ -225,33 +225,34 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
*/
Config.prototype.update = function (opts) {
const config = opts || {};
- function parse(key, def) {
+ const me = this;
+ function parse(key) {
if (typeof (config[key]) === 'undefined') {
- return def;
+ return me[key];
}
return config[key];
}
// Module config
- this.unloadAfterInit = parse('unloadAfterInit', this.unloadAfterInit);
- this.onPrintError = parse('onPrintError', this.onPrintError);
- this.onPrint = parse('onPrint', this.onPrint);
- this.onProgress = parse('onProgress', this.onProgress);
+ this.unloadAfterInit = parse('unloadAfterInit');
+ this.onPrintError = parse('onPrintError');
+ this.onPrint = parse('onPrint');
+ this.onProgress = parse('onProgress');
// Godot config
- this.canvas = parse('canvas', this.canvas);
- this.executable = parse('executable', this.executable);
- this.mainPack = parse('mainPack', this.mainPack);
- this.locale = parse('locale', this.locale);
- this.canvasResizePolicy = parse('canvasResizePolicy', this.canvasResizePolicy);
- this.persistentPaths = parse('persistentPaths', this.persistentPaths);
- this.persistentDrops = parse('persistentDrops', this.persistentDrops);
- this.experimentalVK = parse('experimentalVK', this.experimentalVK);
- this.focusCanvas = parse('focusCanvas', this.focusCanvas);
- this.gdnativeLibs = parse('gdnativeLibs', this.gdnativeLibs);
- this.fileSizes = parse('fileSizes', this.fileSizes);
- this.args = parse('args', this.args);
- this.onExecute = parse('onExecute', this.onExecute);
- this.onExit = parse('onExit', this.onExit);
+ this.canvas = parse('canvas');
+ this.executable = parse('executable');
+ this.mainPack = parse('mainPack');
+ this.locale = parse('locale');
+ this.canvasResizePolicy = parse('canvasResizePolicy');
+ this.persistentPaths = parse('persistentPaths');
+ this.persistentDrops = parse('persistentDrops');
+ this.experimentalVK = parse('experimentalVK');
+ this.focusCanvas = parse('focusCanvas');
+ this.gdnativeLibs = parse('gdnativeLibs');
+ this.fileSizes = parse('fileSizes');
+ this.args = parse('args');
+ this.onExecute = parse('onExecute');
+ this.onExit = parse('onExit');
};
/**
diff --git a/platform/javascript/js/libs/library_godot_input.js b/platform/javascript/js/libs/library_godot_input.js
index 7a4d0d8126..1e64c260f8 100644
--- a/platform/javascript/js/libs/library_godot_input.js
+++ b/platform/javascript/js/libs/library_godot_input.js
@@ -87,7 +87,7 @@ const GodotInputGamepads = {
},
init: function (onchange) {
- GodotEventListeners.samples = [];
+ GodotInputGamepads.samples = [];
function add(pad) {
const guid = GodotInputGamepads.get_guid(pad);
const c_id = GodotRuntime.allocString(pad.id);
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index de5e872837..445b35cda8 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -143,7 +143,7 @@ class DisplayServerX11 : public DisplayServer {
bool borderless = false;
bool resize_disabled = false;
Vector2i last_position_before_fs;
- bool focused = false;
+ bool focused = true;
bool minimized = false;
unsigned int focus_order = 0;
diff --git a/platform/windows/godot_windows.cpp b/platform/windows/godot_windows.cpp
index 7819ab9a32..c4926209c7 100644
--- a/platform/windows/godot_windows.cpp
+++ b/platform/windows/godot_windows.cpp
@@ -140,6 +140,11 @@ int widechar_main(int argc, wchar_t **argv) {
setlocale(LC_CTYPE, "");
+#ifndef TOOLS_ENABLED
+ // Workaround to prevent LTCG (MSVC LTO) from removing "pck" section
+ char *dummy_guard = dummy;
+#endif
+
char **argv_utf8 = new char *[argc];
for (int i = 0; i < argc; ++i) {