Route preference reads through adapter

This commit is contained in:
2026-06-12 17:30:27 +02:00
parent 14a3721e0d
commit 59dd010b5a
8 changed files with 74 additions and 20 deletions

View File

@@ -802,22 +802,22 @@ int main(int argc, char** argv)
GetDpiForMonitor_fn(monitor, MDT_EFFECTIVE_DPI, &x, &y);
App::I->display_density = (float)x / 96.f;
if (Settings::has("ui-scale"))
App::I->zoom = Settings::value<Serializer::Float>("ui-scale");
if (pp::panopainter::has_legacy_preference("ui-scale"))
App::I->zoom = pp::panopainter::legacy_float_preference("ui-scale");
else
App::I->zoom = (float)x / 96.f;
int show_cmd = SW_NORMAL;
Settings::value<Serializer::Integer>("window-show-cmd", show_cmd);
show_cmd = pp::panopainter::legacy_integer_preference_or("window-show-cmd", show_cmd);
DWORD wnd_style = WS_OVERLAPPEDWINDOW;
//if (show_cmd == SW_MAXIMIZE)
// wnd_style != WS_MAXIMIZE;
RECT clientRect = { 0, 0, (int)App::I->width * App::I->zoom, (int)App::I->height * App::I->zoom };
POINT clientPos = { CW_USEDEFAULT, CW_USEDEFAULT };
if (Settings::has("window-rect"))
if (pp::panopainter::has_legacy_preference("window-rect"))
{
auto wnd_rect = Settings::value<Serializer::IVec4>("window-rect");
auto wnd_rect = pp::panopainter::legacy_ivec4_preference("window-rect");
App::I->width = wnd_rect.z - wnd_rect.x;
App::I->height = wnd_rect.w - wnd_rect.y;
clientRect = { wnd_rect.x, wnd_rect.y, wnd_rect.z, wnd_rect.w };