diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-02-13 18:36:34 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-02-13 18:36:34 +0800 |
commit | 933ee3af56a19c5ea3bd04c1fac349860479b05d (patch) | |
tree | 0c69af322a842ac5212b5dc9ce1c42a1b4e8f61d /gdk | |
parent | 8d7a235a045b667b2efad80a93717572b581307b (diff) | |
download | gtk+-933ee3af56a19c5ea3bd04c1fac349860479b05d.tar.gz |
gdkglcontext-win32.c: Fix Build on C89 Compilers
Make sure variables are declared at the top of the block.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/win32/gdkglcontext-win32.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c index d32e531e6b..df6132296c 100644 --- a/gdk/win32/gdkglcontext-win32.c +++ b/gdk/win32/gdkglcontext-win32.c @@ -459,6 +459,11 @@ _gdk_win32_gl_context_realize (GdkGLContext *context, gint pixel_format; gboolean debug_bit, compat_bit; + /* request flags and specific versions for core (3.2+) WGL context */ + gint flags = 0; + gint glver_major = 0; + gint glver_minor = 0; + if (!_set_pixformat_for_hdc (context_win32->gl_hdc, &pixel_format, context_win32->need_alpha_bits)) @@ -469,12 +474,6 @@ _gdk_win32_gl_context_realize (GdkGLContext *context, return FALSE; } - - /* request flags and specific versions for core (3.2+) WGL context */ - gint flags = 0; - gint glver_major = 0; - gint glver_minor = 0; - gdk_gl_context_get_required_version (context, &glver_major, &glver_minor); debug_bit = gdk_gl_context_get_debug_enabled (context); compat_bit = gdk_gl_context_get_forward_compatible (context); |