El Foro

[Issue] Changing resolution after program exit?

Autor Respuestas
jucor Monday 13 February 2012 at 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 Monday 13 February 2012 at 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"

Editado por: petch

Capitain_Jack Tuesday 21 February 2017 at 3:32
Capitain_Jack

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

Editado por: Dadu042


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