diff --git a/src/gx/CGxDevice.hpp b/src/gx/CGxDevice.hpp index 8cdbcbc..5e1f76d 100644 --- a/src/gx/CGxDevice.hpp +++ b/src/gx/CGxDevice.hpp @@ -73,6 +73,7 @@ class CGxDevice { TSHashTable m_shaderList[GxShTargets_Last]; int32_t m_context = 0; int32_t intF5C = 0; + int32_t m_windowVisible = 0; int32_t intF64 = 0; CBoundingBox m_viewport; C44Matrix m_projection; diff --git a/src/gx/d3d/CGxDeviceD3d.cpp b/src/gx/d3d/CGxDeviceD3d.cpp index 4bd3739..82f8207 100644 --- a/src/gx/d3d/CGxDeviceD3d.cpp +++ b/src/gx/d3d/CGxDeviceD3d.cpp @@ -408,7 +408,24 @@ int32_t CGxDeviceD3d::DeviceSetFormat(const CGxFormat& format) { } void CGxDeviceD3d::DeviceWM(EGxWM wm, uintptr_t param1, uintptr_t param2) { - // TODO + switch (wm) { + case GxWM_Size: { + if (param2 == 1 || param2 == 2) { + this->m_windowVisible = 0; + } else { + this->m_windowVisible = 1; + + auto& windowRect = *reinterpret_cast(param1); + this->DeviceSetDefWindow(windowRect); + + if (this->m_d3dDevice && this->m_context) { + // TODO + } + } + + break; + } + } } void CGxDeviceD3d::Draw(CGxBatch* batch, int32_t indexed) {