fix compatebility issue

This commit is contained in:
Vadim Rozenfeld 2014-08-24 20:02:56 +10:00
parent 400f7ad7c5
commit 8ffc5298ad
2 changed files with 4 additions and 4 deletions

View File

@ -383,15 +383,15 @@ NTSTATUS QxlDod::QueryAdapterInfo(_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAda
{ {
case DXGKQAITYPE_DRIVERCAPS: case DXGKQAITYPE_DRIVERCAPS:
{ {
if (pQueryAdapterInfo->OutputDataSize < sizeof(DXGK_DRIVERCAPS)) if (!pQueryAdapterInfo->OutputDataSize/* < sizeof(DXGK_DRIVERCAPS)*/)
{ {
DbgPrint(TRACE_LEVEL_ERROR, ("pQueryAdapterInfo->OutputDataSize (0x%I64x) is smaller than sizeof(DXGK_DRIVERCAPS) (0x%I64x)", pQueryAdapterInfo->OutputDataSize, sizeof(DXGK_DRIVERCAPS))); DbgPrint(TRACE_LEVEL_ERROR, ("pQueryAdapterInfo->OutputDataSize (0x%u) is smaller than sizeof(DXGK_DRIVERCAPS) (0x%u)\n", pQueryAdapterInfo->OutputDataSize, sizeof(DXGK_DRIVERCAPS)));
return STATUS_BUFFER_TOO_SMALL; return STATUS_BUFFER_TOO_SMALL;
} }
DXGK_DRIVERCAPS* pDriverCaps = (DXGK_DRIVERCAPS*)pQueryAdapterInfo->pOutputData; DXGK_DRIVERCAPS* pDriverCaps = (DXGK_DRIVERCAPS*)pQueryAdapterInfo->pOutputData;
RtlZeroMemory(pDriverCaps, sizeof(DXGK_DRIVERCAPS)); RtlZeroMemory(pDriverCaps, pQueryAdapterInfo->OutputDataSize/*sizeof(DXGK_DRIVERCAPS)*/);
pDriverCaps->WDDMVersion = DXGKDDI_WDDMv1_2; pDriverCaps->WDDMVersion = DXGKDDI_WDDMv1_2;
pDriverCaps->HighestAcceptableAddress.QuadPart = -1; pDriverCaps->HighestAcceptableAddress.QuadPart = -1;

View File

@ -28,7 +28,7 @@ DriverEntry(
// Initialize DDI function pointers and dxgkrnl // Initialize DDI function pointers and dxgkrnl
KMDDOD_INITIALIZATION_DATA InitialData = {0}; KMDDOD_INITIALIZATION_DATA InitialData = {0};
InitialData.Version = DXGKDDI_INTERFACE_VERSION_WIN8; InitialData.Version = DXGKDDI_INTERFACE_VERSION;
InitialData.DxgkDdiAddDevice = DodAddDevice; InitialData.DxgkDdiAddDevice = DodAddDevice;
InitialData.DxgkDdiStartDevice = DodStartDevice; InitialData.DxgkDdiStartDevice = DodStartDevice;