summaryrefslogtreecommitdiff
path: root/support/mv-overlay
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-16 18:49:26 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-30 00:39:06 +0900
commitfcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch)
tree64cb17de3f41a2b6fef2368028fbd00349946994 /support/mv-overlay
Fresh start
Diffstat (limited to 'support/mv-overlay')
-rw-r--r--support/mv-overlay/js/main.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/support/mv-overlay/js/main.js b/support/mv-overlay/js/main.js
new file mode 100644
index 0000000..56925cd
--- /dev/null
+++ b/support/mv-overlay/js/main.js
@@ -0,0 +1,20 @@
+var __RMV_OVERRIDE = [
+ { dst: Utils, src: {
+ // Some plugins break this method with a bad implementation
+ // Such implementations may cause webgl to not work anymore
+ // Returning false for any input
+ isOptionValid: Utils.isOptionValid,
+ // The main loop used for Safari works better
+ isMobileSafari: () => true,
+ }},
+ { dst: SceneManager, src: {
+ // MV really doesn't want to use WebGL on mobile for some reason
+ // Well at least recent androids should be fine
+ shouldUseCanvasRenderer: () => false,
+ }},
+]
+PluginManager.setup($plugins);
+window.onload = function() {
+ __RMV_OVERRIDE.forEach(o => Object.assign(o.dst, o.src));
+ SceneManager.run(Scene_Boot);
+};