about summary refs log tree commit diff
path: root/src/game/client/components
diff options
context:
space:
mode:
authorChoupom <andycootlapin@hotmail.fr>2011-06-01 19:27:36 +0200
committeroy <Tom_Adams@web.de>2011-06-02 17:36:17 +0200
commit101d9de3c3371a904b3a6e49e8b48f746d2cfbbb (patch)
tree4b9d537a6f768f78908b12b8b03fb38c46be6cb7 /src/game/client/components
parent9f323857af6316ee183d928107033d82a6459f2b (diff)
downloadzcatch-101d9de3c3371a904b3a6e49e8b48f746d2cfbbb.tar.gz
zcatch-101d9de3c3371a904b3a6e49e8b48f746d2cfbbb.zip
added aspect ratio in display modes list in settings
Diffstat (limited to 'src/game/client/components')
-rw-r--r--src/game/client/components/menus_settings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp
index 28f3559d..0a26a087 100644
--- a/src/game/client/components/menus_settings.cpp
+++ b/src/game/client/components/menus_settings.cpp
@@ -627,7 +627,8 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
 	// display mode list
 	static float s_ScrollValue = 0;
 	int OldSelected = -1;
-	str_format(aBuf, sizeof(aBuf), "%s: %dx%d %d bit", Localize("Current"), s_GfxScreenWidth, s_GfxScreenHeight, s_GfxColorDepth);
+	int G = gcd(s_GfxScreenWidth, s_GfxScreenHeight);
+	str_format(aBuf, sizeof(aBuf), "%s: %dx%d %d bit (%d:%d)", Localize("Current"), s_GfxScreenWidth, s_GfxScreenHeight, s_GfxColorDepth, s_GfxScreenWidth/G, s_GfxScreenHeight/G);
 	UiDoListboxStart(&s_NumNodes , &ModeList, 24.0f, Localize("Display Modes"), aBuf, s_NumNodes, 1, OldSelected, s_ScrollValue);
 
 	for(int i = 0; i < s_NumNodes; ++i)
@@ -643,7 +644,8 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
 		CListboxItem Item = UiDoListboxNextItem(&s_aModes[i], OldSelected == i);
 		if(Item.m_Visible)
 		{
-			str_format(aBuf, sizeof(aBuf), " %dx%d %d bit", s_aModes[i].m_Width, s_aModes[i].m_Height, Depth);
+			int G = gcd(s_aModes[i].m_Width, s_aModes[i].m_Height);
+			str_format(aBuf, sizeof(aBuf), " %dx%d %d bit (%d:%d)", s_aModes[i].m_Width, s_aModes[i].m_Height, Depth, s_aModes[i].m_Width/G, s_aModes[i].m_Height/G);
 			UI()->DoLabelScaled(&Item.m_Rect, aBuf, 16.0f, -1);
 		}
 	}