简体   繁体   中英

How do I not allow pygame to change my screen resolution in Linux?

I've recently written a shell script which boots my Windows Python application with wine:

#!/bin/sh
wine data/Python/x86/python.exe loader.py 'x86'

While the program is running, everything works as expected. The problem is, when the SDL window is displayed, my second monitor is disabled, and the orientation of my primary monitor changes. The resolution of my primary monitor stays the same. My question is, what can I do to disable these changes?

Installing a Linux Python interpreter is out of the question, because the solution:

1: needs to be portable
2: would currently oversize download

EDIT:

some extra info, I just recently ran it with a terminal and got:

fixme:win:EnumDisplayDevicesW ((null),0,0x42f3ec,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x42f46c,0x00000000), stub!
fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList

not sure if this solves anything though

If you run winecfg you can set it to run all applications in a window. From http://ubuntuforums.org/showthread.php?t=693292

Applications --> Wine --> Configure Wine or just run winecfg from the terminal

Click on the Graphics tab Check the "Emulate Virtual Desktop" box And enter in the virtual Desktop size (like 800x600 or something).

It sounds like your pygame application is setting a resolution and switching to fullscreen. If you could disable fullscreen in the pygame app, this would probably also work.

Well, I've used it long enough to verify this was the case.
I'd not even used linux for a month before posting this question.

The issue happened because of Wine version 1.6 incompatibilities.

The solution is to update Wine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM