mirror of
https://github.com/reactos/reactos.git
synced 2025-07-10 11:44:12 +00:00
patch from : Paolo Devoti (email devotip at tiscali dot it)
----------------------------------------------------------- Fixed right hdc being save/restore , the #if 0 change was not accpected. the code works fine without it. it was problare cause by another bug. all wine test for gdi32_winetest dc pass now, without any foualt. See issue #2055 for more details. svn path=/trunk/; revision=27768
This commit is contained in:
parent
e54ea177eb
commit
cf0aabe39c
1 changed files with 20 additions and 18 deletions
|
@ -1811,15 +1811,15 @@ NtGdiRestoreDC(HDC hDC, INT SaveLevel)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if(abs(SaveLevel) > dc->saveLevel || SaveLevel == 0)
|
||||
if (SaveLevel < 0)
|
||||
SaveLevel = dc->saveLevel + SaveLevel + 1;
|
||||
|
||||
if(SaveLevel < 0 || dc->saveLevel<SaveLevel)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME this calc are not 100% correct I think ??*/
|
||||
if (SaveLevel < 0) SaveLevel = dc->saveLevel + SaveLevel + 1;
|
||||
|
||||
success=TRUE;
|
||||
while (dc->saveLevel >= SaveLevel)
|
||||
{
|
||||
|
@ -1841,11 +1841,13 @@ NtGdiRestoreDC(HDC hDC, INT SaveLevel)
|
|||
DC_UnlockDc( dcs );
|
||||
|
||||
NtGdiSetDCState(hDC, hdcs);
|
||||
//if (!PATH_AssignGdiPath( &dc->path, &dcs->path ))
|
||||
|
||||
if (!PATH_AssignGdiPath( &dc->w.path, &dcs->w.path ))
|
||||
{
|
||||
/* FIXME: This might not be quite right, since we're
|
||||
* returning FALSE but still destroying the saved DC state
|
||||
*/
|
||||
success=FALSE;
|
||||
* returning FALSE but still destroying the saved DC state */
|
||||
success = FALSE;
|
||||
}
|
||||
dc = DC_LockDc(hDC);
|
||||
if(!dc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue