Compare commits

..

2 Commits

Author SHA1 Message Date
752f2ebe2c
support loading tox save path form file
Some checks failed
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousDelivery / linux-ubuntu (push) Failing after 4m29s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m28s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m28s
ContinuousIntegration / linux (push) Successful in 3m42s
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m14s
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m4s
2024-06-16 11:56:34 +02:00
a47d607a8d
enable dpi/display scaling/display density awareness 2024-06-16 11:19:54 +02:00
2 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include "./sys_check.hpp" #include "./sys_check.hpp"
#include "./start_screen.hpp" #include "./start_screen.hpp"
#include "SDL3/SDL_video.h"
#include <filesystem> #include <filesystem>
#include <memory> #include <memory>
@ -51,7 +52,7 @@ int main(int argc, char** argv) {
// more RAII // more RAII
std::unique_ptr<SDL_Window, decltype(&SDL_DestroyWindow)> window { std::unique_ptr<SDL_Window, decltype(&SDL_DestroyWindow)> window {
SDL_CreateWindow("tomato", 1280, 720, SDL_WINDOW_RESIZABLE), SDL_CreateWindow("tomato", 1280, 720, SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY),
&SDL_DestroyWindow &SDL_DestroyWindow
}; };

View File

@ -50,6 +50,12 @@ StartScreen::StartScreen(const std::vector<std::string_view>& args, SDL_Renderer
} }
} }
{ // seed tox save path
if (_conf.has_string("tox", "save_file_path")) {
_tox_profile_path = _conf.get_string("tox", "save_file_path").value();
}
}
float display_scale = SDL_GetWindowDisplayScale(SDL_GetRenderWindow(renderer)); float display_scale = SDL_GetWindowDisplayScale(SDL_GetRenderWindow(renderer));
if (display_scale < 0.001f) { if (display_scale < 0.001f) {
// error? // error?