summaryrefslogtreecommitdiff
path: root/src/glx/x11/glcontextmodes.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-11-06 13:32:04 -0500
committerKristian Høgsberg <krh@redhat.com>2007-11-06 13:32:33 -0500
commit001de0ac4e9ccd5c440dca4a2994deca668a2d9f (patch)
tree3bc08b2fd06a6047cf754a4ee5badc59358d57a2 /src/glx/x11/glcontextmodes.c
parent866d271aa848d33dfded4989c48ba46108d6cceb (diff)
Remove a couple of "deprecated" fields from __GLXcontextRec.
The __GLXcontextRec struct is internal to the libGL implementation. No point in "deprecating", just get rid of it.
Diffstat (limited to 'src/glx/x11/glcontextmodes.c')
-rw-r--r--src/glx/x11/glcontextmodes.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/glx/x11/glcontextmodes.c b/src/glx/x11/glcontextmodes.c
index c165184903..79bdce7998 100644
--- a/src/glx/x11/glcontextmodes.c
+++ b/src/glx/x11/glcontextmodes.c
@@ -453,19 +453,28 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
*/
__GLcontextModes *
-_gl_context_modes_find_visual( __GLcontextModes * modes, int vid )
+_gl_context_modes_find_visual(__GLcontextModes *modes, int vid)
{
- while ( modes != NULL ) {
- if ( modes->visualID == vid ) {
- break;
- }
+ __GLcontextModes *m;
- modes = modes->next;
- }
+ for (m = modes; m != NULL; m = m->next)
+ if (m->visualID == vid)
+ return m;
- return modes;
+ return NULL;
}
+__GLcontextModes *
+_gl_context_modes_find_fbconfig(__GLcontextModes *modes, int fbid)
+{
+ __GLcontextModes *m;
+
+ for (m = modes; m != NULL; m = m->next)
+ if (m->fbconfigID == fbid)
+ return m;
+
+ return NULL;
+}
/**
* Determine if two context-modes are the same. This is intended to be used