From 48d81f9324009e1f61a4f71fc4506a48c7e6eaf8 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Fri, 13 Jun 2025 06:29:04 +0200 Subject: [PATCH] Allow software renderer to not be the first (#297) --- LEGO1/mxdirectx/legodxinfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LEGO1/mxdirectx/legodxinfo.cpp b/LEGO1/mxdirectx/legodxinfo.cpp index acd1d766..3cc66b56 100644 --- a/LEGO1/mxdirectx/legodxinfo.cpp +++ b/LEGO1/mxdirectx/legodxinfo.cpp @@ -169,18 +169,17 @@ int LegoDeviceEnumerate::GetBestDevice() return -1; } - int i = 0; int j = 0; int k = -1; - for (list::iterator it = m_list.begin(); it != m_list.end(); it++, i++) { + for (list::iterator it = m_list.begin(); it != m_list.end(); it++) { MxDriver& driver = *it; for (list::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; }