examples: Query the size of the framebuffer
The size of the framebuffer may not be the size of the framebuffer that we requested - we should use the actual size of the framebuffer in the calculations to position the crate in the center. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
39ca3e51df
commit
3bf8d45529
@ -164,6 +164,9 @@ main (int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
data.framebuffer_width = cogl_framebuffer_get_width (fb);
|
||||
data.framebuffer_height = cogl_framebuffer_get_height (fb);
|
||||
|
||||
data.timer = g_timer_new ();
|
||||
|
||||
cogl_onscreen_show (onscreen);
|
||||
|
Loading…
Reference in New Issue
Block a user