gdi32: Move the release until after the final dc access.
Also only reselect the font if the graphics mode changes. Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e1130cbb99
commit
d4d65e2df9
|
@ -1037,9 +1037,9 @@ INT WINAPI SetGraphicsMode( HDC hdc, INT mode )
|
|||
ret = dc->GraphicsMode;
|
||||
dc->GraphicsMode = mode;
|
||||
}
|
||||
release_dc_ptr( dc );
|
||||
/* font metrics depend on the graphics mode */
|
||||
if (ret) SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_FONT));
|
||||
if (ret != mode) SelectObject(dc->hSelf, GetCurrentObject(dc->hSelf, OBJ_FONT));
|
||||
release_dc_ptr( dc );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue