Author: jgardou
Date: Wed Jun 9 02:18:29 2010
New Revision: 47702
URL:
http://svn.reactos.org/svn/reactos?rev=47702&view=rev
Log:
[GDI32]
- Header describes the bitmap to be created, not the bits we are passed.
- Circumvent gcc weirdness (sigh...)
Modified:
branches/reactos-yarotows/dll/win32/gdi32/include/gdi32p.h
branches/reactos-yarotows/dll/win32/gdi32/objects/bitmap.c
Modified: branches/reactos-yarotows/dll/win32/gdi32/include/gdi32p.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/dll/win32/gdi3…
==============================================================================
--- branches/reactos-yarotows/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] Wed Jun 9
02:18:29 2010
@@ -146,7 +146,7 @@
typedef BOOL (WINAPI *SEEKPRINTER) (HANDLE,LARGE_INTEGER,PLARGE_INTEGER,DWORD,BOOL);
typedef BOOL (WINAPI *SPLREADPRINTER) (HANDLE,LPBYTE *,DWORD);
// Same as ddk/winsplp.h DriverUnloadComplete?
-typedef BOOL (WINAPI *SPLDRIVERUNLOADCOMPLETE) (LPWSTR);
+typedef BOOL (WINAPI *SPLDRIVERUNLOADCOMPLETE) (LPWSTR);
// Driver support:
// DrvDocumentEvent api/winddiui.h not W2k8 DocumentEventAW
typedef INT (WINAPI *DOCUMENTEVENT) (HANDLE,HDC,INT,ULONG,PVOID,ULONG,PVOID);
@@ -173,10 +173,10 @@
VOID
HEAP_free(LPVOID memory);
-VOID
+VOID
FASTCALL
FONT_TextMetricWToA(
- const TEXTMETRICW *ptmW,
+ const TEXTMETRICW *ptmW,
LPTEXTMETRICA ptmA
);
@@ -279,7 +279,7 @@
GdiSetLastError( DWORD dwErrCode );
DWORD WINAPI GdiGetCodePage(HDC);
-UINT FASTCALL DIB_BitmapBitsSize( PBITMAPINFO );
+UINT FASTCALL DIB_BitmapBitsSize( CONST BITMAPINFO* );
int
WINAPI
Modified: branches/reactos-yarotows/dll/win32/gdi32/objects/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/dll/win32/gdi3…
==============================================================================
--- branches/reactos-yarotows/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Wed Jun 9
02:18:29 2010
@@ -34,7 +34,7 @@
UINT
FASTCALL
-DIB_BitmapBitsSize( PBITMAPINFO Info )
+DIB_BitmapBitsSize( CONST BITMAPINFO* Info )
{
UINT Ret;
@@ -476,7 +476,8 @@
// For Icm support.
// GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr))
- cjBmpScanSize = DIB_BitmapBitsSize((LPBITMAPINFO)Header);
+ /* Mmmh, this is not really safe */
+ cjBmpScanSize = DIB_BitmapBitsSize(Data);
DPRINT("pBMI %x, Size bpp %d, dibsize %d, Conv %d, BSS %d\n",
Data,bpp,dibsize,ConvertedInfoSize,cjBmpScanSize);
if ( !width || !height )