diff --git a/src/main.cpp b/src/main.cpp index 162ceb9..0696d3d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,6 +57,14 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) "VSync could not be enabled; scrolling text may tear (VSync error: " + std::string(SDL_GetError()) + ")"); } + // Lock the renderer to a 1920x1080 logical coordinate space. All page + // layout code already targets this resolution, so everything renders at + // the correct size on any display — the GPU scales to native pixels. + if (!SDL_SetRenderLogicalPresentation(state->renderer, 1920, 1080, SDL_LOGICAL_PRESENTATION_STRETCH)) { + radiantwave::logger::Logger::instance().warning("Graphics", + "Could not set logical render size; layout may be wrong on HiDPI displays"); + } + SDL_HideCursor(); // Initialize configuration, database, and network manager