Restoring resolution when exiting: some questions
Peter Beutner
p.beutner at gmx.net
Sat Oct 29 16:08:30 CDT 2005
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
More information about the wine-devel
mailing list