Author: greatlrd
Date: Thu Jul 13 23:00:05 2006
New Revision: 23043
URL:
http://svn.reactos.org/svn/reactos?rev=23043&view=rev
Log:
1. Remove guithreadinfo from the make file. for it not longer builds.
2. Adding a test apps for starting directdraw hal interface, that I have keep within few
ros devs, and one wine devs,
it also being using in 2-3 diffent company same code. I known which company that using
it with my written premitions
I give them on icq or email. But u need a document how to use kernel, d3d, mocomp
interface,and some more how to access
them. I only show how to start dx hal the interface and using so call IDrawDraw
interface. in this apps.
Added:
trunk/rosapps/tests/DxHalTest/
trunk/rosapps/tests/DxHalTest/DxHalTest.rbuild (with props)
trunk/rosapps/tests/DxHalTest/main.c (with props)
trunk/rosapps/tests/DxHalTest/main.h (with props)
Modified:
trunk/rosapps/tests/directory.xml
Added: trunk/rosapps/tests/DxHalTest/DxHalTest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/DxHalTest/DxHalTest.…
==============================================================================
--- trunk/rosapps/tests/DxHalTest/DxHalTest.rbuild (added)
+++ trunk/rosapps/tests/DxHalTest/DxHalTest.rbuild Thu Jul 13 23:00:05 2006
@@ -1,0 +1,8 @@
+<module name="dxhaltest" type="win32cui"
installbase="bin" installname="dxhaltest.exe">
+ <define name="_WIN32_IE">0x0501</define>
+ <define name="_WIN32_WINNT">0x0501</define>
+ <define name="__USE_W32API" />
+ <library>kernel32</library>
+ <library>gdi32</library>
+ <file>main.c</file>
+</module>
Propchange: trunk/rosapps/tests/DxHalTest/DxHalTest.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rosapps/tests/DxHalTest/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/DxHalTest/main.c?rev…
==============================================================================
--- trunk/rosapps/tests/DxHalTest/main.c (added)
+++ trunk/rosapps/tests/DxHalTest/main.c Thu Jul 13 23:00:05 2006
@@ -1,0 +1,665 @@
+#include <stdio.h>
+#include "main.h"
+
+
+// TODO:
+//
+// - free memory
+// - Check if we ran out of memory (HeapAlloc == NULL)
+ HDC hdc;
+ DDRAWI_DIRECTDRAW_GBL mDDrawGlobal;
+ DDRAWI_DIRECTDRAW_LCL mDDrawLocal;
+ DDHALINFO mHALInfo;
+
+ DDHAL_CALLBACKS mCallbacks;
+ DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks;
+ D3DHAL_CALLBACKS mD3dCallbacks;
+ D3DHAL_GLOBALDRIVERDATA mD3dDriverData;
+
+ UINT mcModeInfos;
+ DDHALMODEINFO *mpModeInfos;
+
+ UINT mcvmList;
+ VIDMEM *mpvmList;
+
+ UINT mcFourCC;
+ DWORD *mpFourCC;
+
+ UINT mcTextures;
+ DDSURFACEDESC *mpTextures;
+
+ /* Surface */
+ DDRAWI_DDRAWSURFACE_GBL mPrimaryGlobal;
+ DDRAWI_DDRAWSURFACE_MORE mPrimaryMore;
+ DDRAWI_DDRAWSURFACE_LCL mPrimaryLocal;
+ DDRAWI_DDRAWSURFACE_LCL *mpPrimaryLocals[1];
+ DDRAWI_DDRAWCLIPPER_LCL mPrimaryClipperLocal;
+ DDRAWI_DDRAWCLIPPER_GBL mPrimaryClipperGlobal;
+ //DDRAWI_DDRAWCLIPPER_INT mPrimaryClipperInterface;
+ DDSURFACEDESC mddsdPrimary;
+ DDSURFACEDESC mddsdOverlay;
+
+ DDRAWI_DDRAWSURFACE_GBL mOverlayGlobal;
+ DDRAWI_DDRAWSURFACE_LCL mOverlayLocal[6];
+ DDRAWI_DDRAWSURFACE_LCL *mpOverlayLocals[6];
+ DDRAWI_DDRAWSURFACE_MORE mOverlayMore[6];
+
+ DDHAL_BLTDATA mDdBlt;
+
+
+typedef struct _DD_GETDRIVERINFODATA {
+ VOID *dhpdev;
+ DWORD dwSize;
+ DWORD dwFlags;
+ GUID guidInfo;
+ DWORD dwExpectedSize;
+ PVOID lpvData;
+ DWORD dwActualSize;
+ HRESULT ddRVal;
+ ULONG_PTR dwContext;
+} DD_GETDRIVERINFODATA, *PDD_GETDRIVERINFODATA;
+
+
+typedef struct _DD_MISCELLANEOUSCALLBACKS {
+ DWORD dwSize;
+ DWORD dwFlags;
+ PVOID GetAvailDriverMemory;
+} DD_MISCELLANEOUSCALLBACKS;
+
+
+int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
+ LPSTR lpCmdLine, int nCmdShow)
+{
+ /* get the functions we need */
+// DD_GETDRIVERINFODATA drv;
+ HMODULE lib = LoadLibrary("gdi32.dll");
+ DdCreateDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL,
HDC))GetProcAddress(lib, "GdiEntry1");
+ DdQueryDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL,
LPDDHALINFO,LPDDHAL_DDCALLBACKS,LPDDHAL_DDSURFACECALLBACKS,LPDDHAL_DDPALETTECALLBACKS,LPD3DHAL_CALLBACKS,LPD3DHAL_GLOBALDRIVERDATA,LPDDHAL_DDEXEBUFCALLBACKS,LPDDSURFACEDESC,LPDWORD,LPVIDMEM))GetProcAddress(lib,
"GdiEntry2");
+ DdAttachSurface = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL,
LPDDRAWI_DDRAWSURFACE_LCL))GetProcAddress(lib, "GdiEntry11");
+ DdResetVisrgn = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL,
HWND))GetProcAddress(lib, "GdiEntry6");
+
+ /* HAL Startup process */
+ DEVMODE devmode;
+ HBITMAP hbmp;
+ const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10;
+ UCHAR *pbmiData;
+ BITMAPINFO *pbmi;
+
+ DWORD *pMasks;
+ //BOOL newmode = FALSE;
+ //DWORD Status; /* for create surface */
+ UINT i;
+ UINT j;
+
+
+ printf("This apps showing how to start up directx draw/d3d interface and some other
as well\n");
+ printf("This code have been releae to some close applactons with my premtions, if
any company\n");
+ printf("want use part or whole code, you need contact the orginal author to ask
for premtions\n");
+ printf("This code are release under alot of diffent licen\n");
+ printf("All GPL and LGPL project have right use and studing this
code.\n");
+ printf("This code maybe need more comment to known how stuff working and maybe
looking bit mesy\n");
+ printf("Bestreagds Magnus Olsen magnus(a)greatlord.com or
greatlord(a)reactos.org\n")uot;);
+ printf("Copyright 2006 by Magnus Olsen\n\n");
+ printf("This demo showing how to start dx draw hal and create a primary
surface,\n");
+ printf("and a overlay sufrace and blt to the primary surface\n");
+
+
+ /*
+ Get and Create mode info
+ */
+ mcModeInfos = 1;
+ mpModeInfos = (DDHALMODEINFO*)HeapAlloc(GetProcessHeap(),
+ HEAP_ZERO_MEMORY,
+ mcModeInfos * sizeof(DDHALMODEINFO));
+
+ if (mpModeInfos == NULL)
+ {
+ printf("Fail to alloc mpModeInfos\n");
+ return DD_FALSE;
+ }
+
+
+ EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode);
+
+ mpModeInfos[0].dwWidth = devmode.dmPelsWidth;
+ mpModeInfos[0].dwHeight = devmode.dmPelsHeight;
+ mpModeInfos[0].dwBPP = devmode.dmBitsPerPel;
+ mpModeInfos[0].lPitch = (devmode.dmPelsWidth*devmode.dmBitsPerPel)/8;
+ mpModeInfos[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency;
+
+ /*
+ Setup HDC and mDDrawGlobal right
+ */
+ hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL);
+
+ if (hdc == NULL)
+ {
+ printf("Fail to create HDC\n");
+ return DD_FALSE;
+ }
+
+ /*
+ Dectect RGB bit mask
+ */
+ hbmp = CreateCompatibleBitmap(hdc, 1, 1);
+ if (hbmp==NULL)
+ {
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ printf("Fail to Create Compatible Bitmap\n");
+ return DD_FALSE;
+ }
+
+ pbmiData = (UCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bmiSize);
+ pbmi = (BITMAPINFO*)pbmiData;
+
+ if (pbmiData==NULL)
+ {
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ free(mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ printf("Fail to Alloc pbmiData\n");
+ return DDERR_UNSUPPORTED;
+ }
+
+ pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ pbmi->bmiHeader.biBitCount = (WORD)devmode.dmBitsPerPel;
+ pbmi->bmiHeader.biCompression = BI_BITFIELDS;
+ pbmi->bmiHeader.biWidth = 1;
+ pbmi->bmiHeader.biHeight = 1;
+
+ GetDIBits(hdc, hbmp, 0, 0, NULL, pbmi, 0);
+ DeleteObject(hbmp);
+
+ pMasks = (DWORD*)(pbmiData + sizeof(BITMAPINFOHEADER));
+ mpModeInfos[0].dwRBitMask = pMasks[0];
+ mpModeInfos[0].dwGBitMask = pMasks[1];
+ mpModeInfos[0].dwBBitMask = pMasks[2];
+ mpModeInfos[0].dwAlphaBitMask = pMasks[3];
+
+ HeapFree(GetProcessHeap(), 0, pbmiData);
+
+ /*
+ prepare start up the DX Draw HAL interface now
+ */
+
+ memset(&mDDrawGlobal, 0, sizeof(DDRAWI_DIRECTDRAW_GBL));
+ memset(&mHALInfo, 0, sizeof(DDHALINFO));
+ memset(&mCallbacks, 0, sizeof(DDHAL_CALLBACKS));
+
+ /*
+ Startup DX HAL step one of three
+ */
+ if (!DdCreateDirectDrawObject(&mDDrawGlobal, hdc))
+ {
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ printf("Fail to Create Direct DrawObject\n");
+ return DD_FALSE;
+ }
+
+ mDDrawGlobal.dwRefCnt = 1; //addref / remove ref
+
+ // Do not relase HDC it have been map in kernel mode
+ // DeleteDC(hdc);
+
+ /* we need reanable it if screen res have changes, and some bad drv need be reanble
very few
+ to contiune */
+ /*
+ if (!DdReenableDirectDrawObject(&mDDrawGlobal, &newmode))
+ {
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ return DD_FALSE;
+ }*/
+
+ /*
+ Setup the DirectDraw Local
+ */
+
+ mDDrawLocal.lpDDCB = &mCallbacks;
+ mDDrawLocal.lpGbl = &mDDrawGlobal;
+ mDDrawLocal.dwProcessId = GetCurrentProcessId();
+
+ mDDrawGlobal.lpDDCBtmp = &mCallbacks;
+ mDDrawGlobal.lpExclusiveOwner = &mDDrawLocal;
+ //mDDrawLocal.dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
+
+
+ /*
+ Startup DX HAL step two of three
+ */
+
+ if (!DdQueryDirectDrawObject(&mDDrawGlobal,
+ &mHALInfo,
+ &mCallbacks.HALDD,
+ &mCallbacks.HALDDSurface,
+ &mCallbacks.HALDDPalette,
+ &mD3dCallbacks,
+ &mD3dDriverData,
+ &mD3dBufferCallbacks,
+ NULL,
+ NULL,
+ NULL))
+ {
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ // FIXME Close DX fristcall and second call
+ return DD_FALSE;
+ }
+
+ mcvmList = mHALInfo.vmiData.dwNumHeaps;
+ mpvmList = (VIDMEM*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(VIDMEM) *
mcvmList);
+ if (mpvmList == NULL)
+ {
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ // FIXME Close DX fristcall and second call
+ printf("Fail to QueryDirect Draw Object frist pass\n");
+ return DD_FALSE;
+ }
+
+ mcFourCC = mHALInfo.ddCaps.dwNumFourCCCodes;
+ mpFourCC = (DWORD *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) *
mcFourCC);
+ if (mpFourCC == NULL)
+ {
+ HeapFree(GetProcessHeap(), 0, mpvmList);
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ // FIXME Close DX fristcall and second call
+ return DD_FALSE;
+ }
+
+ mcTextures = mD3dDriverData.dwNumTextureFormats;
+ mpTextures = (DDSURFACEDESC*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(DDSURFACEDESC) * mcTextures);
+ if (mpTextures == NULL)
+ {
+ HeapFree(GetProcessHeap(), 0, mpFourCC);
+ HeapFree(GetProcessHeap(), 0, mpvmList);
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ // FIXME Close DX fristcall and second call
+ printf("Fail QueryDirect Draw Object to Alloc mpTextures \n");
+ return DD_FALSE;
+ }
+
+ mHALInfo.vmiData.pvmList = mpvmList;
+ mHALInfo.lpdwFourCC = mpFourCC;
+ mD3dDriverData.lpTextureFormats = mpTextures;
+
+ if (!DdQueryDirectDrawObject(
+ &mDDrawGlobal,
+ &mHALInfo,
+ &mCallbacks.HALDD,
+ &mCallbacks.HALDDSurface,
+ &mCallbacks.HALDDPalette,
+ &mD3dCallbacks,
+ &mD3dDriverData,
+ &mCallbacks.HALDDExeBuf,
+ mpTextures,
+ mpFourCC,
+ mpvmList))
+
+ {
+ HeapFree(GetProcessHeap(), 0, mpTextures);
+ HeapFree(GetProcessHeap(), 0, mpFourCC);
+ HeapFree(GetProcessHeap(), 0, mpvmList);
+ HeapFree(GetProcessHeap(), 0, mpModeInfos);
+ DeleteDC(hdc);
+ DeleteObject(hbmp);
+ printf("Fail to QueryDirect Draw Object second pass\n");
+ return DD_FALSE;
+ }
+
+ /*
+ Copy over from HalInfo to DirectDrawGlobal
+ */
+
+ // this is wrong, cDriverName need be in ASC code not UNICODE
+ //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME);
+
+ memcpy(&mDDrawGlobal.vmiData, &mHALInfo.vmiData,sizeof(VIDMEMINFO));
+ memcpy(&mDDrawGlobal.ddCaps, &mHALInfo.ddCaps,sizeof(DDCORECAPS));
+
+ mHALInfo.dwNumModes = mcModeInfos;
+ mHALInfo.lpModeInfo = mpModeInfos;
+ mHALInfo.dwMonitorFrequency = mpModeInfos[0].wRefreshRate;
+
+ mDDrawGlobal.dwMonitorFrequency = mHALInfo.dwMonitorFrequency;
+ mDDrawGlobal.dwModeIndex = mHALInfo.dwModeIndex;
+ mDDrawGlobal.dwNumModes = mHALInfo.dwNumModes;
+ mDDrawGlobal.lpModeInfo = mHALInfo.lpModeInfo;
+ mDDrawGlobal.hInstance = mHALInfo.hInstance;
+
+ mDDrawGlobal.lp16DD = &mDDrawGlobal;
+
+
+
+ /* Hal insate is down now */
+
+ /* cleare surface code now*/
+
+ // memset(&mGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
+ // memset(&mMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
+
+ /* mLocal.lpSurfMore = &mMore;
+ memset(mMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
+ mMore.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);*/
+
+ mPrimaryLocal.lpSurfMore = &mPrimaryMore;
+
+ /* cleare surface ends now */
+
+ /* create primare surface now */
+
+ memset(&mddsdPrimary, 0, sizeof(DDSURFACEDESC));
+ mddsdPrimary.dwSize = sizeof(DDSURFACEDESC);
+ mddsdPrimary.dwFlags = DDSD_CAPS;
+ mddsdPrimary.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY |
DDSCAPS_VISIBLE;
+
+ DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
+ mDdCanCreateSurface.lpDD = &mDDrawGlobal;
+ mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
+ mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat;
+ mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdPrimary; // pDDSD;
+
+ if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)==
DDHAL_DRIVER_NOTHANDLED)
+ {
+ printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED\n");
+ return DDERR_NOTINITIALIZED;
+ }
+
+ if (mDdCanCreateSurface.ddRVal != DD_OK)
+ {
+ printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal =
%d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal));
+ return DDERR_NOTINITIALIZED;
+ }
+
+ memset(&mPrimaryGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
+ mPrimaryGlobal.dwGlobalFlags = DDRAWISURFGBL_ISGDISURFACE;
+ mPrimaryGlobal.lpDD = &mDDrawGlobal;
+ mPrimaryGlobal.lpDDHandle = &mDDrawGlobal;
+ mPrimaryGlobal.wWidth = (WORD)mpModeInfos[0].dwWidth;
+ mPrimaryGlobal.wHeight = (WORD)mpModeInfos[0].dwHeight;
+ mPrimaryGlobal.lPitch = mpModeInfos[0].lPitch;
+
+ memset(&mPrimaryMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
+ mPrimaryMore.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);
+
+
+ //mPrimaryMore. = mpr
+
+ memset(&mPrimaryLocal, 0, sizeof(DDRAWI_DDRAWSURFACE_LCL));
+ mPrimaryLocal.lpGbl = &mPrimaryGlobal;
+ mPrimaryLocal.lpSurfMore = &mPrimaryMore;
+ mPrimaryLocal.dwProcessId = GetCurrentProcessId();
+ mPrimaryLocal.dwFlags = DDRAWISURF_PARTOFPRIMARYCHAIN|DDRAWISURF_HASOVERLAYDATA;
+ mPrimaryLocal.ddsCaps.dwCaps = mddsdPrimary.ddsCaps.dwCaps;
+
+ mpPrimaryLocals[0] = &mPrimaryLocal;
+
+ DDHAL_CREATESURFACEDATA mDdCreateSurface;
+ mDdCreateSurface.lpDD = &mDDrawGlobal;
+ mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
+ mDdCreateSurface.lpDDSurfaceDesc = &mddsdPrimary;//pDDSD;
+ mDdCreateSurface.lplpSList = mpPrimaryLocals; //cSurfaces;
+ mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces;
+
+ if (mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) ==
DDHAL_DRIVER_NOTHANDLED)
+ {
+ printf("Fail to mDdCreateSurface DDHAL_DRIVER_NOTHANDLED \n");
+ return DDERR_NOTINITIALIZED;
+ }
+
+
+ if (mDdCreateSurface.ddRVal != DD_OK)
+ {
+ printf("Fail to mDdCanCreateSurface mDdCreateSurface.ddRVal =
%d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal));
+ return mDdCreateSurface.ddRVal;
+ }
+
+ // -- Setup Clipper ---------------------------------------------------------
+ memset(&mPrimaryClipperGlobal, 0, sizeof(DDRAWI_DDRAWCLIPPER_GBL));
+ mPrimaryClipperGlobal.dwFlags = DDRAWICLIP_ISINITIALIZED;
+ mPrimaryClipperGlobal.dwProcessId = GetCurrentProcessId();
+ //mPrimaryClipperGlobal.hWnd = (ULONG_PTR)hwnd;
+ mPrimaryClipperGlobal.hWnd = (ULONG_PTR)GetDesktopWindow();
+ mPrimaryClipperGlobal.lpDD = &mDDrawGlobal;
+ mPrimaryClipperGlobal.lpStaticClipList = NULL;
+
+ memset(&mPrimaryClipperLocal, 0, sizeof(DDRAWI_DDRAWCLIPPER_LCL));
+ mPrimaryClipperLocal.lpGbl = &mPrimaryClipperGlobal;
+
+ //memset(&mPrimaryClipperInterface, 0, sizeof(DDRAWI_DDRAWCLIPPER_INT));
+ //mPrimaryClipperInterface.lpLcl = &mPrimaryClipperLocal;
+ //mPrimaryClipperInterface.dwIntRefCnt = 1;
+ //mPrimaryClipperInterface.lpLink = null;
+ //mPrimaryClipperInterface.lpVtbl = null;
+
+ mPrimaryLocal.lpDDClipper = &mPrimaryClipperLocal;
+ //mPrimaryMore.lpDDIClipper = &mPrimaryClipperInterface;
+
+ mDdBlt.lpDDDestSurface = mpPrimaryLocals[0];
+
+
+ /* create primare surface is down now */
+
+ /* create overlay surface now */
+
+ memset(&mddsdOverlay, 0, sizeof(DDSURFACEDESC));
+ mddsdOverlay.dwSize = sizeof(DDSURFACEDESC);
+ mddsdOverlay.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_BACKBUFFERCOUNT | DDSD_WIDTH
| DDSD_HEIGHT;
+
+ mddsdOverlay.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY |
DDSCAPS_LOCALVIDMEM | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
+
+ mddsdOverlay.dwWidth = 100; //pels;
+ mddsdOverlay.dwHeight = 100; // lines;
+ mddsdOverlay.dwBackBufferCount = 1; //cBuffers;
+
+ mddsdOverlay.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
+ mddsdOverlay.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ mddsdOverlay.ddpfPixelFormat.dwRGBBitCount = 32;
+
+
+ //DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
+ mDdCanCreateSurface.lpDD = &mDDrawGlobal;
+ mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
+ mDdCanCreateSurface.bIsDifferentPixelFormat = TRUE; //isDifferentPixelFormat;
+ mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdOverlay; // pDDSD;
+
+
+ if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)==
DDHAL_DRIVER_NOTHANDLED)
+ {
+ // derr(L"DirectDrawImpl[%08x]::__createPrimary Cannot create primary
[%08x]", this, rv);
+
+ printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED \n");
+ return DDERR_NOTINITIALIZED;
+ }
+
+ if (mDdCanCreateSurface.ddRVal != DD_OK)
+ {
+ printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal =
%d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal));
+ return DDERR_NOTINITIALIZED;
+ }
+
+
+ memset(&mOverlayGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
+ mOverlayGlobal.dwGlobalFlags = 0;
+ mOverlayGlobal.lpDD = &mDDrawGlobal;
+ mOverlayGlobal.lpDDHandle = &mDDrawGlobal;
+ mOverlayGlobal.wWidth = (WORD)mddsdOverlay.dwWidth;
+ mOverlayGlobal.wHeight = (WORD)mddsdOverlay.dwHeight;
+ mOverlayGlobal.lPitch = -1;
+ mOverlayGlobal.ddpfSurface = mddsdOverlay.ddpfPixelFormat;
+
+ // setup front- and backbuffer surfaces
+ UINT cSurfaces = mddsdOverlay.dwBackBufferCount + 1;
+ for ( i = 0; i < cSurfaces; i++)
+ {
+ memset(&mOverlayMore[i], 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
+ mOverlayMore[i].dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);
+
+ memset(&mOverlayLocal[i], 0, sizeof(DDRAWI_DDRAWSURFACE_LCL));
+ mOverlayLocal[i].lpGbl = &mOverlayGlobal;
+ mOverlayLocal[i].lpSurfMore = &mOverlayMore[i];
+ mOverlayLocal[i].dwProcessId = GetCurrentProcessId();
+ mOverlayLocal[i].dwFlags = (i == 0) ?
+ (DDRAWISURF_IMPLICITROOT|DDRAWISURF_FRONTBUFFER):
+ (DDRAWISURF_IMPLICITCREATE|DDRAWISURF_BACKBUFFER);
+
+ mOverlayLocal[i].dwFlags |=
+ DDRAWISURF_ATTACHED|DDRAWISURF_ATTACHED_FROM|
+ DDRAWISURF_HASPIXELFORMAT|
+ DDRAWISURF_HASOVERLAYDATA;
+
+ mOverlayLocal[i].ddsCaps.dwCaps = mddsdOverlay.ddsCaps.dwCaps;
+ mpOverlayLocals[i] = &mOverlayLocal[i];
+ }
+
+ for ( i = 0; i < cSurfaces; i++)
+ {
+ j = (i + 1) % cSurfaces;
+
+
+ /*if (!mHALInfo.lpDDSurfaceCallbacks->AddAttachedSurface(mpOverlayLocals[i],
mpOverlayLocals[j]))
+ {
+ // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d)
failed", this, i, j);
+ return DD_FALSE;
+ }*/
+
+ if (!DdAttachSurface(mpOverlayLocals[i], mpOverlayLocals[j]))
+ {
+ // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d)
failed", this, i, j);
+ printf("Fail to DdAttachSurface (%d:%d)\n", i, j);
+ return DD_FALSE;
+ }
+
+ }
+
+
+ // DDHAL_CREATESURFACEDATA mDdCreateSurface;
+ mDdCreateSurface.lpDD = &mDDrawGlobal;
+ mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
+ mDdCreateSurface.lpDDSurfaceDesc = &mddsdOverlay;//pDDSD;
+ mDdCreateSurface.lplpSList = mpOverlayLocals; //cSurfaces;
+ mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces;
+
+ if (mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) ==
DDHAL_DRIVER_NOTHANDLED)
+ {
+ printf("Fail to mDdCreateSurface = DDHAL_DRIVER_HANDLED\n");
+ return DDERR_NOTINITIALIZED;
+ }
+
+
+ if (mDdCreateSurface.ddRVal != DD_OK)
+ {
+ printf("Fail to mDdCreateSurface mDdCreateSurface.ddRVal =
%d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal));
+ return mDdCreateSurface.ddRVal;
+ }
+
+
+ DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay;
+ mDdUpdateOverlay.lpDD = &mDDrawGlobal;
+ mDdUpdateOverlay.UpdateOverlay = mCallbacks.HALDDSurface.UpdateOverlay;
+ mDdUpdateOverlay.lpDDDestSurface = mpPrimaryLocals[0];
+ mDdUpdateOverlay.lpDDSrcSurface = mpOverlayLocals[0];//pDDSurface;
+ mDdUpdateOverlay.dwFlags = DDOVER_SHOW;
+
+ /* if (flags & DDOVER_DDFX)
+ mDdUpdateOverlay.overlayFX = *pFx;
+ copyRect(&mDdUpdateOverlay.rDest, pdst);
+ copyRect(&mDdUpdateOverlay.rSrc, psrc);
+*/
+
+ mDdUpdateOverlay.rDest.top = 0;
+ mDdUpdateOverlay.rDest.left = 0;
+ mDdUpdateOverlay.rDest.right = 50;
+ mDdUpdateOverlay.rDest.bottom = 50;
+
+ mDdUpdateOverlay.rSrc.top = 0;
+ mDdUpdateOverlay.rSrc.left = 0;
+ mDdUpdateOverlay.rSrc.right = 50;
+ mDdUpdateOverlay.rSrc.bottom = 50;
+
+
+
+
+ if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED)
+ {
+ printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n");
+ return DDERR_NOTINITIALIZED;
+ }
+
+
+ if (mDdUpdateOverlay.ddRVal != DD_OK)
+ {
+ printf("Fail to mDdUpdateOverlay mDdUpdateOverlay.ddRVal =
%d:%s\n",(int)mDdUpdateOverlay.ddRVal,DDErrorString(mDdUpdateOverlay.ddRVal));
+ return mDdUpdateOverlay.ddRVal;
+ }
+
+ /* blt */
+
+
+ DDRAWI_DDRAWSURFACE_LCL *pDDSurface = mpPrimaryLocals[0];
+
+ if (!DdResetVisrgn(pDDSurface, NULL))
+ {
+ // derr(L"DirectDrawImpl[%08x]::_clear DdResetVisrgn failed", this);
+ }
+
+
+ memset(&mDdBlt, 0, sizeof(DDHAL_BLTDATA));
+ memset(&mDdBlt.bltFX, 0, sizeof(DDBLTFX));
+ mDdBlt.bltFX.dwSize = sizeof(DDBLTFX);
+
+ mDdBlt.lpDD = &mDDrawGlobal;
+ mDdBlt.Blt = mCallbacks.HALDDSurface.Blt;
+ mDdBlt.lpDDDestSurface = mpPrimaryLocals[0];
+
+ mpPrimaryLocals[0]->hDC = (ULONG_PTR)GetDC(GetDesktopWindow());
+ mDdBlt.rDest.top = 50;
+ mDdBlt.rDest.bottom = 100;
+ mDdBlt.rDest.left = 0;
+ mDdBlt.rDest.right = 100;
+ mDdBlt.lpDDSrcSurface = NULL;
+ mDdBlt.IsClipped = FALSE;
+ mDdBlt.bltFX.dwFillColor = 0xFFFF00;
+ mDdBlt.dwFlags = DDBLT_COLORFILL | DDBLT_WAIT;
+ // mDdBlt.IsClipped = TRUE;
+
+ if (mDdBlt.Blt(&mDdBlt) != DDHAL_DRIVER_HANDLED)
+ {
+ printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n");
+ return DDHAL_DRIVER_HANDLED;
+ }
+
+
+
+ if (mDdBlt.ddRVal!=DD_OK)
+ {
+ printf("Fail to mDdBlt mDdBlt.ddRVal =
%d:%s\n",(int)mDdBlt.ddRVal,DDErrorString(mDdBlt.ddRVal));
+ return mDdBlt.ddRVal;
+ }
+
+ mDdUpdateOverlay.rDest.right = 100;
+ if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) ==
DDHAL_DRIVER_NOTHANDLED)
+ {
+ printf("Fail to mDdUpdateOverlay = DDERR_NOTINITIALIZED\n");
+ return DDERR_NOTINITIALIZED;
+ }
+
+ while(TRUE);
+
+ return DD_OK;
+
+
+}
+
+
Propchange: trunk/rosapps/tests/DxHalTest/main.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rosapps/tests/DxHalTest/main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/DxHalTest/main.h?rev…
==============================================================================
--- trunk/rosapps/tests/DxHalTest/main.h (added)
+++ trunk/rosapps/tests/DxHalTest/main.h Thu Jul 13 23:00:05 2006
@@ -1,0 +1,267 @@
+#include <windows.h>
+#include <ddrawi.h>
+#include <d3dhal.h>
+
+
+int StartupHAL ();
+extern HDC hdc;
+extern DDRAWI_DIRECTDRAW_GBL mDDrawGlobal;
+ extern DDRAWI_DIRECTDRAW_LCL mDDrawLocal;
+ extern DDHALINFO mHALInfo;
+
+ extern DDHAL_CALLBACKS mCallbacks;
+ extern DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks;
+ extern D3DHAL_CALLBACKS mD3dCallbacks;
+ extern D3DHAL_GLOBALDRIVERDATA mD3dDriverData;
+
+ extern UINT mcModeInfos;
+ extern DDHALMODEINFO *mpModeInfos;
+
+ extern UINT mcvmList;
+ extern VIDMEM *mpvmList;
+
+ extern UINT mcFourCC;
+ extern DWORD *mpFourCC;
+
+ extern UINT mcTextures;
+ extern DDSURFACEDESC *mpTextures;
+
+
+
+BOOL (APIENTRY *DdCreateDirectDrawObject) (
+ LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+ HDC hdc
+);
+
+BOOL (APIENTRY *DdQueryDirectDrawObject) (
+ LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+ LPDDHALINFO pHalInfo,
+ LPDDHAL_DDCALLBACKS pDDCallbacks,
+ LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks,
+ LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks,
+ LPD3DHAL_CALLBACKS pD3dCallbacks,
+ LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData,
+ LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks,
+ LPDDSURFACEDESC pD3dTextureFormats,
+ LPDWORD pdwFourCC,
+ LPVIDMEM pvmList
+);
+
+BOOL
+APIENTRY
+DdDeleteDirectDrawObject(
+ LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal
+);
+
+BOOL
+APIENTRY
+DdCreateSurfaceObject(
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+ BOOL bPrimarySurface
+);
+
+BOOL
+APIENTRY
+DdDeleteSurfaceObject(
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
+);
+
+//BOOL
+//APIENTRY
+//DdResetVisrgn(
+// LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+// HWND hWnd
+//);
+BOOL (APIENTRY *DdResetVisrgn) (
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+ HWND hWnd
+);
+
+HDC
+APIENTRY
+DdGetDC(
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+ LPPALETTEENTRY pColorTable
+);
+
+BOOL
+APIENTRY
+DdReleaseDC(
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
+);
+
+HBITMAP
+APIENTRY
+DdCreateDIBSection(
+ HDC hdc,
+ CONST BITMAPINFO *pbmi,
+ UINT iUsage,
+ VOID **ppvBits,
+ HANDLE hSectionApp,
+ DWORD dwOffset
+);
+
+BOOL
+APIENTRY
+DdReenableDirectDrawObject(
+ LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+ BOOL *pbNewMode
+);
+
+//BOOL
+//APIENTRY
+//DdAttachSurface(
+// LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
+// LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
+//);
+
+BOOL (APIENTRY *DdAttachSurface) (
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
+);
+
+VOID
+APIENTRY
+DdUnattachSurface(
+ LPDDRAWI_DDRAWSURFACE_LCL pSurface,
+ LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached
+);
+
+ULONG
+APIENTRY
+DdQueryDisplaySettingsUniqueness(VOID);
+
+HANDLE
+APIENTRY
+DdGetDxHandle(
+ LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+ LPDDRAWI_DDRAWSURFACE_LCL pSurface,
+ BOOL bRelease
+);
+
+BOOL
+APIENTRY
+DdSetGammaRamp(
+ LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+ HDC hdc,
+ LPVOID lpGammaRamp
+);
+
+DWORD
+APIENTRY
+DdSwapTextureHandles(
+ LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+ LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1,
+ LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
+);
+
+char* DDErrorString (HRESULT hr)
+{
+ switch (hr)
+ {
+ case DD_OK: return "DD_OK";
+ case DDERR_ALREADYINITIALIZED: return "DDERR_ALREADYINITIALIZED";
+ case DDERR_CANNOTATTACHSURFACE: return "DDERR_CANNOTATTACHSURFACE";
+ case DDERR_CANNOTDETACHSURFACE: return "DDERR_CANNOTDETACHSURFACE";
+ case DDERR_CURRENTLYNOTAVAIL: return "DDERR_CURRENTLYNOTAVAIL";
+ case DDERR_EXCEPTION: return "DDERR_EXCEPTION";
+ case DDERR_GENERIC: return "DDERR_GENERIC";
+ case DDERR_HEIGHTALIGN: return "DDERR_HEIGHTALIGN";
+ case DDERR_INCOMPATIBLEPRIMARY: return "DDERR_INCOMPATIBLEPRIMARY";
+ case DDERR_INVALIDCAPS: return "DDERR_INVALIDCAPS";
+ case DDERR_INVALIDCLIPLIST: return "DDERR_INVALIDCLIPLIST";
+ case DDERR_INVALIDMODE: return "DDERR_INVALIDMODE";
+ case DDERR_INVALIDOBJECT: return "DDERR_INVALIDOBJECT";
+ case DDERR_INVALIDPARAMS: return "DDERR_INVALIDPARAMS";
+ case DDERR_INVALIDPIXELFORMAT: return "DDERR_INVALIDPIXELFORMAT";
+ case DDERR_INVALIDRECT: return "DDERR_INVALIDRECT";
+ case DDERR_LOCKEDSURFACES: return "DDERR_LOCKEDSURFACES";
+ case DDERR_NO3D: return "DDERR_NO3D";
+ case DDERR_NOALPHAHW: return "DDERR_NOALPHAHW";
+ case DDERR_NOCLIPLIST: return "DDERR_NOCLIPLIST";
+ case DDERR_NOCOLORCONVHW: return "DDERR_NOCOLORCONVHW";
+ case DDERR_NOCOOPERATIVELEVELSET: return
"DDERR_NOCOOPERATIVELEVELSET";
+ case DDERR_NOCOLORKEY: return "DDERR_NOCOLORKEY";
+ case DDERR_NOCOLORKEYHW: return "DDERR_NOCOLORKEYHW";
+ case DDERR_NODIRECTDRAWSUPPORT: return "DDERR_NODIRECTDRAWSUPPORT";
+ case DDERR_NOEXCLUSIVEMODE: return "DDERR_NOEXCLUSIVEMODE";
+ case DDERR_NOFLIPHW: return "DDERR_NOFLIPHW";
+ case DDERR_NOGDI: return "DDERR_NOGDI";
+ case DDERR_NOMIRRORHW: return "DDERR_NOMIRRORHW";
+ case DDERR_NOTFOUND: return "DDERR_NOTFOUND";
+ case DDERR_NOOVERLAYHW: return "DDERR_NOOVERLAYHW";
+ case DDERR_NORASTEROPHW: return "DDERR_NORASTEROPHW";
+ case DDERR_NOROTATIONHW: return "DDERR_NOROTATIONHW";
+ case DDERR_NOSTRETCHHW: return "DDERR_NOSTRETCHHW";
+ case DDERR_NOT4BITCOLOR: return "DDERR_NOT4BITCOLOR";
+ case DDERR_NOT4BITCOLORINDEX: return "DDERR_NOT4BITCOLORINDEX";
+ case DDERR_NOT8BITCOLOR: return "DDERR_NOT8BITCOLOR";
+ case DDERR_NOTEXTUREHW: return "DDERR_NOTEXTUREHW";
+ case DDERR_NOVSYNCHW: return "DDERR_NOVSYNCHW";
+ case DDERR_NOZBUFFERHW: return "DDERR_NOZBUFFERHW";
+ case DDERR_NOZOVERLAYHW: return "DDERR_NOZOVERLAYHW";
+ case DDERR_OUTOFCAPS: return "DDERR_OUTOFCAPS";
+ case DDERR_OUTOFMEMORY: return "DDERR_OUTOFMEMORY";
+ case DDERR_OUTOFVIDEOMEMORY: return "DDERR_OUTOFVIDEOMEMORY";
+ case DDERR_OVERLAYCANTCLIP: return "DDERR_OVERLAYCANTCLIP";
+ case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: return
"DDERR_OVERLAYCOLORKEYONLYONEACTIVE";
+ case DDERR_PALETTEBUSY: return "DDERR_PALETTEBUSY";
+ case DDERR_COLORKEYNOTSET: return "DDERR_COLORKEYNOTSET";
+ case DDERR_SURFACEALREADYATTACHED: return
"DDERR_SURFACEALREADYATTACHED";
+ case DDERR_SURFACEALREADYDEPENDENT: return
"DDERR_SURFACEALREADYDEPENDENT";
+ case DDERR_SURFACEBUSY: return "DDERR_SURFACEBUSY";
+ case DDERR_CANTLOCKSURFACE: return "DDERR_CANTLOCKSURFACE";
+ case DDERR_SURFACEISOBSCURED: return "DDERR_SURFACEISOBSCURED";
+ case DDERR_SURFACELOST: return "DDERR_SURFACELOST";
+ case DDERR_SURFACENOTATTACHED: return "DDERR_SURFACENOTATTACHED";
+ case DDERR_TOOBIGHEIGHT: return "DDERR_TOOBIGHEIGHT";
+ case DDERR_TOOBIGSIZE: return "DDERR_TOOBIGSIZE";
+ case DDERR_TOOBIGWIDTH: return "DDERR_TOOBIGWIDTH";
+ case DDERR_UNSUPPORTED: return "DDERR_UNSUPPORTED";
+ case DDERR_UNSUPPORTEDFORMAT: return "DDERR_UNSUPPORTEDFORMAT";
+ case DDERR_UNSUPPORTEDMASK: return "DDERR_UNSUPPORTEDMASK";
+ case DDERR_VERTICALBLANKINPROGRESS: return
"DDERR_VERTICALBLANKINPROGRESS";
+ case DDERR_WASSTILLDRAWING: return "DDERR_WASSTILLDRAWING";
+ case DDERR_XALIGN: return "DDERR_XALIGN";
+ case DDERR_INVALIDDIRECTDRAWGUID: return
"DDERR_INVALIDDIRECTDRAWGUID";
+ case DDERR_DIRECTDRAWALREADYCREATED: return
"DDERR_DIRECTDRAWALREADYCREATED";
+ case DDERR_NODIRECTDRAWHW: return "DDERR_NODIRECTDRAWHW";
+ case DDERR_PRIMARYSURFACEALREADYEXISTS: return
"DDERR_PRIMARYSURFACEALREADYEXISTS";
+ case DDERR_NOEMULATION: return "DDERR_NOEMULATION";
+ case DDERR_REGIONTOOSMALL: return "DDERR_REGIONTOOSMALL";
+ case DDERR_CLIPPERISUSINGHWND: return "DDERR_CLIPPERISUSINGHWND";
+ case DDERR_NOCLIPPERATTACHED: return "DDERR_NOCLIPPERATTACHED";
+ case DDERR_NOHWND: return "DDERR_NOHWND";
+ case DDERR_HWNDSUBCLASSED: return "DDERR_HWNDSUBCLASSED";
+ case DDERR_HWNDALREADYSET: return "DDERR_HWNDALREADYSET";
+ case DDERR_NOPALETTEATTACHED: return "DDERR_NOPALETTEATTACHED";
+ case DDERR_NOPALETTEHW: return "DDERR_NOPALETTEHW";
+ case DDERR_BLTFASTCANTCLIP: return "DDERR_BLTFASTCANTCLIP";
+ case DDERR_NOBLTHW: return "DDERR_NOBLTHW";
+ case DDERR_NODDROPSHW: return "DDERR_NODDROPSHW";
+ case DDERR_OVERLAYNOTVISIBLE: return "DDERR_OVERLAYNOTVISIBLE";
+ case DDERR_NOOVERLAYDEST: return "DDERR_NOOVERLAYDEST";
+ case DDERR_INVALIDPOSITION: return "DDERR_INVALIDPOSITION";
+ case DDERR_NOTAOVERLAYSURFACE: return "DDERR_NOTAOVERLAYSURFACE";
+ case DDERR_EXCLUSIVEMODEALREADYSET: return
"DDERR_EXCLUSIVEMODEALREADYSET";
+ case DDERR_NOTFLIPPABLE: return "DDERR_NOTFLIPPABLE";
+ case DDERR_CANTDUPLICATE: return "DDERR_CANTDUPLICATE";
+ case DDERR_NOTLOCKED: return "DDERR_NOTLOCKED";
+ case DDERR_CANTCREATEDC: return "DDERR_CANTCREATEDC";
+ case DDERR_NODC: return "DDERR_NODC";
+ case DDERR_WRONGMODE: return "DDERR_WRONGMODE";
+ case DDERR_IMPLICITLYCREATED: return "DDERR_IMPLICITLYCREATED";
+ case DDERR_NOTPALETTIZED: return "DDERR_NOTPALETTIZED";
+ case DDERR_UNSUPPORTEDMODE: return "DDERR_UNSUPPORTEDMODE";
+ case DDERR_NOMIPMAPHW: return "DDERR_NOMIPMAPHW";
+ case DDERR_INVALIDSURFACETYPE: return "DDERR_INVALIDSURFACETYPE";
+ case DDERR_DCALREADYCREATED: return "DDERR_DCALREADYCREATED";
+ case DDERR_CANTPAGELOCK: return "DDERR_CANTPAGELOCK";
+ case DDERR_CANTPAGEUNLOCK: return "DDERR_CANTPAGEUNLOCK";
+ case DDERR_NOTPAGELOCKED: return "DDERR_NOTPAGELOCKED";
+ case DDERR_NOTINITIALIZED: return "DDERR_NOTINITIALIZED";
+ }
+
+ return "Unknown Error ";
+}
+
Propchange: trunk/rosapps/tests/DxHalTest/main.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/rosapps/tests/directory.xml
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/directory.xml?rev=23…
==============================================================================
--- trunk/rosapps/tests/directory.xml (original)
+++ trunk/rosapps/tests/directory.xml Thu Jul 13 23:00:05 2006
@@ -67,6 +67,9 @@
<directory name="dnsquery">
<xi:include href="dnsquery/dnsquery.xml" />
</directory>
+<directory name="DxHalTest">
+ <xi:include href="DxHalTest/DxHalTest.rbuild" />
+</directory>
<directory name="edit">
<xi:include href="edit/edit.xml" />
</directory>
@@ -97,9 +100,9 @@
<directory name="gradient">
<xi:include href="gradient/gradient.xml" />
</directory>
-<directory name="guithreadinfo">
- <xi:include href="guithreadinfo/guithreadinfo.xml" />
-</directory>
+
+<!-- fixme: guithreadinfo -->
+
<directory name="hello">
<xi:include href="hello/hello.xml" />
</directory>