mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 08:20:02 -05:00
fix: Gate Wayland check to good distros that update their dependencies
This commit is contained in:
@@ -1045,11 +1045,14 @@ namespace hex {
|
|||||||
|
|
||||||
// Wayland auto-maximizes windows that take up 80% or more of the monitor size
|
// Wayland auto-maximizes windows that take up 80% or more of the monitor size
|
||||||
// Limit the size to take up slightly less than that at max
|
// Limit the size to take up slightly less than that at max
|
||||||
if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
|
// glfwGetPlatform() is only available since GLFW 3.4
|
||||||
const static auto SizeMultiplier = sqrt(0.79);
|
#if GLFW_VERSION_MAJOR >= 3 || (GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4)
|
||||||
maxWindowCreationWidth *= SizeMultiplier;
|
if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
|
||||||
maxWindowCreationHeight *= SizeMultiplier;
|
const static auto SizeMultiplier = sqrt(0.79);
|
||||||
}
|
maxWindowCreationWidth *= SizeMultiplier;
|
||||||
|
maxWindowCreationHeight *= SizeMultiplier;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
maxWindowCreationWidth -= 50_scaled;
|
maxWindowCreationWidth -= 50_scaled;
|
||||||
maxWindowCreationHeight -= 50_scaled;
|
maxWindowCreationHeight -= 50_scaled;
|
||||||
|
|||||||
Reference in New Issue
Block a user