Forums

[Issue] Changing resolution after program exit?

Auteur Réponses
jucor Lundi 13 Février 2012 à 13:30
jucorAnonymous

Hi all

New to POL, and only marginally familiar with Wine (but relatively fluent in bash scripting), I would like to use it for Blackwell Deception (Demo): great game, fully compatible Wine as per http://appdb.winehq.org/objectManager.php?sClass=version&iId=24643, *but* the demo changes the screen resolution to 640x480 and does not set it back when I exit.

Is there a POL function that I could use in the script to set the resolution back to its original version once the game is done running ?

Thanks for any tip!
petch Lundi 13 Février 2012 à 14:07
petch

Hi,

In shortcuts there's only the possibility to add commands before your program, so when I need to run something after the program is terminated, I put it as Bash EXIT trap handler.
According to Wine FAQ, "10.10.3. My X screen won't go back to its normal resolution after running a game fullscreen.", one way to reset resolution is to use xrandr -s 0.
So, putting everything together:
POL_Shortcut_InsertBeforeWine "$SHORTCUT" "trap 'xrandr -s 0' EXIT"

Edité par petch

Capitain_Jack Mardi 21 Février 2017 à 3:32
Capitain_Jack

Again, this with other post from you helped me... follow up guys: https://www.playonlinux.com/en/topic-11586.html

Edité par Dadu042


Debian SparkyLinux Testing (Rolling)
64bit
AMD CPU
ATI GPU

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com