This commit is contained in:
Christian Semmler 2024-01-04 13:59:18 -05:00
parent 043c30e4d5
commit 8a56b1c50b

View File

@ -176,8 +176,9 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerator, MxDriver* p_dr
for (list<MxDevice>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) { for (list<MxDevice>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) {
MxDevice& device = *it2; MxDevice& device = *it2;
if (&device != p_device)
continue;
if (&device == p_device) {
memcpy(&deviceModeFinder->m_guid, device.m_guid, sizeof(deviceModeFinder->m_guid)); memcpy(&deviceModeFinder->m_guid, device.m_guid, sizeof(deviceModeFinder->m_guid));
D3DDEVICEDESC* desc; D3DDEVICEDESC* desc;
@ -191,7 +192,7 @@ BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerator, MxDriver* p_dr
memcpy(&deviceModeFinder->m_desc, desc, sizeof(deviceModeFinder->m_desc)); memcpy(&deviceModeFinder->m_desc, desc, sizeof(deviceModeFinder->m_desc));
m_pDeviceModeFinder = deviceModeFinder; m_pDeviceModeFinder = deviceModeFinder;
m_pCurrentDeviceModesList = deviceModeFinder->m_deviceInfo; m_pCurrentDeviceModesList = deviceModeFinder->m_deviceInfo;
} break;
} }
} }