Get actual resolution for pygame

S

schwerdy

Hi,

I'm trying to write a function with pygame that takes the path to a
..jpg image and displays it in a maximized/fullscreen window. I'm stuck
at pygame.display.set_mode() :) This function needs a resolution as
parameter... Because I don't want the graphic card to change mode, the
best thing would be to give set_mode the actual display resolution.
But how can I get it? My first idea was to invoke "xwininfo -root",
but thats not platform independent. The other idea was to abuse
Tkinter (root = Tkinter.Tk(); h=root.winfo_vrootheight();
w=root.winfo_vrootwidth()), but thats not satisfying and takes a
while.

Anyone with a better idea?
Or do I have to use "xwininfo"?

Thanks in advance
Schwerdy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top