aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-16 07:34:47 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-16 07:34:47 +0200
commit1952897a8cb411d9b10d75ac6a8c223924c07e09 (patch)
tree098414ec3216870a7e4145ba6d4c0c77c9206880 /tests
parent97f1b1c735775d1e22412bbcf98ef403f9ee2275 (diff)
Fix resize event sometimes not triggered (set window gravity)
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c5
1 files changed, 2 insertions, 3 deletions
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(;;) {