2.2
This commit is contained in:
@@ -23,6 +23,7 @@ namespace anm2ed
|
||||
{
|
||||
constexpr auto WINDOW_4K_SIZE = glm::ivec2(3840, 2160);
|
||||
constexpr auto UI_SCALE_4K_DEFAULT = 1.5f;
|
||||
constexpr auto WINDOW_DEFAULT_SIZE_MULTIPLIER = 0.90f;
|
||||
|
||||
constexpr auto SOCKET_ADDRESS = "127.0.0.1";
|
||||
constexpr auto SOCKET_PORT = 11414;
|
||||
@@ -141,7 +142,8 @@ namespace anm2ed
|
||||
if (auto mode = SDL_GetCurrentDisplayMode(display))
|
||||
{
|
||||
if (mode->w >= WINDOW_4K_SIZE.x || mode->h >= WINDOW_4K_SIZE.y) settings.uiScale = UI_SCALE_4K_DEFAULT;
|
||||
SDL_SetWindowSize(window, mode->w - 1, mode->h - 1);
|
||||
settings.windowSize.x = mode->w * WINDOW_DEFAULT_SIZE_MULTIPLIER;
|
||||
settings.windowSize.y = mode->h * WINDOW_DEFAULT_SIZE_MULTIPLIER;
|
||||
}
|
||||
else
|
||||
logger.warning(std::format("Failed to query primary display mode: {}", SDL_GetError()));
|
||||
|
||||
Reference in New Issue
Block a user