From f2c44a8a4d9b5cf256056ecbd38ecf989d5f325d Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 3 Jun 2022 10:25:28 +1000 Subject: [PATCH] Added dwmapi-DwmGetCompositionTimingInfo patchset --- ...ompositionTimingInfo-supply-defaults.patch | 29 +++++++++++++++++++ .../definition | 1 + patches/patchinstall.sh | 16 ++++++++++ 3 files changed, 46 insertions(+) create mode 100644 patches/dwmapi-DwmGetCompositionTimingInfo/0001-dwmapi-DwmGetCompositionTimingInfo-supply-defaults.patch create mode 100644 patches/dwmapi-DwmGetCompositionTimingInfo/definition diff --git a/patches/dwmapi-DwmGetCompositionTimingInfo/0001-dwmapi-DwmGetCompositionTimingInfo-supply-defaults.patch b/patches/dwmapi-DwmGetCompositionTimingInfo/0001-dwmapi-DwmGetCompositionTimingInfo-supply-defaults.patch new file mode 100644 index 00000000..dcaaa97e --- /dev/null +++ b/patches/dwmapi-DwmGetCompositionTimingInfo/0001-dwmapi-DwmGetCompositionTimingInfo-supply-defaults.patch @@ -0,0 +1,29 @@ +From 5d231b5fb9c07a7d43db75370ea9b8e629946987 Mon Sep 17 00:00:00 2001 +From: Jactry Zeng +Date: Fri, 3 Jun 2022 10:22:50 +1000 +Subject: [PATCH] dwmapi: DwmGetCompositionTimingInfo supply defaults + +--- + dlls/dwmapi/dwmapi_main.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c +index 6bb086a87d1..339f05e1a30 100644 +--- a/dlls/dwmapi/dwmapi_main.c ++++ b/dlls/dwmapi/dwmapi_main.c +@@ -229,6 +229,12 @@ HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info) + memset(info, 0, info->cbSize); + info->cbSize = sizeof(DWM_TIMING_INFO); + ++ info->rateRefresh.uiDenominator = 1; ++ info->rateRefresh.uiNumerator = 64; ++ info->rateCompose.uiDenominator = 1; ++ info->rateCompose.uiNumerator = 64; ++ info->qpcRefreshPeriod = 156250; ++ + return S_OK; + } + +-- +2.35.1 + diff --git a/patches/dwmapi-DwmGetCompositionTimingInfo/definition b/patches/dwmapi-DwmGetCompositionTimingInfo/definition new file mode 100644 index 00000000..b6b85711 --- /dev/null +++ b/patches/dwmapi-DwmGetCompositionTimingInfo/definition @@ -0,0 +1 @@ +Fixes: [53038] - dwmapi: Supply some defaults values for DwmGetCompositionTimingInfo. diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e7ba4474..618e7dfb 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -108,6 +108,7 @@ patch_enable_all () enable_dinput_joy_mappings="$1" enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" + enable_dwmapi_DwmGetCompositionTimingInfo="$1" enable_dwrite_FontFallback="$1" enable_eventfd_synchronization="$1" enable_explorer_Video_Registry_Key="$1" @@ -348,6 +349,9 @@ patch_enable () dsound-Fast_Mixer) enable_dsound_Fast_Mixer="$2" ;; + dwmapi-DwmGetCompositionTimingInfo) + enable_dwmapi_DwmGetCompositionTimingInfo="$2" + ;; dwrite-FontFallback) enable_dwrite_FontFallback="$2" ;; @@ -1719,6 +1723,18 @@ if test "$enable_dsound_EAX" -eq 1; then patch_apply dsound-EAX/0023-dsound-Fake-success-for-EAX-Set-Buffer-ListenerPrope.patch fi +# Patchset dwmapi-DwmGetCompositionTimingInfo +# | +# | This patchset fixes the following Wine bugs: +# | * [#53038] - dwmapi: Supply some defaults values for DwmGetCompositionTimingInfo. +# | +# | Modified files: +# | * dlls/dwmapi/dwmapi_main.c +# | +if test "$enable_dwmapi_DwmGetCompositionTimingInfo" -eq 1; then + patch_apply dwmapi-DwmGetCompositionTimingInfo/0001-dwmapi-DwmGetCompositionTimingInfo-supply-defaults.patch +fi + # Patchset dwrite-FontFallback # | # | This patchset fixes the following Wine bugs: