summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-04-09 18:11:45 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-04-09 18:11:45 +0000
commit089645799cad23784d02db229cec44422c46cdce (patch)
treeb9405ead31edab2bde64b5ca57f7cdee236f0aca /src/mesa/drivers/x11
parent5eb921382ff378de224ddddf0f66321eb773a38c (diff)
fix max buffer size test (Kyle Bateman, bug 912828)
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index b58188e200..ebd75cd3bc 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -105,14 +105,8 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
unsigned int winwidth, winheight;
#ifdef XFree86Server
/* XFree86 GLX renderer */
- if (xmBuffer->frontbuffer->width > MAX_WIDTH ||
- xmBuffer->frontbuffer->height > MAX_HEIGHT) {
- winwidth = buffer->Width;
- winheight = buffer->Height;
- } else {
- winwidth = xmBuffer->frontbuffer->width;
- winheight = xmBuffer->frontbuffer->height;
- }
+ winwidth = MIN2(xmBuffer->frontbuffer->width, MAX_WIDTH);
+ winheight = MIN2(xmBuffer->frontbuffer->height, MAX_HEIGHT);
#else
Window root;
int winx, winy;