Module: wine Branch: master Commit: 1eeec9513c9907439d9607c18b2ba96b1890465c URL: http://source.winehq.org/git/wine.git/?a=commit;h=1eeec9513c9907439d9607c18b...
Author: Charles Davis cdavis5x@gmail.com Date: Mon Feb 29 01:39:07 2016 -0700
Revert "winemac.drv: Actually make the GL context current even if no drawables were given.".
This reverts commits 38f579f9ba0aba49788c2ce84172ae5237929ef4 and 02416314ab6fb7238b28f0047089adfee4a52abd.
No extant application uses this, nor are the wined3d maintainers interested in using it.
Signed-off-by: Charles Davis cdavis5x@gmail.com Signed-off-by: Ken Thomases ken@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winemac.drv/cocoa_opengl.m | 15 ++++++--------- dlls/winemac.drv/opengl.c | 8 +------- 2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_opengl.m b/dlls/winemac.drv/cocoa_opengl.m index e1aca77..ec2b191 100644 --- a/dlls/winemac.drv/cocoa_opengl.m +++ b/dlls/winemac.drv/cocoa_opengl.m @@ -227,18 +227,15 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v) { WineOpenGLContext* currentContext = (WineOpenGLContext*)[WineOpenGLContext currentContext];
- [context removeFromViews:YES]; - - if (currentContext != context) + if ([currentContext isKindOfClass:[WineOpenGLContext class]]) { - if (context) - [context makeCurrentContext]; - else - [WineOpenGLContext clearCurrentContext]; - - if ([currentContext isKindOfClass:[WineOpenGLContext class]]) + [WineOpenGLContext clearCurrentContext]; + if (currentContext != context) [currentContext removeFromViews:YES]; } + + if (context) + [context removeFromViews:YES]; }
[pool release]; diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index f0c7048..ab79a82 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -3057,13 +3057,7 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w return TRUE; }
- if (!draw_hdc && !read_hdc) - { - context->draw_hwnd = NULL; - context->draw_view = NULL; - context->draw_pbuffer = NULL; - } - else if ((hwnd = WindowFromDC(draw_hdc))) + if ((hwnd = WindowFromDC(draw_hdc))) { if (!(data = get_win_data(hwnd))) {