save and restore dc state
This commit is contained in:
parent
79feefac26
commit
f49f09895b
3 changed files with 6 additions and 1 deletions
|
@ -914,6 +914,8 @@ HRESULT dds_GetDC(IDirectDrawSurfaceImpl* This, HDC FAR* lpHDC)
|
|||
if (lpHDC)
|
||||
*lpHDC = dc;
|
||||
|
||||
InterlockedExchange(&This->dc_state, SaveDC(dc));
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
@ -1024,6 +1026,8 @@ HRESULT dds_ReleaseDC(IDirectDrawSurfaceImpl* This, HDC hDC)
|
|||
}
|
||||
}
|
||||
|
||||
RestoreDC(hDC, InterlockedExchangeAdd((LONG*)&This->dc_state, 0));
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue