mirror of
https://github.com/reactos/reactos.git
synced 2024-07-05 12:15:46 +00:00
Do not hack video driver, VBE driver works in windows xp
---------------------------------------------------------------- Fixed to detect few legazy bus types, fill the list for no PnP bus type in videprt/videoprt.c functions VideoPortInitialize svn path=/trunk/; revision=27413
This commit is contained in:
parent
a6fa0638e6
commit
5ecbbb6ebb
|
@ -37,7 +37,7 @@ DriverEntry(IN PVOID Context1, IN PVOID Context2)
|
|||
VIDEO_HW_INITIALIZATION_DATA InitData;
|
||||
|
||||
VideoPortZeroMemory(&InitData, sizeof(InitData));
|
||||
InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
|
||||
InitData.HwInitDataSize = sizeof(VIDEO_HW_INITIALIZATION_DATA);
|
||||
InitData.HwFindAdapter = VBEFindAdapter;
|
||||
InitData.HwInitialize = VBEInitialize;
|
||||
InitData.HwStartIO = VBEStartIO;
|
||||
|
|
|
@ -31,7 +31,7 @@ DriverEntry(IN PVOID Context1,
|
|||
|
||||
VideoPortZeroMemory(&InitData, sizeof InitData);
|
||||
|
||||
InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
|
||||
InitData.HwInitDataSize = sizeof(InitData);
|
||||
/* FIXME: Fill in InitData members */
|
||||
InitData.StartingDeviceNumber = 0;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ DriverEntry(IN PVOID Context1, IN PVOID Context2)
|
|||
|
||||
VideoPortZeroMemory(&InitData, sizeof(InitData));
|
||||
InitData.AdapterInterfaceType = PCIBus;
|
||||
InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA;
|
||||
InitData.HwInitDataSize = sizeof(VIDEO_HW_INITIALIZATION_DATA);
|
||||
InitData.HwFindAdapter = XboxVmpFindAdapter;
|
||||
InitData.HwInitialize = XboxVmpInitialize;
|
||||
InitData.HwStartIO = XboxVmpStartIO;
|
||||
|
|
|
@ -713,6 +713,15 @@ VideoPortInitialize(
|
|||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
/* add no PNP bus here, add more bus type if it need it */
|
||||
if ( (HwInitializationData->AdapterInterfaceType == 0) ||
|
||||
(HwInitializationData->AdapterInterfaceType == -1) )
|
||||
|
||||
{
|
||||
DPRINT1("No PNP Videocard .\n");
|
||||
LegacyDetection = TRUE;
|
||||
}
|
||||
|
||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = IntVideoPortDispatchOpen;
|
||||
DriverObject->MajorFunction[IRP_MJ_CLOSE] = IntVideoPortDispatchClose;
|
||||
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = IntVideoPortDispatchDeviceControl;
|
||||
|
@ -727,6 +736,12 @@ VideoPortInitialize(
|
|||
if (LegacyDetection)
|
||||
{
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
|
||||
if (HwInitializationData->HwInitDataSize != SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA)
|
||||
{
|
||||
/* power manger */
|
||||
DriverObject->MajorFunction[IRP_MJ_POWER] = IntVideoPortDispatchPower;
|
||||
}
|
||||
Status = IntVideoPortCreateAdapterDeviceObject(DriverObject, DriverExtension,
|
||||
NULL, &DeviceObject);
|
||||
DPRINT("IntVideoPortCreateAdapterDeviceObject returned 0x%x\n", Status);
|
||||
|
|
Loading…
Reference in a new issue