git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@888
7f0cb862-5218-0410-a997-
914c9d46530a
);
}
#elif TARGET_HOST_MS_WINDOWS
);
}
#elif TARGET_HOST_MS_WINDOWS
- if( fgStructure.CurrentWindow )
- ReleaseDC( fgStructure.CurrentWindow->Window.Handle,
- fgStructure.CurrentWindow->Window.Device );
-
- if ( window )
+ if ( window != fgStructure.CurrentWindow )
- window->Window.Device = GetDC( window->Window.Handle );
- wglMakeCurrent(
- window->Window.Device,
- window->Window.Context
- );
+ if( fgStructure.CurrentWindow )
+ ReleaseDC( fgStructure.CurrentWindow->Window.Handle,
+ fgStructure.CurrentWindow->Window.Device );
+
+ if ( window )
+ {
+ window->Window.Device = GetDC( window->Window.Handle );
+ wglMakeCurrent(
+ window->Window.Device,
+ window->Window.Context
+ );
+ }
}
#endif
fgStructure.CurrentWindow = window;
}
#endif
fgStructure.CurrentWindow = window;