mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-10 04:55:20 +00:00
Remove global g_xres and x_yres
Instead query g_VideoMode where needed. As both g_xres and g_yres aren't global anymore remove static from UpdateRenderer. While at it use more desicriptive names: GetXRes -> GetWindowWidth, GetYRes -> GetWindowHeight. This reduces the amount of variables tracking width and height by one each. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
+1
-1
@@ -461,7 +461,7 @@ IGUIObject* CGUI::FindObjectUnderMouse()
|
||||
|
||||
CSize2D CGUI::GetWindowSize() const
|
||||
{
|
||||
return CSize2D{static_cast<float>(g_xres) / g_VideoMode.GetScale(), static_cast<float>(g_yres) / g_VideoMode.GetScale() };
|
||||
return CSize2D{static_cast<float>(g_VideoMode.GetWindowWidth()) / g_VideoMode.GetScale(), static_cast<float>(g_VideoMode.GetWindowHeight()) / g_VideoMode.GetScale() };
|
||||
}
|
||||
|
||||
void CGUI::SendFocusMessage(EGUIMessageType msgType)
|
||||
|
||||
Reference in New Issue
Block a user