From 1952897a8cb411d9b10d75ac6a8c223924c07e09 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 16 Oct 2021 07:34:47 +0200 Subject: Fix resize event sometimes not triggered (set window gravity) --- tests/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/main.c b/tests/main.c index 0b4c559..2154b2b 100644 --- a/tests/main.c +++ b/tests/main.c @@ -18,11 +18,10 @@ static void draw(mgl_window *window, void *userdata) { .position = { 0.0f, 0.0f }, .size = { 100.0f, 500.0f } }; - mgl_rectangle_draw(context, &rect); mgl_sprite sprite; - mgl_sprite_init(&sprite, u->texture, 10.0f, 0.0f); + mgl_sprite_init(&sprite, u->texture, 100.0f - 10.0f, 0.0f); mgl_sprite_set_color(&sprite, 1.0f, 1.0f, 1.0f, 0.5f); mgl_sprite_draw(context, &sprite); } @@ -44,7 +43,7 @@ int main(int argc, char **argv) { if(mgl_window_create(&window, "mgl", 1280, 720, &window_callback) != 0) return 1; - if(mgl_texture_load_from_file(&texture, "X11.png") != 0) + if(mgl_texture_load_from_file(&texture, "X11.png", NULL) != 0) return 1; for(;;) { -- cgit v1.2.3