summaryrefslogtreecommitdiff
path: root/src/App.zig
diff options
context:
space:
mode:
authorkcbanner <kcbanner@gmail.com>2023-10-29 04:03:06 -0400
committerMitchell Hashimoto <mitchell.hashimoto@gmail.com>2023-11-05 23:15:49 +0000
commit232df8de8ff23ca6f3bd65516224df0f80ddf6ad (patch)
tree98aab4630b0ed21b5cf0f8bb722668ce3d8f3372 /src/App.zig
parent04ef21653fc95fd82a992dfc4bfaea11130566f8 (diff)
windows: add support for the glfw backend on Windows
Changes: - Add WindowsPty, which uses the ConPTY API to create a pseudo console - Pty now selects between PosixPty and WindowsPty - Windows support in Command, including the ability to launch a process with a pseudo console - Enable Command tests on windows - Add some environment variable abstractions to handle the missing libc APIs on Windows - Windows version of ReadThread
Diffstat (limited to 'src/App.zig')
-rw-r--r--src/App.zig7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/App.zig b/src/App.zig
index b9b9501eb..a09860a86 100644
--- a/src/App.zig
+++ b/src/App.zig
@@ -61,11 +61,8 @@ pub fn create(
// Find our resources directory once for the app so every launch
// hereafter can use this cached value.
- var resources_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
- const resources_dir = if (try internal_os.resourcesDir(&resources_buf)) |dir|
- try alloc.dupe(u8, dir)
- else
- null;
+ const resources_dir = try internal_os.resourcesDir(alloc);
+ errdefer if (resources_dir) |dir| alloc.free(dir);
app.* = .{
.alloc = alloc,