- Solitaire now works partially, patch by Filip Navara

svn path=/trunk/; revision=5859
This commit is contained in:
Richard Campbell 2003-08-25 23:24:03 +00:00
parent 2721685576
commit 5d01a60b97
7 changed files with 28 additions and 19 deletions

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: surface.c,v 1.23 2003/08/20 07:45:01 gvg Exp $ /* $Id: surface.c,v 1.24 2003/08/25 23:24:02 rcampbell Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -175,7 +175,6 @@ EngCreateBitmap(IN SIZEL Size,
SURFOBJ *SurfObj; SURFOBJ *SurfObj;
SURFGDI *SurfGDI; SURFGDI *SurfGDI;
NewBitmap = (PVOID)CreateGDIHandle(sizeof(SURFGDI), sizeof(SURFOBJ)); NewBitmap = (PVOID)CreateGDIHandle(sizeof(SURFGDI), sizeof(SURFOBJ));
if( !ValidEngHandle( NewBitmap ) ) if( !ValidEngHandle( NewBitmap ) )
return 0; return 0;

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.25 2003/08/11 19:05:27 gdalsnes Exp $ /* $Id: stubs.c,v 1.26 2003/08/25 23:24:02 rcampbell Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -14,7 +14,6 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
DWORD DWORD
STDCALL STDCALL
NtUserActivateKeyboardLayout( NtUserActivateKeyboardLayout(
@ -209,7 +208,8 @@ NtUserCreateAcceleratorTable(
DWORD Unknown0, DWORD Unknown0,
DWORD Unknown1) DWORD Unknown1)
{ {
UNIMPLEMENTED /* UNIMPLEMENTED */
DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__);
return 0; return 0;
} }

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: window.c,v 1.103 2003/08/21 23:07:40 weiden Exp $ /* $Id: window.c,v 1.104 2003/08/25 23:24:02 rcampbell Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -929,7 +929,7 @@ NtUserBuildHwndList(
WindowObject = IntGetWindowObject ( hwndParent ); WindowObject = IntGetWindowObject ( hwndParent );
if ( !WindowObject ) if ( !WindowObject )
{ {
DPRINT("Bad window handle 0x%x\n", hWnd); DPRINT("Bad window handle 0x%x\n", hwndParent);
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0; return 0;
} }
@ -1225,6 +1225,7 @@ NtUserCreateWindowEx(DWORD dwExStyle,
if (!(dwStyle & WS_POPUP)) if (!(dwStyle & WS_POPUP))
{ {
WindowObject->Style |= WS_CAPTION; WindowObject->Style |= WS_CAPTION;
WindowObject->Flags |= WINDOWOBJECT_NEED_SIZE;
DbgPrint("4: Style is now %d\n", WindowObject->Style); DbgPrint("4: Style is now %d\n", WindowObject->Style);
/* FIXME: Note the window needs a size. */ /* FIXME: Note the window needs a size. */
} }
@ -1346,6 +1347,8 @@ NtUserCreateWindowEx(DWORD dwExStyle,
} }
/* Send move and size messages. */ /* Send move and size messages. */
/* FIXME: Breaks Solitaire, probably shouldn't be there. FiN */
#if 0
if (!(WindowObject->Flags & WINDOWOBJECT_NEED_SIZE)) if (!(WindowObject->Flags & WINDOWOBJECT_NEED_SIZE))
{ {
LONG lParam; LONG lParam;
@ -1364,7 +1367,10 @@ NtUserCreateWindowEx(DWORD dwExStyle,
WindowObject->ClientRect.top); WindowObject->ClientRect.top);
DPRINT("NtUserCreateWindow(): About to send WM_MOVE\n"); DPRINT("NtUserCreateWindow(): About to send WM_MOVE\n");
IntCallWindowProc(NULL, WindowObject->Self, WM_MOVE, 0, lParam); IntCallWindowProc(NULL, WindowObject->Self, WM_MOVE, 0, lParam);
WindowObject->Flags &= ~WINDOWOBJECT_NEED_SIZE;
} }
#endif
/* Move from parent-client to screen coordinates */ /* Move from parent-client to screen coordinates */
if (0 != (WindowObject->Style & WS_CHILD)) if (0 != (WindowObject->Style & WS_CHILD))

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: bitmaps.c,v 1.35 2003/08/20 20:45:28 ea Exp $ */ /* $Id: bitmaps.c,v 1.36 2003/08/25 23:24:02 rcampbell Exp $ */
#undef WIN32_LEAN_AND_MEAN #undef WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <stdlib.h> #include <stdlib.h>
@ -195,13 +195,13 @@ HBITMAP STDCALL NtGdiCreateBitmap(INT Width,
// Allocate memory for bitmap bits // Allocate memory for bitmap bits
bmp->bitmap.bmBits = ExAllocatePool(PagedPool, bmp->bitmap.bmWidthBytes * bmp->bitmap.bmHeight); bmp->bitmap.bmBits = ExAllocatePool(PagedPool, bmp->bitmap.bmWidthBytes * bmp->bitmap.bmHeight);
BITMAPOBJ_UnlockBitmap( hBitmap );
if (Bits) /* Set bitmap bits */ if (Bits) /* Set bitmap bits */
{ {
NtGdiSetBitmapBits(hBitmap, Height * bmp->bitmap.bmWidthBytes, Bits); NtGdiSetBitmapBits(hBitmap, Height * bmp->bitmap.bmWidthBytes, Bits);
} }
BITMAPOBJ_UnlockBitmap( hBitmap );
return hBitmap; return hBitmap;
} }
@ -439,6 +439,8 @@ LONG STDCALL NtGdiSetBitmapBits(HBITMAP hBitmap,
} }
} }
BITMAPOBJ_UnlockBitmap(hBitmap);
return ret; return ret;
} }
@ -573,6 +575,7 @@ HBITMAP FASTCALL BITMAPOBJ_CopyBitmap(HBITMAP hBitmap)
bm = bmp->bitmap; bm = bmp->bitmap;
bm.bmBits = NULL; bm.bmBits = NULL;
BITMAPOBJ_UnlockBitmap(hBitmap);
res = NtGdiCreateBitmapIndirect(&bm); res = NtGdiCreateBitmapIndirect(&bm);
if(res) if(res)
{ {

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.73 2003/08/20 07:45:02 gvg Exp $ /* $Id: dc.c,v 1.74 2003/08/25 23:24:02 rcampbell Exp $
* *
* DC.C - Device context functions * DC.C - Device context functions
* *
@ -135,21 +135,21 @@ NtGdiCreateCompatableDC(HDC hDC)
if (OrigDC == NULL) if (OrigDC == NULL)
{ {
hNewDC = DC_AllocDC(L"DISPLAY"); hNewDC = DC_AllocDC(L"DISPLAY");
if( hNewDC )
NewDC = DC_LockDc( hNewDC );
} }
else else
{ {
/* Allocate a new DC based on the original DC's device */ /* Allocate a new DC based on the original DC's device */
hNewDC = DC_AllocDC(OrigDC->DriverName); hNewDC = DC_AllocDC(OrigDC->DriverName);
if( hNewDC )
NewDC = DC_LockDc( hNewDC );
} }
if (NewDC == NULL) if (NewDC == NULL)
{ {
return NULL; return NULL;
} }
else
{
NewDC = DC_LockDc( hNewDC );
}
/* Copy information from original DC to new DC */ /* Copy information from original DC to new DC */
NewDC->hSelf = NewDC; NewDC->hSelf = NewDC;
@ -190,6 +190,7 @@ NtGdiCreateCompatableDC(HDC hDC)
/* Create default bitmap */ /* Create default bitmap */
if (!(hBitmap = NtGdiCreateBitmap( 1, 1, 1, 1, NULL ))) if (!(hBitmap = NtGdiCreateBitmap( 1, 1, 1, 1, NULL )))
{ {
DC_UnlockDc( hDC );
DC_UnlockDc( hNewDC ); DC_UnlockDc( hNewDC );
DC_FreeDC( hNewDC ); DC_FreeDC( hNewDC );
return NULL; return NULL;

View file

@ -1,5 +1,5 @@
/* /*
* $Id: dib.c,v 1.29 2003/08/24 20:58:09 gvg Exp $ * $Id: dib.c,v 1.30 2003/08/25 23:24:02 rcampbell Exp $
* *
* ReactOS W32 Subsystem * ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@ -631,7 +631,7 @@ DIB_CreateDIBSection(
if (section) if (section)
/* bm.bmBits = MapViewOfFile(section, FILE_MAP_ALL_ACCESS, /* bm.bmBits = MapViewOfFile(section, FILE_MAP_ALL_ACCESS,
0L, offset, totalSize); */ 0L, offset, totalSize); */
DPRINT("DIB_CreateDIBSection: Cannot yet handle section DIBs\n"); DbgPrint("DIB_CreateDIBSection: Cannot yet handle section DIBs\n");
else if (ovr_pitch && offset) else if (ovr_pitch && offset)
bm.bmBits = (LPVOID) offset; bm.bmBits = (LPVOID) offset;
else { else {

View file

@ -19,7 +19,7 @@
/* /*
* GDIOBJ.C - GDI object manipulation routines * GDIOBJ.C - GDI object manipulation routines
* *
* $Id: gdiobj.c,v 1.39 2003/08/21 20:16:55 gvg Exp $ * $Id: gdiobj.c,v 1.40 2003/08/25 23:24:03 rcampbell Exp $
* *
*/ */
@ -491,7 +491,7 @@ CreateStockObjects(void)
if (NULL != StockObjects[Object]) if (NULL != StockObjects[Object])
{ {
GDIOBJ_MarkObjectGlobal(StockObjects[Object]); GDIOBJ_MarkObjectGlobal(StockObjects[Object]);
GDI_HANDLE_SET_STOCKOBJ(StockObjects[Object]); /* GDI_HANDLE_SET_STOCKOBJ(StockObjects[Object]);*/
} }
} }