Ken Thomases : winemac: Clear the latentDisplayModes instance variable before realizing the latent modes.

Alexandre Julliard julliard at winehq.org
Fri Jan 10 13:22:45 CST 2014


Module: wine
Branch: master
Commit: d4d92a759e78355fbf2301fa6a3c903c9d59996e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d4d92a759e78355fbf2301fa6a3c903c9d59996e

Author: Ken Thomases <ken at codeweavers.com>
Date:   Fri Jan 10 03:11:31 2014 -0600

winemac: Clear the latentDisplayModes instance variable before realizing the latent modes.

---

 dlls/winemac.drv/cocoa_app.m |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 3e622b7..13d9c87 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -2080,13 +2080,14 @@ int macdrv_err_on;
     - (void)applicationDidBecomeActive:(NSNotification *)notification
     {
         NSNumber* displayID;
+        NSDictionary* modesToRealize = [latentDisplayModes autorelease];
 
-        for (displayID in latentDisplayModes)
+        latentDisplayModes = [[NSMutableDictionary alloc] init];
+        for (displayID in modesToRealize)
         {
-            CGDisplayModeRef mode = (CGDisplayModeRef)[latentDisplayModes objectForKey:displayID];
+            CGDisplayModeRef mode = (CGDisplayModeRef)[modesToRealize objectForKey:displayID];
             [self setMode:mode forDisplay:[displayID unsignedIntValue]];
         }
-        [latentDisplayModes removeAllObjects];
 
         [self updateCursorClippingState];
 




More information about the wine-cvs mailing list