Skip to content

Commit

Permalink
FIX: enable HiDPI scaling on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
perroboc committed Sep 3, 2024
1 parent 96e39a7 commit 373b262
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ mono_crash.*.json
mono_crash.*.blob
Script/__pycache__/aceutils.cpython-37.pyc
Tool/fbxsdk

EffekseerTool/
6 changes: 6 additions & 0 deletions Dev/Cpp/EditorCommon/GUI/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ bool MainWindow::InitializeInternal(const char16_t* title, MainWindowState state
float yscale = 1.0f;
glfwGetMonitorContentScale(primary, &xscale, &yscale);
dpiScale_ = xscale;
#elif defined(__linux__)
GLFWmonitor* primary = glfwGetPrimaryMonitor();
float xscale = 1.0f;
float yscale = 1.0f;
glfwGetMonitorContentScale(primary, &xscale, &yscale);
dpiScale_ = xscale;
#endif

return true;
Expand Down
2 changes: 2 additions & 0 deletions Dev/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rm --force release/*.pdb
rm --force release/Effekseer
2 changes: 1 addition & 1 deletion Tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()

project(Tools)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)

if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
Expand Down
2 changes: 1 addition & 1 deletion docs/Development/HowToBuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Requirements
- [.Net6.0 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu)

- Required packages:
- Ubuntu: `libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity`
- Ubuntu: `libglfw3-dev libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity`
- On Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel glfw-devel gd-devel python3 dotnet zenity`

Get code and resources
Expand Down
Empty file modified release_tool.sh
100644 → 100755
Empty file.

0 comments on commit 373b262

Please sign in to comment.