mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Remove rounded corners on emulation render window
On Windows 11, when playing windowed in a separate window/widget from the main emulator window, we don't want the window to have rounded corners, as it prevents the corner pixels from being visible
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include <Windows.h>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
#include <dwmapi.h>
|
||||
|
||||
#include "VideoCommon/Present.h"
|
||||
#include "resource.h"
|
||||
@ -180,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)
|
||||
|
Reference in New Issue
Block a user