Remove optimization (not thread-safe)

svn path=/trunk/; revision=7008
This commit is contained in:
Gé van Geldorp 2003-12-13 23:26:04 +00:00
parent 0d9840021e
commit 44123858ae

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: dc.c,v 1.112 2003/12/13 19:27:10 weiden Exp $ /* $Id: dc.c,v 1.113 2003/12/13 23:26:04 gvg Exp $
* *
* DC.C - Device context functions * DC.C - Device context functions
* *
@ -143,17 +143,13 @@ NtGdiCreateCompatableDC(HDC hDC)
DisplayDC = NULL; DisplayDC = NULL;
if (hDC == NULL) if (hDC == NULL)
{ {
hDC = IntGetScreenDC(); RtlInitUnicodeString(&DriverName, L"DISPLAY");
if (NULL == hDC) DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL);
if (NULL == DisplayDC)
{ {
RtlInitUnicodeString(&DriverName, L"DISPLAY"); return NULL;
DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL);
if (NULL == DisplayDC)
{
return NULL;
}
hDC = DisplayDC;
} }
hDC = DisplayDC;
} }
/* Allocate a new DC based on the original DC's device */ /* Allocate a new DC based on the original DC's device */
@ -170,6 +166,7 @@ NtGdiCreateCompatableDC(HDC hDC)
if (NULL == hNewDC) if (NULL == hNewDC)
{ {
DC_UnlockDc(hDC);
if (NULL != DisplayDC) if (NULL != DisplayDC)
{ {
NtGdiDeleteDC(DisplayDC); NtGdiDeleteDC(DisplayDC);