[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] windows screen saver in pygame?



Syver Enstad wrote:
   ScreenSaver /p <HWND> - Preview Screen Saver as child of window <HWND>.
therefore, you could still get pygame to do the preview window, the init code would look like this...

if sys.argv[1] == "/p": #preview mode
os.environ['SDL_VIDEO_DRIVER'] = 'windib'
os.environ['SDL_WINDOWID'] = sys.argv[2]
pygame.init()
window = pygame.display.set_mode((100,100))
width, height = window.get_size()
else: #regular init mode
pygame.init()
window = pygame.display.set_mode((640, 480), FULLSCREEN)
width, height = window.get_size()




--
"if they keep silent, the very stones will cry out"
pete*shinners.org