Allow software renderer to not be the first (#297)

This commit is contained in:
Anders Jenbo 2025-06-13 06:29:04 +02:00 committed by GitHub
parent 2e7d453881
commit 48d81f9324
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,18 +169,17 @@ int LegoDeviceEnumerate::GetBestDevice()
return -1;
}
int i = 0;
int j = 0;
int k = -1;
for (list<MxDriver>::iterator it = m_list.begin(); it != m_list.end(); it++, i++) {
for (list<MxDriver>::iterator it = m_list.begin(); it != m_list.end(); it++) {
MxDriver& driver = *it;
for (list<Direct3DDeviceInfo>::iterator it2 = driver.m_devices.begin(); it2 != driver.m_devices.end(); it2++) {
if ((*it2).m_HWDesc.dcmColorModel != D3DCOLOR_NONE) {
return j;
}
else if ((*it2).m_HELDesc.dcmColorModel != D3DCOLOR_NONE && i == 0) {
else if ((*it2).m_HELDesc.dcmColorModel != D3DCOLOR_NONE) {
k = j;
}