diff --git a/Source/Render/DX7/DirectDrawEnumeration.cpp b/Source/Render/DX7/DirectDrawEnumeration.cpp index 79ca1ba4e..5477a4aa0 100644 --- a/Source/Render/DX7/DirectDrawEnumeration.cpp +++ b/Source/Render/DX7/DirectDrawEnumeration.cpp @@ -160,10 +160,8 @@ HRESULT CALLBACK DirectDrawEnumeration::Device(char*, char* name, D3DDEVICEDESC7 } for (unsigned index = 0; index < record.modeCount; ++index) { - const auto& mode = record.modes[index]; - - if (mode.dwWidth == 1024 && mode.dwHeight == 768 && mode.ddpfPixelFormat.dwRGBBitCount == 16) { - record.selectedMode = mode; + if (record.modes[index].dwWidth == 1024 && record.modes[index].dwHeight == 768 && record.modes[index].ddpfPixelFormat.dwRGBBitCount == 16) { + record.selectedMode = record.modes[index]; record.selectedIndex = index; } } diff --git a/Source/Render/Text/TextContext.cpp b/Source/Render/Text/TextContext.cpp index 0eb34e5ac..10353f99c 100644 --- a/Source/Render/Text/TextContext.cpp +++ b/Source/Render/Text/TextContext.cpp @@ -75,7 +75,7 @@ void TextContext::SetFont(int family, int height, unsigned char bold, unsigned c family = 9; } else { family = 1; - if (g_serverLanguage && g_serverLanguage->alternateLanguage == 31) { + if (g_serverLanguage && 31 == g_serverLanguage->alternateLanguage) { family = 6; } } @@ -101,7 +101,7 @@ void TextContext::SetFont(int family, int height, unsigned char bold, unsigned c if (g_serviceType == 12) { height = (height - 2); } else if (g_serviceType == 18) { - if (g_serverLanguage->alternateLanguage == 31) { + if (31 == g_serverLanguage->alternateLanguage) { family = 6; } else { height = (height - 2);