From: Jan E. <ch...@in...> - 2000-09-11 09:03:16
|
Hi there, I'm having some small problems with PySDL, but I'm not sure this is the correct forum. The regular discussion forums at SourceForge seemed a bit quiet, so I decided to try this instead. Ok, here goes. How do I get a proper list of all accepted video modes using PySDL? I just want to verify that a specific mode can be used with a certain depth. I tried the following code to get some info: #!/usr/bin/python import sdl sdl.init(sdl.INIT_VIDEO) print sdl.video_list_modes(16, sdl.FULLSCREEN) print sdl.video_list_modes(0, sdl.SWSURFACE) print "INFO_HW_A: " + `sdl.video_info ( sdl.INFO_HW_A )` print "INFO_WM_A: " + `sdl.video_info ( sdl.INFO_WM_A )` print "INFO_BLT_HW: " + `sdl.video_info ( sdl.INFO_BLT_HW )` print "INFO_BLT_HW_CC: " + `sdl.video_info ( sdl.INFO_BLT_HW_CC )` print "INFO_BLT_HW_A: " + `sdl.video_info ( sdl.INFO_BLT_HW_A )` print "INFO_BLT_SW: " + `sdl.video_info ( sdl.INFO_BLT_SW )` print "INFO_BLT_SW_CC: " + `sdl.video_info ( sdl.INFO_BLT_SW_CC )` print "INFO_BLT_SW_A: " + `sdl.video_info ( sdl.INFO_BLT_SW_A )` print "INFO_BLT_FILL: " + `sdl.video_info ( sdl.INFO_BLT_FILL )` print "INFO_MEM: " + `sdl.video_info ( sdl.INFO_MEM )` The result from the video_list_modes is always a plain 0. Like this: % ./sdl_info.py 0 0 INFO_HW_A: 0 INFO_WM_A: 1 INFO_BLT_HW: 0 INFO_BLT_HW_CC: 0 INFO_BLT_HW_A: 0 INFO_BLT_SW: 0 INFO_BLT_SW_CC: 0 INFO_BLT_SW_A: 0 INFO_BLT_FILL: 0 INFO_MEM: 0 This seems a bit wrong, so what do I do wrong, or what do I not understand properly? Mainly I'd like to know wether 1024x768 can be opened on the used system, and what depth I can get. Acceleration info could be of some interest too, but not necessary. What is the proper forum for discussion about applications using PySDL or different techniques? I think it would be nice to be able to share ideas and get some help. I'm not that experienced in lowlevel surface handling as needed by SDL (and PySDL). Transparency is for instance one thing that would be nice to learn more about. Is there any publicly available PySDL applications that I could use to see how others have done things? Regards, Chakie --------------------+-------------------------------------------------------- Jan 'Chakie' Ekholm | Balrog New Media http://www.balrog.fi/ Linux Inside | I'm the blue screen of death, nobody hears your screams |