wined3d: Fix (and simplify) the ATI case in IWineD3DImpl_FillGLCaps.

This commit is contained in:
Gerald Pfeifer 2009-06-07 14:13:06 +02:00 committed by Alexandre Julliard
parent 7856ac3c19
commit 6d1a76fb10
1 changed files with 6 additions and 12 deletions

View File

@ -615,21 +615,15 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
major = minor = 0; major = minor = 0;
gl_string_cursor = strchr(gl_string, '-'); gl_string_cursor = strchr(gl_string, '-');
if (gl_string_cursor) { if (gl_string_cursor) {
int error = 0;
gl_string_cursor++; gl_string_cursor++;
/* Check if version number is of the form x.y.z */ /* Check if version number is of the form x.y.z */
if (*gl_string_cursor > '9' && *gl_string_cursor < '0') if ( *gl_string_cursor < '0' || *gl_string_cursor > '9'
error = 1; || *(gl_string_cursor+1) != '.'
if (!error && *(gl_string_cursor+2) > '9' && *(gl_string_cursor+2) < '0') || *(gl_string_cursor+2) < '0' || *(gl_string_cursor+2) > '9'
error = 1; || *(gl_string_cursor+3) != '.'
if (!error && *(gl_string_cursor+4) > '9' && *(gl_string_cursor+4) < '0') || *(gl_string_cursor+4) < '0' || *(gl_string_cursor+4) > '9' )
error = 1; /* Mark version number as malformed */
if (!error && *(gl_string_cursor+1) != '.' && *(gl_string_cursor+3) != '.')
error = 1;
/* Mark version number as malformed */
if (error)
gl_string_cursor = 0; gl_string_cursor = 0;
} }