You are here > Forums > Manual installations > [Issue] Changing resolution after program exit? fr

The forum

[Issue] Changing resolution after program exit?

New topic  - Reply
Author Replies
jucor Monday 13 February 2012 at 13:30 - [Quote]

Rank: Member

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 - [Quote]

Rank: Developer

Developer

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"

Edited by petch

Il n'y a rien à voir ici