Route dialog and window preferences through adapter

This commit is contained in:
2026-06-12 17:24:14 +02:00
parent be4f5b0a31
commit 14a3721e0d
5 changed files with 31 additions and 10 deletions

View File

@@ -9,6 +9,7 @@
#include "keymap.h"
#include "hmd.h"
#include "legacy_gl_runtime_dispatch.h"
#include "legacy_preference_storage.h"
#include "renderer_gl/opengl_capabilities.h"
#include "platform_windows/windows_platform_services.h"
#include "../resource.h"
@@ -617,9 +618,12 @@ void win32_save_window_state()
{
WINDOWPLACEMENT p;
GetWindowPlacement(hWnd, &p);
Settings::set("window-show-cmd", Serializer::Integer(p.showCmd));
Settings::set("window-rect", Serializer::IVec4({ p.rcNormalPosition.left,
p.rcNormalPosition.top, p.rcNormalPosition.right, p.rcNormalPosition.bottom }));
pp::panopainter::set_legacy_integer_preference("window-show-cmd", p.showCmd);
pp::panopainter::set_legacy_ivec4_preference("window-rect", {
p.rcNormalPosition.left,
p.rcNormalPosition.top,
p.rcNormalPosition.right,
p.rcNormalPosition.bottom });
}
HBITMAP image_to_hbitmap(const Image& img)