forget commit Implement of GdiGetLocalBrush, GdiGetLocalDC, GdiGetLocalFont
[reactos.git] / reactos / dll / win32 / gdi32 / misc / gdientry.c
index 1e38d97..a4c6037 100644 (file)
@@ -485,7 +485,7 @@ DdCreateDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
         if (!ghDirectDraw)
         {
             /* Create the DC */
-            if ((hdc = CreateDC(L"Display", NULL, NULL, NULL)))
+            if ((hdc = CreateDCW(L"Display", NULL, NULL, NULL)))
             {
                 /* Create the DDraw Object */
                 ghDirectDraw = NtGdiDdCreateDirectDrawObject(hdc);
@@ -509,7 +509,7 @@ DdCreateDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
     else
     {
         /* Using the per-process object, so create it */
-    pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc); 
+         pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc); 
     
         /* Set the return value */
         Return = pDirectDrawGlobal->hDD ? TRUE : FALSE;
@@ -830,8 +830,7 @@ WINAPI
 DdCreateSurfaceObject( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
                        BOOL bPrimarySurface)
 {
-       return bDDCreateSurface(pSurfaceLocal, TRUE);
-    //return bDdCreateSurfaceObject(pSurfaceLocal, TRUE);
+    return bDDCreateSurface(pSurfaceLocal, TRUE);
 }
 
 
@@ -911,8 +910,8 @@ DdCreateDIBSection(HDC hdc,
                    HANDLE hSectionApp,
                    DWORD dwOffset)
 {
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -942,7 +941,7 @@ DdAttachSurface( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
                  LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo)
 {
     /* Create Surface if it does not exits one */
-    if (pSurfaceFrom->hDDSurface)
+    if (!pSurfaceFrom->hDDSurface)
     {
         if (!bDDCreateSurface(pSurfaceFrom, FALSE))
         {
@@ -951,7 +950,7 @@ DdAttachSurface( LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
     }
 
     /* Create Surface if it does not exits one */
-    if (pSurfaceTo->hDDSurface)
+    if (!pSurfaceTo->hDDSurface)
     {
         if (!bDDCreateSurface(pSurfaceTo, FALSE))
         {
@@ -988,6 +987,7 @@ ULONG
 STDCALL 
 DdQueryDisplaySettingsUniqueness()
 {
+    /* FIXME share memory */
  return RemberDdQueryDisplaySettingsUniquenessID;
 }