[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Ann: Pygame 1.8 SVN snapshot as Win32 installers



I'm not sure how accurate the reasons are:
"The "windib" video driver is the default now, to prevent problems
with certain laptops, 64-bit Windows, and Windows Vista. The DirectX
driver is still available, and can be selected by setting the
environment variable SDL_VIDEODRIVER to "directx"."

I know people running pygame with directx games on vista does not
work.  eg solar wolf
http://www.pygame.org/shredwheat/solarwolf/ uses an old pygame which
used directx by default - and does not work on my brothers vista
laptop.  So changing the default is a good idea... for newer versions
of windows.


Maybe we could do some trickery and select directx on win9x, win2k and
on XP, and otherwise default to windib.

As losing so much performance, and changing the input semantics
slightly on older machines is just silly imho.


# if the driver is not set on old windows then we set it.
import os, platform
if not os.environ.has_key("SDL_VIDEODRIVER"):
    # check if win9x or win2k, or XP use directx by default, otherwise windib.
    uname_details = platform.uname()

    old_windows = (uname_details[0] == 'Windows' and (uname_details[2] in ["XP"]
						
    or "98" in uname_details[2]or "Me" in uname_details[2]  or "95" in
uname_details[2] or "2000" in uname_details[2]))
    if old_windows:
        os.environ["SDL_VIDEODRIVER"] = "directx"




On Jan 27, 2008 9:17 AM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> DirectX support is always compiled in on windows - however support
> being enabled is different than it being the default backend. look at
> SDL_video.c - SDL_VideoInit() implements the backend selection. It
> works by using the first in the list if no specific one is specified.
> You can see from the "static VideoBootStrap *bootstrap[] " list that
> windib is just before directx in that list, which makes it the
> default.
>
> To change the default you'd have to change the order of the list in
> SDL, or set the environment variable to directX (if not set already)
> before calling SDL_VideoInit.
>
>
> On Jan 26, 2008 9:45 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> > Funny. The first item in the SDL FAC* says, "SDL takes advantage of
> > DirectX hardware acceleration when it is available, but falls back to
> > the standard Win32 services if DirectX is not installed". And the SDL
> > 1.2.12 configure script shows DirectX enabled by default. So it appears
> > to have been re-activated (or their documentation is outdated). But I
> > can always add a build flag to force DirectX support. SDL 1.2.13 is out
> > so I should try building it anyway.
> >
> > Lenard
> >
> > * http://www.libsdl.org/faq.php?action=listentries&category=4#38
> >
> >
> >
> > Brian Fisher wrote:
> > > The default was changed in SDL 1.2.10, and has been windib since.
> > > http://libsdl.org/release/changes-1.2.html
> > > ---------------------------------------------------------
> > > "The "windib" video driver is the default now, to prevent problems
> > > with certain laptops, 64-bit Windows, and Windows Vista. The DirectX
> > > driver is still available, and can be selected by setting the
> > > environment variable SDL_VIDEODRIVER to "directx"."
> > >
> > > On Jan 26, 2008 9:06 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> > >
> > >> Hi René,
> > >>
> > >> The SDL documentation says directx is the default. I don't know why
> > >> windib was chosen instead for Pygame. I've been using the directx
> > >> default since I started building SDL 1.2.12 myself. So I see no problem
> > >> leaving it that way.
> > >>
> > >> Lenard
> > >>
> > >>
> > >>
> > >> René Dudfield wrote:
> > >>
> > >>> wonderful :)
> > >>>
> > >>> I gave it a bit of a test run on an old XP machine and it seems to go fine :)
> > >>>
> > >>> I ran a bunch of the example programs, and also a few pygame games
> > >>> like solar wolf, and zanthor etc.
> > >>>
> > >>> What do you think about making the directx driver the default again?
> > >>> Rather than windb?  I noticed both solar wolf and zanthor ran faster
> > >>> on my machine with directx.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> >
> >
> > --
> >
> > Lenard Lindstrom
> > <len-l@xxxxxxxxx>
> >
> >
>