[UI] Windows: Disable rounded corners
This commit is contained in:
parent
9c8e0cc53e
commit
5875f6ab31
|
@ -13,7 +13,7 @@ drivers.
|
||||||
* For Visual Studio 2022, MSBuild `v142` must be used due to a compiler bug; See [#2003](https://github.com/xenia-project/xenia/issues/2003).
|
* For Visual Studio 2022, MSBuild `v142` must be used due to a compiler bug; See [#2003](https://github.com/xenia-project/xenia/issues/2003).
|
||||||
* [Python 3.6+](https://www.python.org/downloads/)
|
* [Python 3.6+](https://www.python.org/downloads/)
|
||||||
* Ensure Python is in PATH.
|
* Ensure Python is in PATH.
|
||||||
* Windows 10 SDK version 10.0.19041.0 (for Visual Studio 2019, this or any newer version)
|
* Windows 11 SDK version 10.0.22000.0 (for Visual Studio 2019, this or any newer version)
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/xenia-project/xenia.git
|
git clone https://github.com/xenia-project/xenia.git
|
||||||
|
|
|
@ -225,8 +225,9 @@ workspace("xenia")
|
||||||
platforms({"Windows"})
|
platforms({"Windows"})
|
||||||
-- 10.0.15063.0: ID3D12GraphicsCommandList1::SetSamplePositions.
|
-- 10.0.15063.0: ID3D12GraphicsCommandList1::SetSamplePositions.
|
||||||
-- 10.0.19041.0: D3D12_HEAP_FLAG_CREATE_NOT_ZEROED.
|
-- 10.0.19041.0: D3D12_HEAP_FLAG_CREATE_NOT_ZEROED.
|
||||||
|
-- 10.0.22000.0: DWMWA_WINDOW_CORNER_PREFERENCE.
|
||||||
filter("action:vs2017")
|
filter("action:vs2017")
|
||||||
systemversion("10.0.19041.0")
|
systemversion("10.0.22000.0")
|
||||||
filter("action:vs2019")
|
filter("action:vs2019")
|
||||||
systemversion("10.0")
|
systemversion("10.0")
|
||||||
filter({})
|
filter({})
|
||||||
|
|
|
@ -21,5 +21,6 @@ project("xenia-ui")
|
||||||
|
|
||||||
filter("platforms:Windows")
|
filter("platforms:Windows")
|
||||||
links({
|
links({
|
||||||
"DXGI",
|
"dwmapi",
|
||||||
|
"dxgi",
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "xenia/ui/virtual_key.h"
|
#include "xenia/ui/virtual_key.h"
|
||||||
#include "xenia/ui/windowed_app_context_win.h"
|
#include "xenia/ui/windowed_app_context_win.h"
|
||||||
|
|
||||||
// For per-monitor DPI awareness v1.
|
|
||||||
#include <ShellScalingApi.h>
|
#include <ShellScalingApi.h>
|
||||||
|
#include <dwmapi.h>
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
@ -182,6 +182,14 @@ bool Win32Window::OpenImpl() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable rounded corners starting with Windows 11 (or silently receive and
|
||||||
|
// ignore E_INVALIDARG on Windows versions before 10.0.22000.0), primarily to
|
||||||
|
// preserve all pixels of the guest output.
|
||||||
|
DWM_WINDOW_CORNER_PREFERENCE window_corner_preference = DWMWCP_DONOTROUND;
|
||||||
|
DwmSetWindowAttribute(hwnd_, DWMWA_WINDOW_CORNER_PREFERENCE,
|
||||||
|
&window_corner_preference,
|
||||||
|
sizeof(window_corner_preference));
|
||||||
|
|
||||||
// Disable flicks.
|
// Disable flicks.
|
||||||
ATOM atom = GlobalAddAtomW(L"MicrosoftTabletPenServiceProperty");
|
ATOM atom = GlobalAddAtomW(L"MicrosoftTabletPenServiceProperty");
|
||||||
const DWORD_PTR dwHwndTabletProperty =
|
const DWORD_PTR dwHwndTabletProperty =
|
||||||
|
|
|
@ -920,7 +920,7 @@ class BuildShadersCommand(Command):
|
||||||
print('ERROR: could not find 32-bit Program Files')
|
print('ERROR: could not find 32-bit Program Files')
|
||||||
return 1
|
return 1
|
||||||
windows_sdk_bin_path = os.path.join(
|
windows_sdk_bin_path = os.path.join(
|
||||||
program_files_path, 'Windows Kits/10/bin/10.0.19041.0/x64')
|
program_files_path, 'Windows Kits/10/bin/10.0.22000.0/x64')
|
||||||
if not os.path.exists(windows_sdk_bin_path):
|
if not os.path.exists(windows_sdk_bin_path):
|
||||||
print('ERROR: could not find Windows 10 SDK binaries')
|
print('ERROR: could not find Windows 10 SDK binaries')
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue