Issue #31 resolved

pygame.error: No available video device

illume
created an issue

== , 2009-04-15 21:42:14 -0700

{{{ Traceback (most recent call last): File "C:\dpf\AssemblyLine-0.4\run_game.py", line 13, in <module> main.main() File "C:\dpf\AssemblyLine-0.4\Game\Code\main.py", line 19, in main display = pygame.display.set_mode(settings.screen_size, settings.flags) pygame.error: No available video device

all pygame dependencies installed }}}


== illume, 2009-05-27 00:44:41 -0700

{{{ Hi,

looks possibly related to this bug report: http://groups.google.com/group/pygame-mirror-on-google-groups/browse_thread/thread/423f1d7f3e909c38

Are you able to confirm which version of windows you're on?

cu, }}}


== Pygame XP, 2011-03-25 06:38:46 -0700

{{{ (In reply to comment #1)

Hi, looks possibly related to this bug report: http://groups.google.com/group/pygame-mirror-on-google-groups/browse_thread/thread/423f1d7f3e909c38 Are you able to confirm which version of windows you're on?
cu,

Hi cu,

I'm having the same issue on an XP machine. When I execute pygame.display.init() in the shell, I receive (5,1) rather than (6,0) and when I try to execute pygame.display.set_mode I receive pygame.error: No available video device.

Is there a way to determine what module is failing in the init() call?

tu,

Pygame XP }}}


Comments (11)

  1. illume reporter
    import os
    os.environ['SDL_VIDEODRIVER']='windib'
    

    I think maybe we should finally switch to windib being the default even on XP. We could try some complicated scheme to try to init the display with directx first in a separate process and if that fails we try windib... but I guess that might be failure prone too.

  2. Lenard Lindstrom

    The SDL Direct X driver is unreliable. 'windib' is the SDL default. How 'directx' behaves probably depends on which version of Direct X is installed. It would seem Microsoft has given up maintaining compatibility with Direct X 5.

  3. Anonymous

    Its a miracle! lol thanks illume for the code! I had issues getting my game working using the pygame library, and this fixed it!

  4. Anonymous

    i was having the same problem too, can somebody help me out, i was working for a pygame project, a lil bit explanation for me to understand it well.. plzzzzz and thanks!!

  5. Jason Marshall

    I think it's time to make windib the default renderer for Windows XP. With that change, we'll be able to close this issue. In my opinion, the productivity losses due to directx renderer bugs outweigh the performance advantage of the directx renderer on some hardware.

    Complicated try-directx-except-windib logic would not be a good idea because sometimes after the directx renderer fails, only a system reboot can restore the PC to proper working order. http://article.gmane.org/gmane.comp.python.pygame/17527/match=%22system%20reboot%20cleared%22

    This is how I think the renderer-choosing logic should work:

    Windows 95/98/Me without DirectX 5 or greater → windib

    Windows 95/98/Me with DirectX 5 or greater → directx

    Windows NT/2000/XP/Vista/7/8... → windib

    I'll implement the change if illume doesn't object to my approach.

  6. Log in to comment