Module: wine Branch: master Commit: d601fd92347fd2032f1e7866ddba661566090674 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d601fd92347fd2032f1e7866d...
Author: Zebediah Figura z.figura12@gmail.com Date: Mon Jun 24 19:08:36 2019 -0500
wined3d: Store the cursor texture in a local variable in swapchain_gl_present().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47392 Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/swapchain.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 8d6306e..b75aead 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -428,9 +428,9 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, struct wined3d_texture *back_buffer = swapchain->back_buffers[0]; const struct wined3d_fb_state *fb = &swapchain->device->cs->fb; struct wined3d_rendertarget_view *dsv = fb->depth_stencil; + struct wined3d_texture *logo_texture, *cursor_texture; const struct wined3d_gl_info *gl_info; struct wined3d_context_gl *context_gl; - struct wined3d_texture *logo_texture; struct wined3d_context *context; BOOL render_to_fbo;
@@ -456,8 +456,8 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, WINED3D_BLT_SRC_CKEY, NULL, WINED3D_TEXF_POINT); }
- if (swapchain->device->bCursorVisible && swapchain->device->cursor_texture - && !swapchain->device->hardwareCursor) + if ((cursor_texture = swapchain->device->cursor_texture) + && swapchain->device->bCursorVisible && !swapchain->device->hardwareCursor) { RECT dst_rect = { @@ -468,9 +468,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, }; RECT src_rect = { - 0, 0, - swapchain->device->cursor_texture->resource.width, - swapchain->device->cursor_texture->resource.height + 0, 0, cursor_texture->resource.width, cursor_texture->resource.height }; const RECT clip_rect = {0, 0, back_buffer->resource.width, back_buffer->resource.height};
@@ -479,9 +477,8 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, if (swapchain->desc.windowed) MapWindowPoints(NULL, swapchain->win_handle, (POINT *)&dst_rect, 2); if (wined3d_clip_blit(&clip_rect, &dst_rect, &src_rect)) - wined3d_texture_blt(back_buffer, 0, &dst_rect, - swapchain->device->cursor_texture, 0, &src_rect, - WINED3D_BLT_ALPHA_TEST, NULL, WINED3D_TEXF_POINT); + wined3d_texture_blt(back_buffer, 0, &dst_rect, cursor_texture, 0, + &src_rect, WINED3D_BLT_ALPHA_TEST, NULL, WINED3D_TEXF_POINT); }
TRACE("Presenting DC %p.\n", context_gl->dc);