http://bugs.winehq.org/show_bug.cgi?id=21515
--- Comment #91 from Edward vbgraphix2003@hotmail.com 2010-02-26 07:36:30 --- I just looked up the strstr function and it seems it parses the whole string not just the beginning or end of the string. Perhaps the easiest way to handle this would be to erase everything but the card ID, and that should work for both classic Mesa and Gallium.
So that would be:
/* Radeon R5xx */ if (strstr(gl_renderer, "R520") || strstr(gl_renderer, "RV530") || strstr(gl_renderer, "RV535") || strstr(gl_renderer, "RV560") || strstr(gl_renderer, "RV570") || strstr(gl_renderer, "R580")) { *vidmem = 128; /* X1600 uses 128-256MB, >=X1800 uses 56MB */ return CARD_ATI_RADEON_X1600; }
I have absolutely no experience making patches, but this should make the patching much easier and future-proof for when Gallium reaches version 0.5 and beyond.