This commit is contained in:
Nayla Hanegan 2024-05-12 02:17:59 -04:00
commit 98c174edc4
520 changed files with 74815 additions and 58942 deletions

View file

@ -8,10 +8,12 @@
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/State.h"
#include "Core/System.h"
#include <Windows.h>
#include <climits>
#include <cstdio>
#include <dwmapi.h>
#include "VideoCommon/Present.h"
#include "resource.h"
@ -123,7 +125,7 @@ void PlatformWin32::MainLoop()
while (IsRunning())
{
UpdateRunningFlag();
Core::HostDispatchJobs();
Core::HostDispatchJobs(Core::System::GetInstance());
ProcessEvents();
UpdateWindowPosition();
@ -179,6 +181,18 @@ LRESULT PlatformWin32::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
return DefWindowProc(hwnd, msg, wParam, lParam);
}
case WM_CREATE:
{
if (hwnd)
{
// Remove rounded corners from the render window on Windows 11
const DWM_WINDOW_CORNER_PREFERENCE corner_preference = DWMWCP_DONOTROUND;
DwmSetWindowAttribute(hwnd, DWMWA_WINDOW_CORNER_PREFERENCE, &corner_preference,
sizeof(corner_preference));
}
}
break;
case WM_SIZE:
{
if (g_presenter)