examples: Do not return bool on update()

Also replaced all ``return false;`` usages with Engine.setShouldClose(true).
This commit is contained in:
iddev5 2022-06-08 13:23:47 +05:30 committed by Stephen Gutekanst
parent 40c0659cc9
commit 2d53b8bdfd
10 changed files with 11 additions and 31 deletions

View file

@ -164,7 +164,7 @@ pub fn deinit(app: *App, _: *mach.Engine) void {
app.bind_group2.release();
}
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| {
@ -241,6 +241,4 @@ pub fn update(app: *App, engine: *mach.Engine) !bool {
command.release();
engine.swap_chain.?.present();
back_buffer_view.release();
return true;
}