apprt/embedded: fix usingnamespace usage

This commit is contained in:
Mitchell Hashimoto
2024-08-16 15:00:07 -07:00
parent 9409e3072f
commit a9107e7eb6
2 changed files with 4 additions and 3 deletions

View File

@ -1386,7 +1386,7 @@ pub const Inspector = struct {
// C API // C API
pub const CAPI = struct { pub const CAPI = struct {
const global = &@import("../main.zig").state; const global = &@import("../global.zig").state;
/// This is the same as Surface.KeyEvent but this is the raw C API version. /// This is the same as Surface.KeyEvent but this is the raw C API version.
const KeyEvent = extern struct { const KeyEvent = extern struct {

View File

@ -12,7 +12,8 @@ const assert = std.debug.assert;
const posix = std.posix; const posix = std.posix;
const builtin = @import("builtin"); const builtin = @import("builtin");
const build_config = @import("build_config.zig"); const build_config = @import("build_config.zig");
const main = @import("main.zig"); const main = @import("main_ghostty.zig");
const state = &@import("global.zig").state;
const apprt = @import("apprt.zig"); const apprt = @import("apprt.zig");
// Some comptime assertions that our C API depends on. // Some comptime assertions that our C API depends on.
@ -55,7 +56,7 @@ export fn ghostty_init() c_int {
var argv: [0][*:0]u8 = .{}; var argv: [0][*:0]u8 = .{};
std.os.argv = &argv; std.os.argv = &argv;
main.state.init() catch |err| { state.init() catch |err| {
std.log.err("failed to initialize ghostty error={}", .{err}); std.log.err("failed to initialize ghostty error={}", .{err});
return 1; return 1;
}; };