From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/make_opengl | 12 ------------ dlls/opengl32/unix_thunks.c | 12 ------------ dlls/opengl32/unix_wgl.c | 1 + 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 4448c1076ba..47785e3531a 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -1630,16 +1630,6 @@ foreach (sort keys %wgl_functions) print OUT generate_null_func($_, $wgl_functions{$_}); } -printf OUT "static BOOL null_context_reset( struct opengl_context *context, HDC hdc, struct opengl_context *share, const int *attribs )\n"; -printf OUT "{\n"; -printf OUT " WARN( \"unsupported\\n\" );\n"; -printf OUT " return FALSE;\n"; -printf OUT "}\n"; -printf OUT "static BOOL null_context_flush( struct opengl_context *context, void (*flush)(void), UINT flags )\n"; -printf OUT "{\n"; -printf OUT " WARN( \"unsupported\\n\" );\n"; -printf OUT " return FALSE;\n"; -printf OUT "}\n"; printf OUT "static void null_get_pixel_formats( struct wgl_pixel_format *formats, UINT max_formats,\n"; printf OUT " UINT *num_formats, UINT *num_onscreen_formats )\n"; printf OUT "{\n"; @@ -1655,8 +1645,6 @@ print OUT "\n"; print OUT "struct opengl_funcs null_opengl_funcs =\n"; print OUT "{\n"; -print OUT " .p_context_reset = null_context_reset,\n"; -print OUT " .p_context_flush = null_context_flush,\n"; print OUT " .p_get_pixel_formats = null_get_pixel_formats,\n"; foreach (sort keys %wgl_functions) { diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index 83aba143ccc..16afcb68bc6 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -89988,16 +89988,6 @@ static BOOL null_wglSwapBuffers( HDC hdc ) WARN( "unsupported\n" ); return 0; } -static BOOL null_context_reset( struct opengl_context *context, HDC hdc, struct opengl_context *share, const int *attribs ) -{ - WARN( "unsupported\n" ); - return FALSE; -} -static BOOL null_context_flush( struct opengl_context *context, void (*flush)(void), UINT flags ) -{ - WARN( "unsupported\n" ); - return FALSE; -} static void null_get_pixel_formats( struct wgl_pixel_format *formats, UINT max_formats, UINT *num_formats, UINT *num_onscreen_formats ) { @@ -91359,8 +91349,6 @@ static void null_glViewport( GLint x, GLint y, GLsizei width, GLsizei height ) struct opengl_funcs null_opengl_funcs = { - .p_context_reset = null_context_reset, - .p_context_flush = null_context_flush, .p_get_pixel_formats = null_get_pixel_formats, .p_wglCopyContext = null_wglCopyContext, .p_wglCreateContext = null_wglCreateContext, diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 73092486ce8..c5dbbd3e9fd 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1489,6 +1489,7 @@ HGLRC wrap_wglCreateContextAttribsARB( TEB *teb, HDC hdc, HGLRC client_shared, c const struct opengl_funcs *funcs = get_dc_funcs( hdc ); struct context *context, *shared = get_updated_context( teb, client_shared ); + if (!funcs->p_context_reset) return 0; if (!(context = calloc( 1, sizeof(*context) ))) { RtlSetLastWin32Error( ERROR_OUTOFMEMORY ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9991