Browse Source

Add explicit cast for LogicalToOutput

In practice this function is only called with int arguments, can probably change the specialisation to std::is_integral<T>
pull/2307/head
ephphatha 5 years ago committed by Anders Jenbo
parent
commit
d3c36166df
  1. 4
      Source/utils/display.h

4
Source/utils/display.h

@ -89,8 +89,8 @@ void LogicalToOutput(T *x, T *y)
float scaleX;
SDL_RenderGetScale(renderer, &scaleX, NULL);
*x *= scaleX;
*y *= scaleX;
*x = static_cast<T>(*x * scaleX);
*y = static_cast<T>(*x * scaleX);
#else
if (!OutputRequiresScaling())
return;

Loading…
Cancel
Save