mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04:17 +00:00
Implement/match display mode enumeration (#396)
* Implement/match display mode enumeration * Improve match of EnumDirectDrawCallback * Fix annotations
This commit is contained in:
committed by
GitHub
parent
31a5562034
commit
106dd7cebc
@@ -66,11 +66,13 @@ struct MxDeviceEnumerate0x178Element {
|
||||
};
|
||||
|
||||
// SIZE 0x0c
|
||||
struct MxDeviceEnumerate0x184Element {
|
||||
undefined m_unk0x00[0x0c]; // 0x00
|
||||
struct MxDeviceDisplayMode {
|
||||
DWORD m_width; // 0x00
|
||||
DWORD m_height; // 0x04
|
||||
DWORD m_bitsPerPixel; // 0x08
|
||||
|
||||
MxBool operator==(MxDeviceEnumerate0x184Element) const { return TRUE; }
|
||||
MxBool operator<(MxDeviceEnumerate0x184Element) const { return TRUE; }
|
||||
MxBool operator==(MxDeviceDisplayMode) const { return TRUE; }
|
||||
MxBool operator<(MxDeviceDisplayMode) const { return TRUE; }
|
||||
};
|
||||
|
||||
// SIZE 0x190
|
||||
@@ -86,7 +88,7 @@ struct MxDeviceEnumerateElement {
|
||||
char* m_driverName; // 0x08
|
||||
DDCAPS m_ddCaps; // 0x0c
|
||||
list<MxDeviceEnumerate0x178Element> m_unk0x178; // 0x178
|
||||
list<MxDeviceEnumerate0x184Element> m_unk0x184; // 0x184
|
||||
list<MxDeviceDisplayMode> m_displayModes; // 0x184
|
||||
|
||||
MxBool operator==(MxDeviceEnumerateElement) const { return TRUE; }
|
||||
MxBool operator<(MxDeviceEnumerateElement) const { return TRUE; }
|
||||
@@ -94,19 +96,19 @@ struct MxDeviceEnumerateElement {
|
||||
|
||||
// clang-format off
|
||||
// TEMPLATE: LEGO1 0x1009b900
|
||||
// list<MxDeviceEnumerate0x184Element,allocator<MxDeviceEnumerate0x184Element> >::~list<MxDeviceEnumerate0x184Element,allocator<MxDeviceEnumerate0x184Element> >
|
||||
// list<MxDeviceEnumerate0x178Element,allocator<MxDeviceEnumerate0x178Element> >::~list<MxDeviceEnumerate0x178Element,allocator<MxDeviceEnumerate0x178Element> >
|
||||
// clang-format on
|
||||
|
||||
// clang-format off
|
||||
// TEMPLATE: LEGO1 0x1009b970
|
||||
// list<MxDeviceEnumerate0x178Element,allocator<MxDeviceEnumerate0x178Element> >::~list<MxDeviceEnumerate0x178Element,allocator<MxDeviceEnumerate0x178Element> >
|
||||
// list<MxDeviceDisplayMode,allocator<MxDeviceDisplayMode> >::~list<MxDeviceDisplayMode,allocator<MxDeviceDisplayMode> >
|
||||
// clang-format on
|
||||
|
||||
// TEMPLATE: LEGO1 0x1009b9e0
|
||||
// List<MxDeviceEnumerate0x184Element>::~List<MxDeviceEnumerate0x184Element>
|
||||
// List<MxDeviceEnumerate0x178Element>::~List<MxDeviceEnumerate0x178Element>
|
||||
|
||||
// TEMPLATE: LEGO1 0x1009ba30
|
||||
// List<MxDeviceEnumerate0x178Element>::~List<MxDeviceEnumerate0x178Element>
|
||||
// List<MxDeviceDisplayMode>::~List<MxDeviceDisplayMode>
|
||||
|
||||
// Compiler-generated copy ctor
|
||||
// SYNTHETIC: LEGO1 0x1009c290
|
||||
@@ -121,6 +123,7 @@ public:
|
||||
virtual MxResult DoEnumerate(); // vtable+0x00
|
||||
|
||||
BOOL EnumDirectDrawCallback(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName);
|
||||
HRESULT EnumDisplayModesCallback(LPDDSURFACEDESC p_ddsd);
|
||||
const char* EnumerateErrorToString(HRESULT p_error);
|
||||
MxS32 ParseDeviceName(const char* p_deviceId);
|
||||
MxResult FUN_1009d030(MxS32 p_und1, undefined** p_und2, undefined** p_und3);
|
||||
@@ -128,23 +131,23 @@ public:
|
||||
MxResult FUN_1009d210();
|
||||
|
||||
static void BuildErrorString(const char*, ...);
|
||||
static BOOL CALLBACK
|
||||
DirectDrawEnumerateCallback(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName, LPVOID p_context);
|
||||
static HRESULT CALLBACK DisplayModesEnumerateCallback(LPDDSURFACEDESC p_ddsd, LPVOID p_context);
|
||||
static HRESULT CALLBACK DevicesEnumerateCallback(
|
||||
LPGUID p_lpGuid,
|
||||
LPSTR p_lpDeviceDescription,
|
||||
LPSTR p_lpDeviceName,
|
||||
LPD3DDEVICEDESC p_pHWDesc,
|
||||
LPD3DDEVICEDESC p_pHELDesc,
|
||||
LPVOID p_context
|
||||
);
|
||||
|
||||
private:
|
||||
list<MxDeviceEnumerateElement> m_list; // 0x04
|
||||
MxBool m_unk0x10; // 0x10
|
||||
};
|
||||
|
||||
BOOL CALLBACK DirectDrawEnumerateCallback(LPGUID p_guid, LPSTR p_driverDesc, LPSTR p_driverName, LPVOID p_context);
|
||||
HRESULT CALLBACK DisplayModesEnumerateCallback(LPDDSURFACEDESC, LPVOID);
|
||||
HRESULT CALLBACK DevicesEnumerateCallback(
|
||||
LPGUID p_lpGuid,
|
||||
LPSTR p_lpDeviceDescription,
|
||||
LPSTR p_lpDeviceName,
|
||||
LPD3DDEVICEDESC p_pHWDesc,
|
||||
LPD3DDEVICEDESC p_pHELDesc,
|
||||
LPVOID p_context
|
||||
);
|
||||
|
||||
// VTABLE: LEGO1 0x100d9cc8
|
||||
// SIZE 0x14
|
||||
class MxDeviceEnumerate100d9cc8 : public MxDeviceEnumerate {};
|
||||
|
||||
Reference in New Issue
Block a user