Author: fireball
Date: Thu Dec 20 15:31:39 2007
New Revision: 31350
URL: http://svn.reactos.org/svn/reactos?rev=31350&view=rev
Log:
- Make VBEMP look like a legacy driver.
- Reorganize VideoPortInitialize (firstly do all checks, then do Driver Object Extension related operations).
- Fix the hack Magnus Olsen added for the "No PNP videocard" problem, by adding a real check Windows 2003 SP1 videoport driver is performing (information got by building "stub" miniports and trying to load them with a checked build of W2K3SP1's videoprt.sys).
- Add stubbed handler for IRP_MJ_SYSTEM_CONTROL (for PnP miniports) and IRP_MJ_INTERNAL_DEVICE_CONTROL.
Modified:
trunk/reactos/drivers/video/miniport/vbe/vbemp.c
trunk/reactos/drivers/video/videoprt/dispatch.c
trunk/reactos/drivers/video/videoprt/videoprt.c
trunk/reactos/drivers/video/videoprt/videoprt.h
Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe…
==============================================================================
--- trunk/reactos/drivers/video/miniport/vbe/vbemp.c (original)
+++ trunk/reactos/drivers/video/miniport/vbe/vbemp.c Thu Dec 20 15:31:39 2007
@@ -42,9 +42,9 @@
InitData.HwInitialize = VBEInitialize;
InitData.HwStartIO = VBEStartIO;
InitData.HwResetHw = VBEResetHw;
- InitData.HwGetPowerState = VBEGetPowerState;
- InitData.HwSetPowerState = VBESetPowerState;
- InitData.HwGetVideoChildDescriptor = VBEGetVideoChildDescriptor;
+ //InitData.HwGetPowerState = VBEGetPowerState;
+ //InitData.HwSetPowerState = VBESetPowerState;
+ //InitData.HwGetVideoChildDescriptor = VBEGetVideoChildDescriptor;
InitData.HwDeviceExtensionSize = sizeof(VBE_DEVICE_EXTENSION);
return VideoPortInitialize(Context1, Context2, &InitData, NULL);
Modified: trunk/reactos/drivers/video/videoprt/dispatch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dis…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dispatch.c (original)
+++ trunk/reactos/drivers/video/videoprt/dispatch.c Thu Dec 20 15:31:39 2007
@@ -509,6 +509,14 @@
return STATUS_NOT_IMPLEMENTED;
}
+NTSTATUS NTAPI
+IntVideoPortDispatchSystemControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ return STATUS_NOT_IMPLEMENTED;
+}
+
VOID NTAPI
IntVideoPortUnload(PDRIVER_OBJECT DriverObject)
{
Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c Thu Dec 20 15:31:39 2007
@@ -1,7 +1,7 @@
/*
* VideoPort driver
*
- * Copyright (C) ReactOS Team
+ * Copyright (C) 2002-2004, 2007 ReactOS Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -553,7 +553,7 @@
PUNICODE_STRING RegistryPath = Context2;
NTSTATUS Status;
PVIDEO_PORT_DRIVER_EXTENSION DriverExtension;
- BOOL LegacyDetection = FALSE;
+ BOOLEAN PnpDriver = FALSE, LegacyDetection = FALSE;
DPRINT("VideoPortInitialize\n");
@@ -571,6 +571,63 @@
HwInitializationData->HwStartIO == NULL)
{
return STATUS_INVALID_PARAMETER;
+ }
+
+ switch (HwInitializationData->HwInitDataSize)
+ {
+ /*
+ * NT4 drivers are special case, because we must use legacy method
+ * of detection instead of the Plug & Play one.
+ */
+
+ case SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA:
+ DPRINT("We were loaded by a Windows NT miniport driver.\n");
+ break;
+
+ case SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA:
+ DPRINT("We were loaded by a Windows 2000 miniport driver.\n");
+ break;
+
+ case sizeof(VIDEO_HW_INITIALIZATION_DATA):
+ DPRINT("We were loaded by a Windows XP or later miniport driver.\n");
+ break;
+
+ default:
+ DPRINT("Invalid HwInitializationData size.\n");
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ /* Set dispatching routines */
+ DriverObject->MajorFunction[IRP_MJ_CREATE] = IntVideoPortDispatchOpen;
+ DriverObject->MajorFunction[IRP_MJ_CLOSE] = IntVideoPortDispatchClose;
+ DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
+ IntVideoPortDispatchDeviceControl;
+ DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] =
+ IntVideoPortDispatchDeviceControl;
+ DriverObject->MajorFunction[IRP_MJ_WRITE] =
+ IntVideoPortDispatchWrite; // ReactOS-specific hack
+ DriverObject->DriverUnload = IntVideoPortUnload;
+
+ /* Determine type of the miniport driver */
+ if ((HwInitializationData->HwInitDataSize >=
+ FIELD_OFFSET(VIDEO_HW_INITIALIZATION_DATA, HwQueryInterface))
+ && HwInitializationData->HwSetPowerState
+ && HwInitializationData->HwGetPowerState
+ && HwInitializationData->HwGetVideoChildDescriptor)
+ {
+ DPRINT("The miniport is a PnP miniport driver\n");
+ PnpDriver = TRUE;
+ }
+
+ /* Check if legacy detection should be applied */
+ if (!PnpDriver || HwContext)
+ {
+ DPRINT("Legacy detection for adapter interface %d\n",
+ HwInitializationData->AdapterInterfaceType);
+
+ /* FIXME: Move the code for legacy detection
+ to another function and call it here */
+ LegacyDetection = TRUE;
}
/*
@@ -643,45 +700,6 @@
}
DriverExtension->HwContext = HwContext;
- switch (HwInitializationData->HwInitDataSize)
- {
- /*
- * NT4 drivers are special case, because we must use legacy method
- * of detection instead of the Plug & Play one.
- */
-
- case SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA:
- DPRINT("We were loaded by a Windows NT miniport driver.\n");
- LegacyDetection = TRUE;
- break;
-
- case SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA:
- DPRINT("We were loaded by a Windows 2000 miniport driver.\n");
- break;
-
- case sizeof(VIDEO_HW_INITIALIZATION_DATA):
- DPRINT("We were loaded by a Windows XP or later miniport driver.\n");
- break;
-
- default:
- DPRINT("Invalid HwInitializationData size.\n");
- return STATUS_UNSUCCESSFUL;
- }
-
- /* We can't check HwInitializationData->AdapterInterfaceType to know if
- * we have to use legacy detection, as MSDN states that this member is
- * ignored by videoprt and should remain zero-initialized.
- * Force legacy detection, so NT4 drivers will still work on ReactOS.
- * WARNING: this will cause all Plug-and-Play IRPs to fail.
- */
- LegacyDetection = TRUE;
-
- DriverObject->MajorFunction[IRP_MJ_CREATE] = IntVideoPortDispatchOpen;
- DriverObject->MajorFunction[IRP_MJ_CLOSE] = IntVideoPortDispatchClose;
- DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = IntVideoPortDispatchDeviceControl;
- DriverObject->MajorFunction[IRP_MJ_WRITE] = IntVideoPortDispatchWrite;
- DriverObject->DriverUnload = IntVideoPortUnload;
-
/*
* Plug & Play drivers registers the device in AddDevice routine. For
* legacy drivers we must do it now.
@@ -710,6 +728,7 @@
DriverObject->DriverExtension->AddDevice = IntVideoPortAddDevice;
DriverObject->MajorFunction[IRP_MJ_PNP] = IntVideoPortDispatchPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = IntVideoPortDispatchPower;
+ DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = IntVideoPortDispatchSystemControl;
return STATUS_SUCCESS;
}
Modified: trunk/reactos/drivers/video/videoprt/videoprt.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.h (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.h Thu Dec 20 15:31:39 2007
@@ -165,6 +165,11 @@
IN PIRP Irp);
NTSTATUS NTAPI
+IntVideoPortDispatchSystemControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp);
+
+NTSTATUS NTAPI
IntVideoPortDispatchWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
Author: cfinck
Date: Thu Dec 20 03:30:20 2007
New Revision: 31348
URL: http://svn.reactos.org/svn/reactos?rev=31348&view=rev
Log:
Remove this deprecated wchar_t logic.
We needed it, when host and target headers weren't fully separated, but this greatly improved now :-)
Modified:
trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/include/psdk/winnt.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h (original)
+++ trunk/reactos/include/psdk/winnt.h Thu Dec 20 03:30:20 2007
@@ -49,26 +49,8 @@
#include <basetsd.h>
#include <guiddef.h>
-/* wchar_t checks
- * First check if wchar_t has already been defined by any host/OS */
-#ifndef _WCHAR_T_DECLARED /* for FreeBSD 5 and later */
-#define _WCHAR_T_DECLARED
-#ifndef _WCHAR_T /* for Mac OS X */
-#define _WCHAR_T
-#ifndef _WCHAR_T_
-#define _WCHAR_T_
-#ifndef _WCHAR_T_DEFINED /* If you want to override the wchar_t setting, define this */
#ifndef __cplusplus
- typedef unsigned short wchar_t;
-#endif
-#endif
-#endif
-#endif
-#endif
-
-/* Set _WCHAR_T_DEFINED for the case that this is checked later */
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
+ typedef unsigned short wchar_t;
#endif
#include <ctype.h>
Author: cfinck
Date: Thu Dec 20 03:03:17 2007
New Revision: 31346
URL: http://svn.reactos.org/svn/reactos?rev=31346&view=rev
Log:
- Bump the version to 1.1-SVN
- Add the list of changed components from 0.3.6 to 1.1
- Add "scut" to the build
- Update svn:ignore for the "sources" directory
Modified:
trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh
trunk/tools/RosBE/RosBE-Unix/sources/ (props changed)
Modified: trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/RosBE-Build…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh (original)
+++ trunk/tools/RosBE/RosBE-Unix/RosBE-Builder.sh Thu Dec 20 03:03:17 2007
@@ -7,8 +7,8 @@
# Released under GNU GPL v2 or any later version.
# Constants
-ROSBE_VERSION="0.3.7-SVN"
-KNOWN_ROSBE_VERSIONS="0.3.6 0.3.7-SVN"
+ROSBE_VERSION="1.1-SVN"
+KNOWN_ROSBE_VERSIONS="0.3.6 1.1-SVN"
DEFAULT_INSTALL_DIR="/usr/RosBE"
NEEDED_TOOLS="bison flex gcc g++ grep makeinfo" # GNU Make has a special check
@@ -274,6 +274,7 @@
process_make=false
process_nasm=false
process_buildtime=false
+ process_scut=false
# Logic behind this update part:
# - KNOWN_ROSBE_VERSIONS contains all versions from the oldest to the newest one (in this order!)
@@ -289,8 +290,14 @@
if $setvalues; then
case "$known_version" in
"0.3.6")
- # TODO: Define what has to be reprocessed, when updating from 0.3.6 to the next version
+ # Updated components from 0.3.6 to 1.1
process_cpucount=true
+ process_mingwruntime=true
+ process_w32api=true
+ process_binutils=true
+ process_gcc=true
+ process_nasm=true
+ process_scut=true
;;
esac
fi
@@ -304,6 +311,7 @@
process_make=true
process_nasm=true
process_buildtime=true
+ process_scut=true
# Create the directory if necessary
if $createdir; then
@@ -492,6 +500,12 @@
checkrun
fi
+if $process_scut; then
+ echo -n "Compiling scut..."
+ gcc -o "$installdir/bin/scut" "$SCRIPTDIR/tools/scut.c"
+ checkrun
+fi
+
echo -n "Removing unneeded files... "
rm -rf "$installdir/mingw32/sys-include"
rm -rf "$installdir/info"
Propchange: trunk/tools/RosBE/RosBE-Unix/sources/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Dec 20 03:03:17 2007
@@ -1,0 +1,1 @@
+*.tar.bz2
Author: jimtabor
Date: Thu Dec 20 02:48:07 2007
New Revision: 31345
URL: http://svn.reactos.org/svn/reactos?rev=31345&view=rev
Log:
Reorder code since it is a POWNED DC.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c Thu Dec 20 02:48:07 2007
@@ -630,15 +630,11 @@
if (Window->Wnd->Class->Style & CS_CLASSDC ||
Window->Wnd->Style & CS_CLASSDC) /* Test Class first */
{
- PWINDOW_OBJECT CurrentWindow;
if (pDCE->DCXFlags & (DCX_INTERSECTRGN | DCX_EXCLUDERGN)) /* Class DCE*/
DceDeleteClipRgn(pDCE);
- CurrentWindow = UserGetWindowObject(pDCE->hwndCurrent);
- if (CurrentWindow)
- { // Update and reset Vis Rgn and clear the dirty bit.
- // Should release VisRgn than reset it to default.
- DceUpdateVisRgn(pDCE, CurrentWindow, pDCE->DCXFlags);
- }
+ // Update and reset Vis Rgn and clear the dirty bit.
+ // Should release VisRgn than reset it to default.
+ DceUpdateVisRgn(pDCE, Window, pDCE->DCXFlags);
pDCE->DCXFlags = DCX_DCEEMPTY;
pDCE->hwndCurrent = 0;
}