[Spice-devel] [PATCH v3 20/28] Add type enum to qxl/vga device
Sameeh Jubran
sameeh at daynix.com
Wed Sep 7 13:10:38 UTC 2016
This patch adds type enum to the qxl/vga device class.
Based on a patch by Sandy Stutsman <sstutsma at redhat.com>
Signed-off-by: Sameeh Jubran <sameeh at daynix.com>
---
qxldod/QxlDod.cpp | 2 ++
qxldod/QxlDod.h | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 21cb653..5f475b0 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -2312,6 +2312,7 @@ VgaDevice::VgaDevice(_In_ QxlDod* pQxlDod) : HwDeviceInterface(pQxlDod)
m_ModeNumbers = NULL;
m_CurrentMode = 0;
m_Id = 0;
+ m_type = VGA_DEVICE;
}
VgaDevice::~VgaDevice(void)
@@ -2947,6 +2948,7 @@ QxlDevice::QxlDevice(_In_ QxlDod* pQxlDod) : HwDeviceInterface(pQxlDod)
m_CustomMode = 0;
m_FreeOutputs = 0;
m_Pending = 0;
+ m_type = QXL_DEVICE;
}
QxlDevice::~QxlDevice(void)
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index fc7c245..7e2990d 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -213,9 +213,15 @@ typedef struct _CURRENT_BDD_MODE
class QxlDod;
+typedef enum {
+ QXL_DEVICE,
+ VGA_DEVICE,
+ INVALID_DEVICE,
+}WIN_QXL_DEVICE_TYPE;
+
class HwDeviceInterface {
public:
- HwDeviceInterface(_In_ QxlDod* pQxlDod) {}
+ HwDeviceInterface(_In_ QxlDod* pQxlDod) {m_type = INVALID_DEVICE;}
virtual ~HwDeviceInterface() {;}
virtual NTSTATUS QueryCurrentMode(PVIDEO_MODE RequestedMode) = 0;
virtual NTSTATUS SetCurrentMode(ULONG Mode) = 0;
@@ -260,6 +266,7 @@ protected:
USHORT m_CurrentMode;
USHORT m_CustomMode;
ULONG m_Id;
+ WIN_QXL_DEVICE_TYPE m_type;
};
class VgaDevice :
--
2.7.0.windows.1
More information about the Spice-devel
mailing list