On Tue, Jun 05, 2007 at 06:42:41PM +0200, Fred Pacquier wrote: > My specific problem was determining the screen resolution at the start > of a pyGame app, to run it fullscreen on the tablet, and windowed on > other platforms. This does not seem possible from pyGame itself,
How about taking the largest one from pygame.display.list_modes()? > the > only workaround I could find was to also import gtk just to use its > gtk.gdk.screen_width() and gtk.gdk.screen_height() functions once. Both approaches will fail when you have a dual-head system -- you'll see a large combined display size (e.g. 2308x1024 for a 1024x768+1280x1024 dual-head mode that crashes pygame when you try to switch to it). With gtk.gdk you can at least find the number of screens and their resolutions. > As this is a lot of overhead for the tablet, I preferred to detect that > platform first and set the values manually, and only use gtk detection > for more powerful platforms. If there's a better way I'd love to know it :-) Marius Gedminas -- Gates' Law: Every 18 months, the speed of software halves.
signature.asc
Description: Digital signature
_______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers