diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/common/test_hello_example.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/common/test_hello_example.c b/tests/common/test_hello_example.c index 6e0318f..7faa147 100644 --- a/tests/common/test_hello_example.c +++ b/tests/common/test_hello_example.c @@ -6,15 +6,14 @@ static void draw_once(void *ud, struct yasl_surface *surface, struct yasl_frame_context *frame) { draw(ud, surface, frame); - if (!((struct app *)ud)->failed) yasl_surface_destroy(surface); + if (!failed) yasl_surface_destroy(surface); } int main(void) { - struct app app = {0}; struct yasl_app_desc desc = { - .app_id = "org.yasl.test.hello", .userdata = &app, + .app_id = "org.yasl.test.hello", .init = init, .event = event, .frame = draw_once, }; - return yasl_run(&desc) || app.failed ? 1 : 0; + return yasl_run(&desc) || failed ? 1 : 0; } |
