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:
Rob Bradford 2011-11-07 17:00:20 +00:00 committed by Robert Bragg
parent 39ca3e51df
commit 3bf8d45529

View File

@ -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);