mirror of https://github.com/WerWolv/ImHex
fix: Properly detect Windows 10
This commit is contained in:
parent
3a888d48df
commit
242b100aa3
|
|
@ -28,6 +28,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <timeapi.h>
|
#include <timeapi.h>
|
||||||
|
#include <VersionHelpers.h>
|
||||||
|
|
||||||
namespace hex {
|
namespace hex {
|
||||||
|
|
||||||
|
|
@ -389,8 +390,7 @@ namespace hex {
|
||||||
|
|
||||||
// Windows versions before Windows 10 have issues with transparent framebuffers
|
// Windows versions before Windows 10 have issues with transparent framebuffers
|
||||||
// causing the entire window to be slightly transparent ignoring all configurations
|
// causing the entire window to be slightly transparent ignoring all configurations
|
||||||
OSVERSIONINFOA versionInfo = { };
|
if (::IsWindows10OrGreater()) {
|
||||||
if (::GetVersionExA(&versionInfo) && versionInfo.dwMajorVersion >= 10) {
|
|
||||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
||||||
} else {
|
} else {
|
||||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE);
|
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE);
|
||||||
|
|
|
||||||
|
|
@ -924,7 +924,6 @@ namespace hex {
|
||||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||||
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
||||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
|
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
|
||||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
|
||||||
|
|
||||||
if (initialWindowProperties.has_value()) {
|
if (initialWindowProperties.has_value()) {
|
||||||
glfwWindowHint(GLFW_MAXIMIZED, initialWindowProperties->maximized);
|
glfwWindowHint(GLFW_MAXIMIZED, initialWindowProperties->maximized);
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,12 @@
|
||||||
<consoleAllocationPolicy xmlns="http://schemas.microsoft.com/SMI/2024/WindowsSettings">detached</consoleAllocationPolicy>
|
<consoleAllocationPolicy xmlns="http://schemas.microsoft.com/SMI/2024/WindowsSettings">detached</consoleAllocationPolicy>
|
||||||
</windowsSettings>
|
</windowsSettings>
|
||||||
</application>
|
</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…
Reference in New Issue