Merge pull request #4457 from RangeeGmbH/fix_custom_sizes

Fix /size: /w: /h: with /monitors: (Fix custom sizes)
This commit is contained in:
akallabeth 2018-04-04 10:35:47 +02:00 committed by GitHub
commit b37a98182d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
* Copyright 2017 David Fort <contact@hardening-consulting.com>
* Copyright 2018 Kai Harms <kharms@rangee.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -281,6 +282,11 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
*pMaxHeight = (xfc->workArea.height * settings->PercentScreen) / 100;
}
}
else if (settings->DesktopWidth && settings->DesktopHeight)
{
*pMaxWidth = settings->DesktopWidth;
*pMaxHeight = settings->DesktopHeight;
}
if (!settings->Fullscreen && !settings->Workarea && !settings->UseMultimon)
goto out;