engine: fix local event sending
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
5812409078
commit
56c16798cd
1 changed files with 2 additions and 2 deletions
|
|
@ -114,12 +114,12 @@ pub const App = struct {
|
||||||
pub fn init(app: *@This()) !void {
|
pub fn init(app: *@This()) !void {
|
||||||
app.* = .{ .modules = undefined };
|
app.* = .{ .modules = undefined };
|
||||||
try app.modules.init(allocator);
|
try app.modules.init(allocator);
|
||||||
app.modules.sendToModule(.engine, .init, .{});
|
app.modules.send(.engine, .init, .{});
|
||||||
try app.modules.dispatch();
|
try app.modules.dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(app: *@This()) void {
|
pub fn deinit(app: *@This()) void {
|
||||||
app.modules.sendToModule(.engine, .deinit, .{});
|
app.modules.send(.engine, .deinit, .{});
|
||||||
// TODO: improve error handling
|
// TODO: improve error handling
|
||||||
app.modules.dispatch() catch |err| @panic(@errorName(err)); // dispatch .deinit
|
app.modules.dispatch() catch |err| @panic(@errorName(err)); // dispatch .deinit
|
||||||
app.modules.deinit(gpa.allocator());
|
app.modules.deinit(gpa.allocator());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue