diff options
Diffstat (limited to 'Library/SDK/Entrypoint.js')
-rw-r--r-- | Library/SDK/Entrypoint.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Library/SDK/Entrypoint.js b/Library/SDK/Entrypoint.js index d55d823..9d7e4a2 100644 --- a/Library/SDK/Entrypoint.js +++ b/Library/SDK/Entrypoint.js @@ -13,10 +13,6 @@ readline.emitKeypressEvents(process.stdin); Launcher = require("../Launcher"); process.stdin.on('keypress', (str, key) => { - for (let func of Strawberry.KeyboardEvents) { - func(key.sequence); - } - if (key.sequence === '\u0003') { require('show-terminal-cursor')(); process.exit(); @@ -24,6 +20,10 @@ process.stdin.on('keypress', (str, key) => { if (!Strawberry.ProcessKeyboard) return; + for (let func of Strawberry.KeyboardEvents) { + func(key.sequence); + } + if (!global._STRAWBERRY_APPMENU_OPEN) { try { Strawberry.MenuBar.Reset(); @@ -362,6 +362,8 @@ global._STRAWBERRY_INIT_APP = () => { ProcessKeyboard: true, WhenLoaded: () => {}, StartLoad: (skipCoolLoading) => { + global._STRAWBERRY_CURRENT_APP = Strawberry.App; + load("Strawberry.Audio"); if (!skipCoolLoading) skipCoolLoading = false; @@ -433,7 +435,7 @@ global._STRAWBERRY_INIT_APP = () => { global._STRAWBERRY_INIT_APP(); global.load = (module) => { - if (require('os').platform() === "linux" && module === "Strawberry.Menubar") { + if (module === "Strawberry.Menubar") { module = "Strawberry.MenuBar"; } @@ -451,11 +453,7 @@ global.load = (module) => { Strawberry[parts[1]] = require("./Modules/" + module); } - if (module === "Strawberry.Menubar") { - load("Strawberry.MenuBar"); - } - - if (require('os').platform() === "linux" && module === "Strawberry.MenuBar") { + if (module === "Strawberry.MenuBar") { Strawberry.Menubar = Strawberry.MenuBar; } }
\ No newline at end of file |