File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ const zglfw = @import("zglfw");
6
6
const zgpu = @import ("zgpu" );
7
7
const zgui = @import ("zgui" );
8
8
9
+ const ConverterErrors = error {
10
+ WeirdGameDir ,
11
+ };
12
+
9
13
pub fn main () ! void {
10
14
zglfw .init () catch {
11
15
std .log .err ("Failed to initialize GLFW library." , .{});
@@ -105,6 +109,13 @@ pub fn main() !void {
105
109
106
110
std .debug .print ("Done converting!\n " , .{});
107
111
}
112
+ if (zgui .button ("Launch" , .{ .w = 200.0 })) {
113
+ const path = "I:/Programming/Cortex-Command-Community-Project-Data/Cortex Command.debug.release.exe" ;
114
+ try std .os .chdir (std .fs .path .dirname (path ) orelse return ConverterErrors .WeirdGameDir );
115
+ var argv = [_ ][]const u8 {path };
116
+ const result = try std .ChildProcess .exec (.{ .argv = & argv , .allocator = gpa });
117
+ _ = result ;
118
+ }
108
119
}
109
120
zgui .end ();
110
121
You can’t perform that action at this time.
0 commit comments