[PATCH] wined3d: Fix the OpenGL driver version for Mac OS X NVIDIA driver.
Michael Karcher
wine at mkarcher.dialup.fu-berlin.de
Thu Jul 24 03:47:29 CDT 2008
Am Donnerstag, den 24.07.2008, 00:55 +0800 schrieb Huang, Zhangrong:
> Hi,
> I tried run World of Warcraft on Mac OS X with X11 and NVIDIA card,
> got the following error messages:
>
> err:d3d_caps:IWineD3DImpl_FillGLCaps Invalid nVidia version string:
> "1.5 NVIDIA-1.5.24"
> err:d3d_caps:IWineD3DImpl_FillGLCaps Invalid nVidia version string:
> "1.5 NVIDIA-1.5.24"
>
> This patch fixed this problem.
> + gl_string_cursor = gl_string;
> + major = atoi(gl_string_cursor);
> + while (*gl_string_cursor <= '9' && *gl_string_cursor >= '0') {
> + ++gl_string_cursor;
> + }
What is the advantage of that compared to
major = strtol(gl_string, &gl_string_cursor,10);
?
Or even replace the whole scanning code by
if(sscanf(gl_string, "%d.%d", &major, &minor) != 2)
ERR_(d3d_caps)(...)
Regards,
Michael Karcher
More information about the wine-devel
mailing list