~ubuntu-branches/ubuntu/karmic/libsdl1.2/karmic

« back to all changes in this revision

Viewing changes to src/video/x11/SDL_x11gl.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2008-01-05 14:10:45 UTC
  • mto: (2.1.3 lenny)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20080105141045-mjdg2rp09mamme4a
Tags: upstream-1.2.13
ImportĀ upstreamĀ versionĀ 1.2.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
338
338
/* Get attribute data from glX. */
339
339
int X11_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value)
340
340
{
341
 
        int retval;
 
341
        int retval = -1;
 
342
        int unsupported = 0;
342
343
        int glx_attrib = None;
343
344
 
344
345
        switch( attrib ) {
398
399
                        }
399
400
                        return retval;
400
401
                } else {
401
 
                        return(-1);
 
402
                        unsupported = 1;
402
403
                }
403
404
                break;
404
405
            case SDL_GL_SWAP_CONTROL:
406
407
                        *value = this->gl_data->glXGetSwapIntervalMESA();
407
408
                        return(0);
408
409
                } else {
409
 
                        return(-1);
 
410
                        unsupported = 1;
410
411
                }
411
412
                break;
412
413
            default:
413
 
                return(-1);
414
 
        }
415
 
 
416
 
        retval = this->gl_data->glXGetConfig(GFX_Display, glx_visualinfo, glx_attrib, value);
417
 
 
 
414
                        unsupported = 1;
 
415
                        break;
 
416
        }
 
417
 
 
418
        if (unsupported) {
 
419
                SDL_SetError("OpenGL attribute is unsupported on this system");
 
420
        } else {
 
421
                retval = this->gl_data->glXGetConfig(GFX_Display, glx_visualinfo, glx_attrib, value);
 
422
        }
418
423
        return retval;
419
424
}
420
425