[vlc-devel] [PATCH]win32 color fix

Paul Fernquist fernqui at hotmail.com
Thu Jul 2 11:02:13 CEST 2009


I am new and submitted a patch for bad colors in win32. It turns out I was
way off. I was patching code thinking the code was Direct3D and VLC was
using the very old DirectDraw library. I switched to Direct3D and everything
worked fine. For some reason the Dierct3D module checks for OS Version and
rejects everything below Vista OS. Microsoft discourages checking OS version
for determining if a feature is present. My XP SP3 system works fine with
DirectX 9.0c. I have no clue how to detect Direct3D, yet. I just changed the
5 to a 4 below.

direct3d.c:
static bool IsVistaOrAbove(void)
{
    OSVERSIONINFO winVer;
    winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);

    if( GetVersionEx(&winVer) )
    {
        if( winVer.dwMajorVersion > 5 )
        {
            /* Windows Vista or above, make this module the default */
            return true;
        }
    }
    /* Windows XP or lower, make sure this module isn't the default */
    return false;
}

Paul Fernquist




More information about the vlc-devel mailing list