Hopefully fix ctrl W for desktop apps

This commit is contained in:
2026-10-04 17:01:29 -03:00
parent 33ba86fc76
commit 505a8598b1
5 changed files with 238 additions and 1 deletions
+2
View File
@@ -7,6 +7,7 @@ import { fromFileUrl, join } from "@std/path";
import { type Host, serve_static, start_host } from "../server/host.ts";
import { PROTOCOL_VERSION } from "../common/protocol.ts";
import { current_client, update_client } from "./client_updates.ts";
import { guard_shortcuts } from "./shortcuts.ts";
// where the project was built from: build/ and server_mods/ (the .bmod files) are bundled into the app with --include
const ROOT = fromFileUrl(new URL("../", import.meta.url));
@@ -38,6 +39,7 @@ const client_dir: Promise<string> = updates_from === "off" || updates_from === "
client_dir.then((dir) => console.log(`Playing the client in ${dir}`));
const win = new Deno.BrowserWindow({ title: "bworld", width: 1280, height: 720 });
guard_shortcuts(win);
// the singleplayer game server, started the first time singleplayer connects so players who only join other servers
// don't get a world made for them. it plays the .bmod files the app was built with