Re: [PATCH 1/2 v2] winemac.drv: Actually make the GL context current even if no drawables were given.
On Feb 18, 2016, at 3:17 AM, Charles Davis <cdavis5x(a)gmail.com> wrote:
@@ -3108,7 +3108,7 @@ static BOOL macdrv_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct w (InterlockedCompareExchange(&context->update_swap_interval, FALSE, TRUE) || pbuffer != context->draw_pbuffer)) set_swap_interval(context, 0); } - else + else if (draw_hdc) { WARN("no window or pbuffer for DC\n"); LeaveCriticalSection(&dc_pbuffers_section);
I would prefer an explicit "if (!draw_hdc && !read_hdc) { /* clear context->draw_... */ } else" be introduced before the "if ((hwnd = WindowFromDC(draw_hdc)))". First, from my reading of the spec, a NULL draw_hdc and a non-NULL read_hdc should still be an error. Second, burying the logic in the pbuffer branch seems obscure. Thanks, Ken
participants (1)
-
Ken Thomases