Skip to content

Commit

Permalink
fixup! fshack: winex11: Support opengl scaling according to fake reso…
Browse files Browse the repository at this point in the history
…lution.

NULL get_win_data() may happen if the window is from the other process.

CW-Bug-Id: #22950
  • Loading branch information
Paul Gofman committed Nov 7, 2023
1 parent 78c3b5f commit 271b699
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dlls/winex11.drv/opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,10 +1530,12 @@ static struct gl_drawable *create_gl_drawable( HWND hwnd, const struct wgl_pixel
gl->window = create_client_window( hwnd, visual );
if (gl->window)
gl->drawable = pglXCreateWindow( gdi_display, gl->format->fbconfig, gl->window, NULL );
data = get_win_data( hwnd );
gl->fs_hack = data->fs_hack || fs_hack_get_gamma_ramp( NULL );
if (gl->fs_hack) TRACE( "Window %p has the fullscreen hack enabled\n", hwnd );
release_win_data( data );
if ((data = get_win_data( hwnd )))
{
gl->fs_hack = data->fs_hack || fs_hack_get_gamma_ramp( NULL );
if (gl->fs_hack) TRACE( "Window %p has the fullscreen hack enabled\n", hwnd );
release_win_data( data );
}
TRACE( "%p created client %lx drawable %lx\n", hwnd, gl->window, gl->drawable );
}
#ifdef SONAME_LIBXCOMPOSITE
Expand Down

0 comments on commit 271b699

Please sign in to comment.