examples: Do not return bool on update()
Also replaced all ``return false;`` usages with Engine.setShouldClose(true).
This commit is contained in:
parent
40c0659cc9
commit
2d53b8bdfd
10 changed files with 11 additions and 31 deletions
|
|
@ -248,7 +248,7 @@ pub fn deinit(app: *App, engine: *mach.Engine) void {
|
|||
app.texture_atlas_data.deinit(engine.allocator);
|
||||
}
|
||||
|
||||
pub fn update(app: *App, engine: *mach.Engine) !bool {
|
||||
pub fn update(app: *App, engine: *mach.Engine) !void {
|
||||
while (engine.pollEvent()) |event| {
|
||||
switch (event) {
|
||||
.key_press => |ev| {
|
||||
|
|
@ -303,8 +303,6 @@ pub fn update(app: *App, engine: *mach.Engine) !bool {
|
|||
command.release();
|
||||
engine.swap_chain.?.present();
|
||||
back_buffer_view.release();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
pub fn resize(app: *App, _: *mach.Engine, _: u32, _: u32) !void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue