1
0
forked from 0ad/0ad

Make scale variables constant

b4fbbed379

This was SVN commit r26307.
This commit is contained in:
Angen 2022-02-06 11:11:35 +00:00
parent 7e5e06bae8
commit 0a72a02ea0
3 changed files with 4 additions and 4 deletions

View File

@ -443,7 +443,7 @@ void CGUIText::Draw(CGUI& pGUI, CCanvas2D& canvas, const CGUIColor& DefaultColor
clipping.left = std::ceil(clipping.left);
clipping.right = std::floor(clipping.right);
float scale = g_VideoMode.GetScale();
const float scale = g_VideoMode.GetScale();
Renderer::Backend::GL::CDeviceCommandContext::ScissorRect scissorRect;
scissorRect.x = std::ceil(clipping.left * scale);
scissorRect.y = std::ceil(g_yres - clipping.bottom * scale);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,8 +18,8 @@
#include "precompiled.h"
#include "GUIMatrix.h"
#include "ps/VideoMode.h"
#include "maths/Matrix3D.h"
#include "ps/VideoMode.h"
extern int g_xres, g_yres;

View File

@ -1243,7 +1243,7 @@ void CInput::Draw(CCanvas2D& canvas)
if (cliparea != CRect())
{
float scale = g_VideoMode.GetScale();
const float scale = g_VideoMode.GetScale();
Renderer::Backend::GL::CDeviceCommandContext::ScissorRect scissorRect;
scissorRect.x = cliparea.left * scale;
scissorRect.y = g_yres - cliparea.bottom * scale;