Commit e091c6e8 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Only translate coordinates for swapchain surfaces in surface_translate_drawable_coords().

This fixes a regression introduced by commit dbd8c89e. When using ORM_BACKBUFFER, off-screen surfaces may be loaded into WINED3D_LOCATION_DRAWABLE. They shouldn't be flipped in that case. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d3714688
......@@ -1911,13 +1911,13 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect)
{
struct wined3d_texture *texture = surface->container;
UINT drawable_height;
if (texture->swapchain)
{
POINT offset = {0, 0};
UINT drawable_height;
RECT windowsize;
if (!texture->swapchain)
return;
if (texture == texture->swapchain->front_buffer)
{
ScreenToClient(window, &offset);
......@@ -1926,11 +1926,6 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
GetClientRect(window, &windowsize);
drawable_height = windowsize.bottom - windowsize.top;
}
else
{
drawable_height = wined3d_texture_get_level_height(texture, surface->texture_level);
}
rect->top = drawable_height - rect->top;
rect->bottom = drawable_height - rect->bottom;
......
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