UI+build: Isolate wxWidgets code from non-GUI code (#1633)

This commit is contained in:
SSimco 2025-07-15 05:28:41 +03:00 committed by GitHub
parent 5f3c2816ec
commit 67de63bed6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
199 changed files with 2414 additions and 2091 deletions

View file

@ -1,9 +1,9 @@
#include "gui/MainWindow.h"
#if BOOST_OS_WINDOWS
#include <Windows.h>
#include "WindowSystem.h"
typedef LONG NTSTATUS;
typedef UINT32 D3DKMT_HANDLE;
@ -53,7 +53,7 @@ public:
private:
bool HasMonitorChanged()
{
HWND hWnd = (HWND)g_mainFrame->GetRenderCanvasHWND();
HWND hWnd = (HWND)WindowSystem::GetWindowInfo().canvas_main.surface;
if (hWnd == 0)
return true;
HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
@ -71,9 +71,7 @@ private:
HRESULT GetAdapterHandleFromHwnd(D3DKMT_HANDLE* phAdapter, UINT* pOutput)
{
if (!g_mainFrame)
return E_FAIL;
HWND hWnd = (HWND)g_mainFrame->GetRenderCanvasHWND();
HWND hWnd = (HWND)WindowSystem::GetWindowInfo().canvas_main.surface;
if (hWnd == 0)
return E_FAIL;