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 am restoring the resolution using default values to X11DRV_ChangeDisplaySettingsEx. How to manage the case with several applications having different resolutions?
Thanks for any help on this! Julien
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