fix: Properly detect Windows 10
This commit is contained in:
parent
3a888d48df
commit
242b100aa3
@ -28,6 +28,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <shellapi.h>
|
||||
#include <timeapi.h>
|
||||
#include <VersionHelpers.h>
|
||||
|
||||
namespace hex {
|
||||
|
||||
@ -389,8 +390,7 @@ namespace hex {
|
||||
|
||||
// Windows versions before Windows 10 have issues with transparent framebuffers
|
||||
// causing the entire window to be slightly transparent ignoring all configurations
|
||||
OSVERSIONINFOA versionInfo = { };
|
||||
if (::GetVersionExA(&versionInfo) && versionInfo.dwMajorVersion >= 10) {
|
||||
if (::IsWindows10OrGreater()) {
|
||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
||||
} else {
|
||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE);
|
||||
|
@ -924,7 +924,6 @@ namespace hex {
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
|
||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
||||
|
||||
if (initialWindowProperties.has_value()) {
|
||||
glfwWindowHint(GLFW_MAXIMIZED, initialWindowProperties->maximized);
|
||||
|
10
resources/dist/windows/imhex.manifest
vendored
10
resources/dist/windows/imhex.manifest
vendored
@ -7,4 +7,12 @@
|
||||
<consoleAllocationPolicy xmlns="http://schemas.microsoft.com/SMI/2024/WindowsSettings">detached</consoleAllocationPolicy>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10, version 1903 -->
|
||||
<maxversiontested Id="10.0.18362.1"/>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
Loading…
x
Reference in New Issue
Block a user