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; }