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



Index: wine/dlls/x11drv/window.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/window.c,v
retrieving revision 1.116
diff -u -r1.116 window.c
--- wine/dlls/x11drv/window.c	22 Aug 2005 09:14:21 -0000	1.116
+++ wine/dlls/x11drv/window.c	29 Oct 2005 12:26:11 -0000
@@ -724,6 +724,9 @@
     }
     wine_tsx11_unlock();
     RemovePropA( data->hwnd, whole_window_prop );
+
+    /* When exiting, restore the screen resolution to the default one */
+    X11DRV_ChangeDisplaySettingsEx(0, 0, 0, 0, 0);
 }


Reply via email to