module: remove the ability to send "standard" arguments to systems
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f220494649
commit
2a13c07d9e
12 changed files with 39 additions and 144 deletions
|
|
@ -18,8 +18,7 @@ pub fn main() !void {
|
|||
|
||||
// If desired, it is possible to observe when the app has finished starting by dispatching
|
||||
// systems until the app has started:
|
||||
const stack_space = try allocator.alloc(u8, 8 * 1024 * 1024);
|
||||
try mach.mods.dispatchUntil(stack_space, .mach_core, .started);
|
||||
try mach.mods.dispatchUntil(.mach_core, .started);
|
||||
|
||||
// On some platforms, you can drive the mach.Core main loop yourself - but this isn't
|
||||
// possible on all platforms.
|
||||
|
|
@ -27,9 +26,8 @@ pub fn main() !void {
|
|||
mach.Core.non_blocking = true;
|
||||
while (mach.mods.mod.mach_core.state().state != .exited) {
|
||||
// Execute systems until a frame has been finished.
|
||||
try mach.mods.dispatchUntil(stack_space, .mach_core, .frame_finished);
|
||||
try mach.mods.dispatchUntil(.mach_core, .frame_finished);
|
||||
}
|
||||
allocator.free(stack_space);
|
||||
} else {
|
||||
// On platforms where you cannot control the mach.Core main loop, the .mach_core.start
|
||||
// system your app schedules will block forever and the function call below will NEVER
|
||||
|
|
@ -37,6 +35,6 @@ pub fn main() !void {
|
|||
//
|
||||
// In this case we can just dispatch systems until there are no more left to execute, which
|
||||
// conviently works even if you aren't using mach.Core in your program.
|
||||
try mach.mods.dispatch(stack_space, .{});
|
||||
try mach.mods.dispatch(.{});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue