Author: fireball
Date: Sat Oct 20 22:09:14 2007
New Revision: 29718
URL: http://svn.reactos.org/svn/reactos?rev=29718&view=rev
Log:
- Use "windows" module to hold native dlls, which can be legally used in different operating systems (for now, it's mfc42.dll). Put it into reactos\modules\windows directory and "makex bootcd".
Modified:
trunk/reactos/boot/bootdata/packages/reactos.dff
Modified: trunk/reactos/boot/bootdata/packages/reactos.dff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
==============================================================================
--- trunk/reactos/boot/bootdata/packages/reactos.dff (original)
+++ trunk/reactos/boot/bootdata/packages/reactos.dff Sat Oct 20 22:09:14 2007
@@ -531,3 +531,6 @@
modules\rostests\winetests\usp10\usp10_winetest.exe 7 optional
modules\rostests\winetests\version\version_winetest.exe 7 optional
modules\wallpaper\lake.bmp 4 optional
+
+; Native libraries
+modules\windows\mfc42.dll 1 optional
Author: greatlrd
Date: Sat Oct 20 21:34:14 2007
New Revision: 29715
URL: http://svn.reactos.org/svn/reactos?rev=29715&view=rev
Log:
Optimze : the NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateD3DBuffer , with the new optimze method.
Add : doxgen tags for how NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateD3DBuffer works
Add : a sort code for the DxEngDrv so we getting the driver functions in sorted list in DxDdStartupDxGraphics, this will be part of optimize the dx code in directx
it will allow us call function with gpDxFuncs[DXG_INDEX_DxD3dContextCreate].pfn instead first to search after it.
Fix few bugs, as well.
rember u can not still build ReactX I have not commit thuse part yet.
Modified:
branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/eng.c
Modified: branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h Sat Oct 20 21:34:14 2007
@@ -98,6 +98,9 @@
typedef DWORD (NTAPI *PGD_DXDDUPDATEOVERLAY)(HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA);
typedef DWORD (NTAPI *PGD_DXDDSETOVERLAYPOSITION)(HANDLE, HANDLE, PDD_SETOVERLAYPOSITIONDATA);
+/* From eng.c */
+typedef FLATPTR (NTAPI *PGD_HEAPVIDMEMALLOCALIGNED)(LPVIDMEM, DWORD, DWORD, LPSURFACEALIGNMENT, LPLONG);
+typedef VOID (NTAPI *PGD_VIDMEMFREE)(LPVMEMHEAP, FLATPTR);
/* Standard macro */
#define DXG_GET_INDEX_FUNCTION(INDEX, FUNCTION) \
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/d3d.c Sat Oct 20 21:34:14 2007
@@ -16,19 +16,45 @@
#include <w32k.h>
#include <debug.h>
-/************************************************************************/
-/* NtGdiDdCanCreateD3DBuffer */
-/************************************************************************/
+
+/*++
+* @name NtGdiDdCanCreateD3DBuffer
+* @implemented
+*
+* The function NtGdiDdCanCreateD3DBuffer checks if you can create a
+* surface for DirectX. It is redirected to dxg.sys.
+*
+* @param HANDLE hDirectDraw
+* The handle we got from NtGdiDdCreateDirectDrawObject
+*
+* @param PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+* This contains information to check if the driver can create the buffers,
+* surfaces, textures and vertexes, and how many of each the driver can create.
+
+*
+* @return
+* Depending on if the driver supports this API or not, DDHAL_DRIVER_HANDLED
+* or DDHAL_DRIVER_NOTHANDLED is returned.
+* To check if the function has been successful, do a full check.
+* A full check is done by checking if the return value is DDHAL_DRIVER_HANDLED
+* and puCanCreateSurfaceData->ddRVal is set to DD_OK.
+*
+* @remarks.
+* dxg.sys NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface call are redirect to dxg.sys
+* inside the dxg.sys they ar redirect to same functions. examine the driver list functions
+* table, the memory address you will see they are pointed to same memory address.
+*
+* Before call to this api please set the puCanCreateSurfaceData->ddRVal to a error value example DDERR_NOTUSPORTED.
+* for the ddRVal will other wise be unchange if some error happen inside the driver.
+*
+*--*/
+
DWORD
STDCALL
NtGdiDdCanCreateD3DBuffer(HANDLE hDirectDraw,
- PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-)
-{
- PGD_DDCANCREATED3DBUFFER pfnDdCanCreateD3DBuffer = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdCanCreateD3DBuffer, pfnDdCanCreateD3DBuffer);
+ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
+{
+ PGD_DXDDDESTROYD3DBUFFER pfnDdCanCreateD3DBuffer = gpDxFuncs[DXG_INDEX_DxDdCanCreateD3DBuffer].pfn;
if (pfnDdCanCreateD3DBuffer == NULL)
{
@@ -40,9 +66,40 @@
return pfnDdCanCreateD3DBuffer(hDirectDraw,puCanCreateSurfaceData);
}
-/************************************************************************/
-/* NtGdiD3dContextCreate */
-/************************************************************************/
+/*++
+* @name NtGdiD3dContextCreate
+* @implemented
+*
+* The Function NtGdiDdCanCreateD3DBuffer check if you can create a
+* surface for directx it redirect the call to dxg.sys.
+*
+* @param HANDLE hDirectDrawLocal
+* The handle we got from NtGdiDdCreateDirectDrawObject
+*
+* @param HANDLE hSurfColor
+* Handle to DD_SURFACE_LOCAL to be use as target rendring
+*
+* @param HANDLE hSurfZ
+* Handle to a DD_SURFACE_LOCAL it is the Z deep buffer, accdoing MSDN if it set to NULL nothing should happen.
+*
+* @param D3DNTHAL_CONTEXTCREATEDATA* hSurfZ
+* the buffer to create the context data
+*
+* @return
+* DDHAL_DRIVER_HANDLED or DDHAL_DRIVER_NOTHANDLED if the driver support this api.
+* Todo full check if we sussess is to check the return value DDHAL_DRIVER_HANDLED
+* puCanCreateSurfaceData->ddRVal are set to DD_OK.
+*
+*
+* @remarks.
+* dxg.sys NtGdiD3dContextCreate and NtGdiD3dContextCreate call are redirect to
+* same functions in the dxg.sys. So they are working exacly same. everthing else is lying if they
+* are diffent.
+*
+* Before call to this api please set the hSurfZ->ddRVal to a error value example DDERR_NOTUSPORTED.
+* for the ddRVal will other wise be unchange if some error happen inside the driver.
+*
+*--*/
BOOL
STDCALL
NtGdiD3dContextCreate(HANDLE hDirectDrawLocal,
@@ -50,15 +107,12 @@
HANDLE hSurfZ,
D3DNTHAL_CONTEXTCREATEDATA* pdcci)
{
- PGD_D3DCONTEXTCREATE pfnD3dContextCreate = NULL;
- INT i;
-
- DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxD3dContextCreate, pfnD3dContextCreate);
+ PGD_DDCANCREATED3DBUFFER pfnD3dContextCreate = gpDxFuncs[DXG_INDEX_DxD3dContextCreate].pfn;
if (pfnD3dContextCreate == NULL)
{
DPRINT1("Warring no pfnD3dContextCreate");
- return DDHAL_DRIVER_NOTHANDLED;
+ return FALSE;
}
DPRINT1("Calling on dxg.sys D3dContextCreate");
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Sat Oct 20 21:34:14 2007
@@ -26,16 +26,16 @@
NTSTATUS
STDCALL
DxDdStartupDxGraphics( ULONG ulc1,
- PDRVENABLEDATA pDrved1,
+ PDRVENABLEDATA DxEngDrvOld,
ULONG ulc2,
- PDRVENABLEDATA pDrved2,
- PULONG DDContext,
+ PDRVENABLEDATA DxgDrvOld,
+ PULONG DirectDrawContext,
PEPROCESS Proc)
{
- DRVENABLEDATA EngDrv;
- DRVENABLEDATA DXG_API;
-
- NTSTATUS Status = STATUS_DLL_NOT_FOUND;
+ DRVENABLEDATA DxEngDrv;
+ DRVENABLEDATA DxgDrv;
+
+ NTSTATUS Status = STATUS_PROCEDURE_NOT_FOUND;
/* FIXME setup of gaEngFuncs driver export list
* but not in this api, we can add it here tempary until we figout where
@@ -51,45 +51,57 @@
if (!ghDxGraphics)
{
DPRINT1("Warring no dxg.sys in ReactOS");
- return Status;
- }
-
- /* import DxDdStartupDxGraphics and DxDdCleanupDxGraphics */
- gpfnStartupDxGraphics = EngFindImageProcAddress(ghDxGraphics,"DxDdStartupDxGraphics");
- gpfnCleanupDxGraphics = EngFindImageProcAddress(ghDxGraphics,"DxDdCleanupDxGraphics");
-
- if ((gpfnStartupDxGraphics) &&
- (gpfnCleanupDxGraphics))
- {
- /* Setup driver data for activate the dx interface */
- EngDrv.iDriverVersion = DDI_DRIVER_VERSION_NT5_01;
- EngDrv.pdrvfn = &gaEngFuncs;
- EngDrv.c = gcEngFuncs;
-
- Status = gpfnStartupDxGraphics ( sizeof(DRVENABLEDATA),
- &EngDrv,
- sizeof(DRVENABLEDATA),
- &DXG_API,
- &gdwDirectDrawContext,
- Proc );
- }
-
- /* check if we manger loading the data and execute the dxStartupDxGraphics and it susscess */
- if (!NT_SUCCESS(Status))
- {
- gpfnStartupDxGraphics = NULL;
- gpfnCleanupDxGraphics = NULL;
- EngUnloadImage( ghDxGraphics);
- ghDxGraphics = NULL;
- DPRINT1("Warring no init of DirectX graphic interface");
+ Status = STATUS_DLL_NOT_FOUND;
}
else
{
- gpDxFuncs = DXG_API.pdrvfn;
- DPRINT1("DirectX interface is Activated");
- }
-
- /* return the status */
+ /* import DxDdStartupDxGraphics and DxDdCleanupDxGraphics */
+ gpfnStartupDxGraphics = EngFindImageProcAddress(ghDxGraphics,"DxDdStartupDxGraphics");
+ gpfnCleanupDxGraphics = EngFindImageProcAddress(ghDxGraphics,"DxDdCleanupDxGraphics");
+
+ if ((gpfnStartupDxGraphics) &&
+ (gpfnCleanupDxGraphics))
+ {
+ /* Setup driver data for activate the dx interface */
+ DxEngDrv.iDriverVersion = DDI_DRIVER_VERSION_NT5_01;
+ DxEngDrv.pdrvfn = &gaEngFuncs;
+ DxEngDrv.c = gcEngFuncs;
+
+ Status = gpfnStartupDxGraphics ( sizeof(DRVENABLEDATA),
+ &DxEngDrv,
+ sizeof(DRVENABLEDATA),
+ &DxgDrv,
+ &gdwDirectDrawContext,
+ Proc );
+ }
+
+ /* check if we manger loading the data and execute the dxStartupDxGraphics and it susscess */
+ if (!NT_SUCCESS(Status))
+ {
+ gpfnStartupDxGraphics = NULL;
+ gpfnCleanupDxGraphics = NULL;
+ EngUnloadImage( ghDxGraphics);
+ ghDxGraphics = NULL;
+ DPRINT1("Warring no init of DirectX graphic interface");
+ }
+ else
+ {
+ /* Sort the drv functions list in index order, this allown us doing, smaller optimze
+ * in api that are redirect to dx.sys
+ */
+
+ PDRVFN lstDrvFN = DxgDrv.pdrvfn;
+ INT t;
+ for (t=0;t<=DXG_INDEX_DxDdIoctl;t++)
+ {
+ gpDxFuncs[lstDrvFN[t].iFunc].iFunc =lstDrvFN[t].iFunc;
+ gpDxFuncs[lstDrvFN[t].iFunc].pfn =lstDrvFN[t].pfn;
+ }
+ DPRINT1("DirectX interface is Activated");
+ }
+ /* return the status */
+ }
+
return Status;
}
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/eng.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/eng.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/eng.c Sat Oct 20 21:34:14 2007
@@ -33,7 +33,7 @@
if (pfnHeapVidMemAllocAligned == NULL)
{
DPRINT1("Warring no pfnHeapVidMemAllocAligned");
- return DDHAL_DRIVER_NOTHANDLED;
+ return NULL;
}
DPRINT1("Calling on dxg.sys pfnHeapVidMemAllocAligned");
@@ -56,11 +56,12 @@
if (pfnVidMemFree == NULL)
{
DPRINT1("Warring no pfnVidMemFree");
- return DDHAL_DRIVER_NOTHANDLED;
}
-
- DPRINT1("Calling on dxg.sys pfnVidMemFree");
- return pfnVidMemFree(pvmh, ptr);
+ else
+ {
+ DPRINT1("Calling on dxg.sys pfnVidMemFree");
+ pfnVidMemFree(pvmh, ptr);
+ }
}
/************************************************************************/
Author: dreimer
Date: Sat Oct 20 18:26:48 2007
New Revision: 29711
URL: http://svn.reactos.org/svn/reactos?rev=29711&view=rev
Log:
Small modification to guarantee that it runs the way it should on ALL PCs, not only mine.
Modified:
trunk/tools/RosBE-Windows/Root/options.cmd
Modified: trunk/tools/RosBE-Windows/Root/options.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/options.c…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/options.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/options.cmd Sat Oct 20 18:26:48 2007
@@ -11,4 +11,6 @@
title Options
"%_ROSBE_BASEDIR%\options.exe"
+ECHO Press any Button to reset RosBE with the new Settings.
+pause
"%_ROSBE_BASEDIR%\RosBE.cmd"