mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch to allow to set default display frequency in registry.
This commit is contained in:
parent
3aa9934386
commit
58cd8f2507
@ -34,12 +34,13 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [12]:**
|
||||
**Bug fixes and features included in the next upcoming release [13]:**
|
||||
|
||||
* Add partial implementation of ITfThreadMgrEx_ActivateEx ([Wine Bug #39564](https://bugs.winehq.org/show_bug.cgi?id=39564))
|
||||
* Add stub kernel32.FreeUserPhysicalPages ([Wine Bug #39543](https://bugs.winehq.org/show_bug.cgi?id=39543))
|
||||
* Add stubs for advapi32.RegCreateKeyTransacted[A/W]
|
||||
* Allow dinput EnumDevices callback with broken calling convention ([Wine Bug #27664](https://bugs.winehq.org/show_bug.cgi?id=27664))
|
||||
* Allow to specify default display frequency in registry
|
||||
* CompareString should abort on first non-matching character ([Wine Bug #37556](https://bugs.winehq.org/show_bug.cgi?id=37556))
|
||||
* Do not require SeBackupPrivilege in load_registry and unload_registry ([Wine Bug #28729](https://bugs.winehq.org/show_bug.cgi?id=28729))
|
||||
* Implement marshalling for TKIND_COCLASS ([Wine Bug #19016](https://bugs.winehq.org/show_bug.cgi?id=19016))
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -15,6 +15,8 @@ wine-staging (1.7.55) UNRELEASED; urgency=low
|
||||
* Added patch to implement stubless proxies on x86_64.
|
||||
* Added patch to allow dinput EnumDevices callback with broken calling
|
||||
convention.
|
||||
* Added patch to allow to set default display frequency in registry (fixes
|
||||
Wine Staging Bug #609).
|
||||
* Remove disabled shell32-Quoted_ShellExecute patchset (bug already fixed and
|
||||
all tests pass).
|
||||
* Remove disabled reg-Cleanup patchset (only cleanup and not actively
|
||||
|
@ -319,6 +319,7 @@ patch_enable_all ()
|
||||
enable_winepulse_PulseAudio_Support="$1"
|
||||
enable_winex11_CandidateWindowPos="$1"
|
||||
enable_winex11_Clipboard_HTML="$1"
|
||||
enable_winex11_DefaultDisplayFrequency="$1"
|
||||
enable_winex11_Window_Groups="$1"
|
||||
enable_winex11_Window_Style="$1"
|
||||
enable_winex11_XEMBED="$1"
|
||||
@ -1065,6 +1066,9 @@ patch_enable ()
|
||||
winex11-Clipboard_HTML)
|
||||
enable_winex11_Clipboard_HTML="$2"
|
||||
;;
|
||||
winex11-DefaultDisplayFrequency)
|
||||
enable_winex11_DefaultDisplayFrequency="$2"
|
||||
;;
|
||||
winex11-Window_Groups)
|
||||
enable_winex11_Window_Groups="$2"
|
||||
;;
|
||||
@ -6415,6 +6419,18 @@ if test "$enable_winex11_Clipboard_HTML" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winex11-DefaultDisplayFrequency
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winex11.drv/settings.c, dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c
|
||||
# |
|
||||
if test "$enable_winex11_DefaultDisplayFrequency" -eq 1; then
|
||||
patch_apply winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "winex11.drv: Allow to select default display frequency in registry key.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winex11-Window_Groups
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,137 @@
|
||||
From 564a5198eae9dc64f53c1507aa823cd4f73266da Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 5 Nov 2015 14:33:48 +0100
|
||||
Subject: winex11.drv: Allow to select default display frequency in registry
|
||||
key.
|
||||
|
||||
When an application doesn't request a specific display frequency, Wine
|
||||
currently just picks the first one. Most of the time this is fine, but
|
||||
there is no way to switch to a different frequency. This patch adds a
|
||||
registry key (of type STRING) to select the default display frequency:
|
||||
|
||||
HKCU\Software\Wine\X11 Driver\DefaultDisplayFrequency
|
||||
---
|
||||
dlls/winex11.drv/settings.c | 51 +++++++++++++++++++++++++++++-------------
|
||||
dlls/winex11.drv/x11drv.h | 1 +
|
||||
dlls/winex11.drv/x11drv_main.c | 4 ++++
|
||||
3 files changed, 40 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c
|
||||
index afa26cf..33bcddc 100644
|
||||
--- a/dlls/winex11.drv/settings.c
|
||||
+++ b/dlls/winex11.drv/settings.c
|
||||
@@ -342,7 +342,7 @@ static const char * _DM_fields(DWORD fields)
|
||||
LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
|
||||
HWND hwnd, DWORD flags, LPVOID lpvoid )
|
||||
{
|
||||
- DWORD i, dwBpp = 0;
|
||||
+ DWORD i, mode, dwBpp = 0;
|
||||
DEVMODEW dm;
|
||||
BOOL def_mode = TRUE;
|
||||
|
||||
@@ -387,6 +387,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
|
||||
return DISP_CHANGE_BADMODE;
|
||||
}
|
||||
|
||||
+ mode = ENUM_CURRENT_SETTINGS;
|
||||
for (i = 0; i < dd_mode_count; i++)
|
||||
{
|
||||
if (devmode->dmFields & DM_BITSPERPEL)
|
||||
@@ -404,27 +405,45 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
|
||||
if (devmode->dmPelsHeight != dd_modes[i].height)
|
||||
continue;
|
||||
}
|
||||
- if ((devmode->dmFields & DM_DISPLAYFREQUENCY) && (dd_modes[i].refresh_rate != 0) &&
|
||||
+ if ((devmode->dmFields & DM_DISPLAYFREQUENCY) &&
|
||||
devmode->dmDisplayFrequency != 0)
|
||||
{
|
||||
- if (devmode->dmDisplayFrequency != dd_modes[i].refresh_rate)
|
||||
+ if (dd_modes[i].refresh_rate != 0 &&
|
||||
+ devmode->dmDisplayFrequency != dd_modes[i].refresh_rate)
|
||||
continue;
|
||||
}
|
||||
- /* we have a valid mode */
|
||||
- TRACE("Requested display settings match mode %d (%s)\n", i, handler_name);
|
||||
-
|
||||
- if (flags & CDS_UPDATEREGISTRY)
|
||||
- write_registry_settings(devmode);
|
||||
+ else if (default_display_frequency != 0)
|
||||
+ {
|
||||
+ if (dd_modes[i].refresh_rate != 0 &&
|
||||
+ default_display_frequency == dd_modes[i].refresh_rate)
|
||||
+ {
|
||||
+ TRACE("Found display mode %d with default frequency (%s)\n", i, handler_name);
|
||||
+ mode = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (!(flags & (CDS_TEST | CDS_NORESET)))
|
||||
- return pSetCurrentMode(i);
|
||||
+ if (mode == ENUM_CURRENT_SETTINGS)
|
||||
+ mode = i;
|
||||
+ }
|
||||
|
||||
- return DISP_CHANGE_SUCCESSFUL;
|
||||
+ if (mode == ENUM_CURRENT_SETTINGS)
|
||||
+ {
|
||||
+ /* no valid modes found */
|
||||
+ ERR("No matching mode found %ux%ux%u @%u! (%s)\n",
|
||||
+ devmode->dmPelsWidth, devmode->dmPelsHeight,
|
||||
+ devmode->dmBitsPerPel, devmode->dmDisplayFrequency, handler_name);
|
||||
+ return DISP_CHANGE_BADMODE;
|
||||
}
|
||||
|
||||
- /* no valid modes found */
|
||||
- ERR("No matching mode found %ux%ux%u @%u! (%s)\n",
|
||||
- devmode->dmPelsWidth, devmode->dmPelsHeight,
|
||||
- devmode->dmBitsPerPel, devmode->dmDisplayFrequency, handler_name);
|
||||
- return DISP_CHANGE_BADMODE;
|
||||
+ /* we have a valid mode */
|
||||
+ TRACE("Requested display settings match mode %d (%s)\n", mode, handler_name);
|
||||
+
|
||||
+ if (flags & CDS_UPDATEREGISTRY)
|
||||
+ write_registry_settings(devmode);
|
||||
+
|
||||
+ if (!(flags & (CDS_TEST | CDS_NORESET)))
|
||||
+ return pSetCurrentMode(mode);
|
||||
+
|
||||
+ return DISP_CHANGE_SUCCESSFUL;
|
||||
}
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 2694d23..e3176f3 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -378,6 +378,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN;
|
||||
extern int primary_monitor DECLSPEC_HIDDEN;
|
||||
extern int copy_default_colors DECLSPEC_HIDDEN;
|
||||
extern int alloc_system_colors DECLSPEC_HIDDEN;
|
||||
+extern int default_display_frequency DECLSPEC_HIDDEN;
|
||||
extern int xrender_error_base DECLSPEC_HIDDEN;
|
||||
extern HMODULE x11drv_module DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index d4f5c84..a8f4b4e 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -81,6 +81,7 @@ BOOL client_side_with_render = TRUE;
|
||||
BOOL shape_layered_windows = TRUE;
|
||||
int copy_default_colors = 128;
|
||||
int alloc_system_colors = 256;
|
||||
+int default_display_frequency = 0;
|
||||
DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
|
||||
int xrender_error_base = 0;
|
||||
HMODULE x11drv_module = 0;
|
||||
@@ -411,6 +412,9 @@ static void setup_options(void)
|
||||
if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) ))
|
||||
alloc_system_colors = atoi(buffer);
|
||||
|
||||
+ if (!get_config_key( hkey, appkey, "DefaultDisplayFrequency", buffer, sizeof(buffer) ))
|
||||
+ default_display_frequency = atoi(buffer);
|
||||
+
|
||||
get_config_key( hkey, appkey, "InputStyle", input_style, sizeof(input_style) );
|
||||
|
||||
if (appkey) RegCloseKey( appkey );
|
||||
--
|
||||
2.6.2
|
||||
|
1
patches/winex11-DefaultDisplayFrequency/definition
Normal file
1
patches/winex11-DefaultDisplayFrequency/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: Allow to specify default display frequency in registry
|
Loading…
Reference in New Issue
Block a user