[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Restoring resolution when exiting: some questions
From:       Peter Beutner <p.beutner () gmx ! net>
Date:       2005-10-29 21:08:30
Message-ID: 4363E4CE.10502 () gmx ! net
[Download RAW message or body]

julien schrieb:
> Hello!
> Different games do not restore resolution when exiting. I tried to
> modify wine a bit and came to several problems:
> - I used destroy_whole_window api as a point to restore resolution.
> However I am not sure it is not the best place and it does not help in
> some cases (e.g., if Wine is crashing). So what could be the most
> relevant point (TerminateProcess?) to restore resolution?
I don't think it's possible to ensure that your code is _always_ executed when wine
exits(especially when you want it to be executed when wine crashes).
Neither I think that this "hack" belongs into wine at all.

I use a small wrapper script to start wine which takes care of restoring the resolution:

#!/bin/bash
old=`xrandr | grep ^* | cut -b2`
wine "$@"
new=`xrandr | grep ^* | cut -b2`
if [[ $new != $old ]]; then
    xrandr -s $old
fi

Cu
Peter


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic