[gtk+] gdkglcontext-win32.c: Fix Build on C89 Compilers
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdkglcontext-win32.c: Fix Build on C89 Compilers
- Date: Fri, 13 Feb 2015 10:36:42 +0000 (UTC)
commit 933ee3af56a19c5ea3bd04c1fac349860479b05d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Feb 13 18:36:34 2015 +0800
gdkglcontext-win32.c: Fix Build on C89 Compilers
Make sure variables are declared at the top of the block.
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 d32e531..df61322 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]