[vlc-devel] [PATCH]win32 color fix

Kaarlo Räihä agent_007 at luukku.com
Thu Jul 2 13:43:46 CEST 2009


Paul Fernquist kirjoitti 02.07.2009 kello 12:02:
> 
> 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

It doesn't check if the feature is present, it just makes Direct3D default video output if OS is Vista or newer, and this is because DirectX (default in other Windows versios) disables Aero.


>  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
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel


...................................................................
Luukku Plus paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku



More information about the vlc-devel mailing list