fix pointer activation handler

This commit is contained in:
Vadim Rozenfeld 2014-06-30 21:46:52 +10:00
parent a64e05f525
commit 6a37c24fce
2 changed files with 21 additions and 9 deletions

View File

@ -290,7 +290,7 @@ NTSTATUS QxlDod::SetPowerState(_In_ ULONG HardwareUid,
m_AdapterPowerState = DevicePowerState;
// There is nothing to do to specifically power up/down the display adapter
return STATUS_SUCCESS;
return m_pHWDevice->SetPowerState(DevicePowerState, &(m_CurrentModes[0].DispInfo));
}
// TODO: This is where the specified monitor should be powered up/down
m_pHWDevice->SetPowerState(ActionType);
@ -396,11 +396,12 @@ NTSTATUS QxlDod::QueryAdapterInfo(_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAda
pDriverCaps->WDDMVersion = DXGKDDI_WDDMv1_2;
pDriverCaps->HighestAcceptableAddress.QuadPart = -1;
pDriverCaps->MaxPointerWidth = 64;
pDriverCaps->MaxPointerHeight = 64;
pDriverCaps->PointerCaps.Monochrome = 1;
pDriverCaps->PointerCaps.Color = 1;
if (m_pHWDevice->GetType() == DEVICE_QXL) {
pDriverCaps->MaxPointerWidth = POINTER_SIZE;
pDriverCaps->MaxPointerHeight = POINTER_SIZE;
pDriverCaps->PointerCaps.Monochrome = 1;
pDriverCaps->PointerCaps.Color = 1;
}
DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s 1\n", __FUNCTION__));
return STATUS_SUCCESS;
}

View File

@ -7,6 +7,8 @@
#define MAX_VIEWS 1
#define BITS_PER_BYTE 8
#define POINTER_SIZE 64
typedef struct _QXL_FLAGS
{
UINT DriverStarted : 1; // ( 1) 1 after StartDevice and 0 after StopDevice
@ -207,8 +209,13 @@ typedef struct _CURRENT_BDD_MODE
class QxlDod;
class HwDeviceIntrface
{
enum DevType {
DEVICE_INTERFACE,
DEVICE_VGA,
DEVICE_QXL
};
class HwDeviceIntrface {
public:
virtual NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode) = 0;
virtual NTSTATUS SetCurrentMode(ULONG Mode) = 0;
@ -225,6 +232,7 @@ public:
USHORT GetModeNumber(USHORT idx) {return m_ModeNumbers[idx];}
USHORT GetCurrentModeIndex(void) {return m_CurrentMode;}
VOID SetCurrentModeIndex(USHORT idx) {m_CurrentMode = idx;}
DevType GetType(void) { return DEVICE_INTERFACE;}
virtual NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,
@ -262,6 +270,7 @@ public:
NTSTATUS SetPowerState(POWER_ACTION ActionType);
NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
NTSTATUS HWClose(void);
DevType GetType(void) { return DEVICE_VGA;}
NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,
@ -414,6 +423,7 @@ public:
NTSTATUS SetPowerState(POWER_ACTION ActionType);
NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* pDispInfo);
NTSTATUS HWClose(void);
DevType GetType(void) { return DEVICE_QXL;}
NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
_In_ UINT DstBitPerPixel,
_In_ BYTE* SrcAddr,
@ -472,6 +482,7 @@ private:
void FreeMem(UINT32 mspace_type, void *ptr);
UINT64 ReleaseOutput(UINT64 output_id);
void WaitForReleaseRing(void);
void EmptyReleaseRing(void);
BOOL SetClip(const RECT *clip, QXLDrawable *drawable);
void AddRes(QXLOutput *output, Resource *res);
void DrawableAddRes(QXLDrawable *drawable, Resource *res);