From c68d1880295eb555d903f57006cba7abbe6916c9 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 24 Feb 2020 18:19:20 +0900 Subject: [PATCH] Disable DXGI handling of ALT+ENTER We manage fullscreen ourselves. --- src/duckstation-qt/d3d11displaywindow.cpp | 4 ++++ src/duckstation-sdl/d3d11_host_display.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/duckstation-qt/d3d11displaywindow.cpp b/src/duckstation-qt/d3d11displaywindow.cpp index 9b95a5d93..361d00647 100644 --- a/src/duckstation-qt/d3d11displaywindow.cpp +++ b/src/duckstation-qt/d3d11displaywindow.cpp @@ -241,6 +241,10 @@ bool D3D11DisplayWindow::createDeviceContext(QThread* worker_thread, bool debug_ } } + hr = dxgi_factory->MakeWindowAssociation(swap_chain_desc.OutputWindow, DXGI_MWA_NO_WINDOW_CHANGES); + if (FAILED(hr)) + Log_WarningPrintf("MakeWindowAssociation() to disable ALT+ENTER failed"); + if (debug_device) { ComPtr info; diff --git a/src/duckstation-sdl/d3d11_host_display.cpp b/src/duckstation-sdl/d3d11_host_display.cpp index 7e96a31a5..a03e4b81c 100644 --- a/src/duckstation-sdl/d3d11_host_display.cpp +++ b/src/duckstation-sdl/d3d11_host_display.cpp @@ -2,9 +2,9 @@ #include "common/assert.h" #include "common/d3d11/shader_compiler.h" #include "common/log.h" -#include "imgui_impl_sdl.h" #include "frontend-common/display_ps.hlsl.h" #include "frontend-common/display_vs.hlsl.h" +#include "imgui_impl_sdl.h" #include #include #include @@ -241,6 +241,10 @@ bool D3D11HostDisplay::CreateD3DDevice(bool debug_device) } } + hr = dxgi_factory->MakeWindowAssociation(swap_chain_desc.OutputWindow, DXGI_MWA_NO_WINDOW_CHANGES); + if (FAILED(hr)) + Log_WarningPrintf("MakeWindowAssociation() to disable ALT+ENTER failed"); + if (debug_device) { ComPtr info;