Author: greatlrd
Date: Tue Apr 4 15:49:55 2006
New Revision: 21453
URL:
http://svn.reactos.ru/svn/reactos?rev=21453&view=rev
Log:
Start Implement HEL
1. Start implement HEL Inisate
2. Start implement HEL GetAvailMem
Modified:
trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
trunk/reactos/dll/directx/ddraw/rosdraw.h
trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c
Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddra…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Tue Apr 4 15:49:55 2006
@@ -19,8 +19,7 @@
Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
{
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
- HRESULT ret;
-
+
if (iface==NULL)
{
return DDERR_NOTINITIALIZED;
@@ -46,13 +45,10 @@
// call software first
- if((ret = Hal_DirectDraw_Initialize (iface)) != DD_OK)
- return ret;
-
- // ... then overwrite with hal
- if((ret = Hel_DirectDraw_Initialize (iface)) != DD_OK)
- return ret;
-
+ Hal_DirectDraw_Initialize (iface);
+
+ Hel_DirectDraw_Initialize (iface);
+
return DD_OK;
}
Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.h…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/rosdraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/rosdraw.h Tue Apr 4 15:49:55 2006
@@ -53,6 +53,9 @@
DWORD cooperative_level;
BOOL InitializeDraw;
+
+ /* HEL stuff */
+ DWORD HELMemoryAvilable;
} IDirectDrawImpl;
@@ -136,6 +139,10 @@
HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 , DWORD , DWORD ,DWORD , DWORD ,
DWORD );
HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT,
DWORD, LPDDBLTFX );
+/* Setting for HEL should be move to ros special reg key ? */
+
+/* setup how much graphic memory should hel be limit, set it now to 64MB */
+#define HEL_GRAPHIC_MEMORY_MAX 67108864
/*********** Macros ***********/
Modified: trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/soft/ddra…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c (original)
+++ trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c Tue Apr 4 15:49:55 2006
@@ -11,8 +11,13 @@
#include "rosdraw.h"
+
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
{
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ This->HELMemoryAvilable = HEL_GRAPHIC_MEMORY_MAX;
+
return DD_OK;
}
@@ -29,7 +34,11 @@
HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
LPDWORD total, LPDWORD free)
{
- DX_STUB;
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ *total = HEL_GRAPHIC_MEMORY_MAX;
+ *free = This->HELMemoryAvilable;
+ return DD_OK;
}