mirror of https://github.com/OpenRCT2/OpenRCT2.git
Avoid unnecessary calculations when the passed DPI is the active DPI
This commit is contained in:
parent
ac2057775e
commit
114be0e62b
|
@ -1010,6 +1010,12 @@ void OpenGLDrawingContext::HandleTransparency()
|
|||
|
||||
void OpenGLDrawingContext::SetDPI(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
if (dpi == _dpi)
|
||||
{
|
||||
// Don't need to recalculate anything if identical.
|
||||
return;
|
||||
}
|
||||
|
||||
auto screenDPI = _engine->GetDPI();
|
||||
auto bytesPerRow = screenDPI->GetBytesPerRow();
|
||||
auto bitsOffset = static_cast<size_t>(dpi->bits - screenDPI->bits);
|
||||
|
|
Loading…
Reference in New Issue