From 4ff5891d7a8d710e28c9b9fe6fd17085a5f3505d Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 20 Dec 2024 18:23:51 +0100 Subject: [PATCH] Implement/match DeviceImpl::HandleActivate --- LEGO1/tgl/d3drm/device.cpp | 5 ++--- LEGO1/tgl/d3drm/impl.h | 2 +- LEGO1/tgl/tgl.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/LEGO1/tgl/d3drm/device.cpp b/LEGO1/tgl/d3drm/device.cpp index b991d417..a8f47b08 100644 --- a/LEGO1/tgl/d3drm/device.cpp +++ b/LEGO1/tgl/d3drm/device.cpp @@ -49,14 +49,13 @@ Result DeviceImpl::SetDither(int dither) return ResultVal(m_data->SetDither(dither)); } -// Probably wrong, not sure what's going on in this method. // FUNCTION: LEGO1 0x100a2ce0 -void DeviceImpl::InitFromD3DDevice(Device*) +void DeviceImpl::HandleActivate(WORD wParam) { // Device argument is intentionally unused. IDirect3DRMWinDevice* winDevice; if (ResultVal(m_data->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice))) { - m_data->InitFromD3D((LPDIRECT3D) &winDevice, (LPDIRECT3DDEVICE) m_data); + winDevice->HandleActivate(wParam); winDevice->Release(); } } diff --git a/LEGO1/tgl/d3drm/impl.h b/LEGO1/tgl/d3drm/impl.h index 14acce2a..acca4431 100644 --- a/LEGO1/tgl/d3drm/impl.h +++ b/LEGO1/tgl/d3drm/impl.h @@ -145,7 +145,7 @@ class DeviceImpl : public Device { // vtable+0x20 Result Update() override; - void InitFromD3DDevice(Device*) override; + void HandleActivate(WORD) override; void InitFromWindowsDevice(Device*) override; IDirect3DRMDevice2* ImplementationData() const { return m_data; } diff --git a/LEGO1/tgl/tgl.h b/LEGO1/tgl/tgl.h index 4c29ed1f..0d79166e 100644 --- a/LEGO1/tgl/tgl.h +++ b/LEGO1/tgl/tgl.h @@ -171,7 +171,7 @@ class Device : public Object { // vtable+0x20 virtual Result Update() = 0; - virtual void InitFromD3DDevice(Device*) = 0; + virtual void HandleActivate(WORD) = 0; virtual void InitFromWindowsDevice(Device*) = 0; // SYNTHETIC: LEGO1 0x100a2350