Commit f605add4 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winemac: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.

parent 46c8a637
...@@ -1525,7 +1525,7 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns ...@@ -1525,7 +1525,7 @@ static BOOL create_context(struct wgl_context *context, CGLContextObj share, uns
* *
* Implementation of wglSetPixelFormat and wglSetPixelFormatWINE. * Implementation of wglSetPixelFormat and wglSetPixelFormatWINE.
*/ */
static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset) static BOOL set_pixel_format(HDC hdc, int fmt, BOOL internal)
{ {
struct macdrv_win_data *data; struct macdrv_win_data *data;
const pixel_format *pf; const pixel_format *pf;
...@@ -1540,16 +1540,19 @@ static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset) ...@@ -1540,16 +1540,19 @@ static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset)
return FALSE; return FALSE;
} }
if (!(data = get_win_data(hwnd))) if (!internal)
{ {
FIXME("DC for window %p of other process: not implemented\n", hwnd); /* cannot change it if already set */
return FALSE; int prev = win32u_get_window_pixel_format( hwnd );
if (prev)
return prev == fmt;
} }
if (!allow_reset && data->pixel_format) /* cannot change it if already set */ if (!(data = get_win_data(hwnd)))
{ {
ret = (data->pixel_format == fmt); FIXME("DC for window %p of other process: not implemented\n", hwnd);
goto done; return FALSE;
} }
/* Check if fmt is in our list of supported formats to see if it is supported. */ /* Check if fmt is in our list of supported formats to see if it is supported. */
...@@ -1588,7 +1591,7 @@ static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset) ...@@ -1588,7 +1591,7 @@ static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset)
done: done:
release_win_data(data); release_win_data(data);
if (ret && gl_surface_mode == GL_SURFACE_BEHIND) if (ret && gl_surface_mode == GL_SURFACE_BEHIND)
win32u_set_window_pixel_format(hwnd, fmt, FALSE); win32u_set_window_pixel_format(hwnd, fmt, internal);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment