Don't require GLFW 3.3.

This commit is contained in:
Bartosz Taudul 2020-09-26 12:26:18 +02:00
parent e3d690df63
commit 1d106097e3
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -9,7 +9,7 @@ a mistake.
v0.x.x (xxxx-xx-xx) v0.x.x (xxxx-xx-xx)
------------------- -------------------
- Properly support DPI scaling on Linux. - Properly support DPI scaling on Linux (requires GLFW 3.3).
- Added early checks for output file validity in the capture utility. - Added early checks for output file validity in the capture utility.
- Improvements to presence broadcast handling. - Improvements to presence broadcast handling.
- Custom zone colors can be optionally ignored. - Custom zone colors can be optionally ignored.

View File

@ -278,6 +278,7 @@ int main( int argc, char** argv )
if( dll != INVALID_HANDLE_VALUE ) getDpiForSystem = (GDFS)GetProcAddress(dll, "GetDpiForSystem"); if( dll != INVALID_HANDLE_VALUE ) getDpiForSystem = (GDFS)GetProcAddress(dll, "GetDpiForSystem");
if( getDpiForSystem ) dpiScale = getDpiForSystem() / 96.f; if( getDpiForSystem ) dpiScale = getDpiForSystem() / 96.f;
#elif defined __linux__ #elif defined __linux__
# if GLFW_VERSION_MAJOR > 3 || ( GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 3 )
auto monitor = glfwGetWindowMonitor( window ); auto monitor = glfwGetWindowMonitor( window );
if( !monitor ) monitor = glfwGetPrimaryMonitor(); if( !monitor ) monitor = glfwGetPrimaryMonitor();
if( monitor ) if( monitor )
@ -286,6 +287,7 @@ int main( int argc, char** argv )
glfwGetMonitorContentScale( monitor, &x, &y ); glfwGetMonitorContentScale( monitor, &x, &y );
dpiScale = x; dpiScale = x;
} }
# endif
#endif #endif
// Setup ImGui binding // Setup ImGui binding