[gnome-session] gnome-session-check-accelerated: Use constant for specific sizes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gnome-session-check-accelerated: Use constant for specific sizes
- Date: Tue, 13 Nov 2012 17:39:37 +0000 (UTC)
commit 63e765cf8da6fdfead08cd883ae903f13d8d1518
Author: Bastien Nocera <hadess hadess net>
Date: Tue Nov 13 14:48:04 2012 +0100
gnome-session-check-accelerated: Use constant for specific sizes
https://bugzilla.gnome.org/show_bug.cgi?id=688252
tools/gnome-session-check-accelerated-helper.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tools/gnome-session-check-accelerated-helper.c b/tools/gnome-session-check-accelerated-helper.c
index 46112f5..6086bd1 100644
--- a/tools/gnome-session-check-accelerated-helper.c
+++ b/tools/gnome-session-check-accelerated-helper.c
@@ -83,7 +83,9 @@
#include <GL/gl.h>
#include <GL/glx.h>
-static int max_texture_size = 0;
+#define SIZE_UNSET 0
+#define SIZE_ERROR -1
+static int max_texture_size = SIZE_UNSET;
static inline void
_print_error (const char *str)
@@ -289,7 +291,7 @@ _has_hardware_gl (Display *display)
* but we'll check its value later */
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size);
if (glGetError() != GL_NO_ERROR)
- max_texture_size = -1;
+ max_texture_size = SIZE_ERROR;
ret = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]