mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[XBOXVMP] Fix in VideoPortGetAccessRanges call: missing Slot parameter.
Contrary to what is (badly) written on MSDN, this parameter is *mandatory* when the ranges looked for are on a PCI adapter. Detected when testing with MS Windows' videoprt.sys on XBOX emulator; thanks to Simone Lombardo for assistance!
This commit is contained in:
parent
bfd42c67a1
commit
61012eb544
1 changed files with 6 additions and 4 deletions
|
@ -61,18 +61,20 @@ XboxVmpFindAdapter(
|
||||||
OUT PUCHAR Again)
|
OUT PUCHAR Again)
|
||||||
{
|
{
|
||||||
PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
|
PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
|
||||||
VIDEO_ACCESS_RANGE AccessRanges[3];
|
|
||||||
VP_STATUS Status;
|
VP_STATUS Status;
|
||||||
|
VIDEO_ACCESS_RANGE AccessRanges[2];
|
||||||
USHORT VendorId = 0x10DE; /* NVIDIA Corporation */
|
USHORT VendorId = 0x10DE; /* NVIDIA Corporation */
|
||||||
USHORT DeviceId = 0x02A0; /* NV2A XGPU */
|
USHORT DeviceId = 0x02A0; /* NV2A XGPU */
|
||||||
|
ULONG Slot = 0;
|
||||||
|
|
||||||
TRACE_(IHVVIDEO, "XboxVmpFindAdapter\n");
|
TRACE_(IHVVIDEO, "XboxVmpFindAdapter\n");
|
||||||
|
|
||||||
XboxVmpDeviceExtension = (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension;
|
XboxVmpDeviceExtension = (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension;
|
||||||
|
|
||||||
Status = VideoPortGetAccessRanges(HwDeviceExtension, 0, NULL, 3, AccessRanges,
|
VideoPortZeroMemory(&AccessRanges, sizeof(AccessRanges));
|
||||||
&VendorId, &DeviceId, NULL);
|
Status = VideoPortGetAccessRanges(HwDeviceExtension, 0, NULL,
|
||||||
|
RTL_NUMBER_OF(AccessRanges), AccessRanges,
|
||||||
|
&VendorId, &DeviceId, &Slot);
|
||||||
if (Status == NO_ERROR)
|
if (Status == NO_ERROR)
|
||||||
{
|
{
|
||||||
XboxVmpDeviceExtension->PhysControlStart = AccessRanges[0].RangeStart;
|
XboxVmpDeviceExtension->PhysControlStart = AccessRanges[0].RangeStart;
|
||||||
|
|
Loading…
Reference in a new issue