Rebase against 92e6124a9855b1c398b2822c2679df4ec3e38b83.

This commit is contained in:
Alistair Leslie-Hughes
2025-09-11 08:23:25 +10:00
parent 342cfbc5de
commit e33772ec34
3 changed files with 26 additions and 165 deletions

View File

@@ -1,4 +1,4 @@
From b97b584a775bf22c19c94064a7321770764cf25e Mon Sep 17 00:00:00 2001
From 7dd9b89379ca86854dca7f79e6646f34fb20edd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 5 Jan 2023 21:16:38 +0100
Subject: [PATCH] winecfg: Move input config options to a dedicated tab.
@@ -18,17 +18,17 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605
create mode 100644 programs/winecfg/input.c
diff --git a/MAINTAINERS b/MAINTAINERS
index dc5c85cc4ec..a5902235be8 100644
index a4bc61073cc..b1c7e4c2e9b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -182,6 +182,7 @@ F: dlls/user32/input.c
@@ -188,6 +188,7 @@ F: dlls/user32/input.c
F: dlls/win32u/input.c
F: dlls/win32u/rawinput.c
F: server/queue.c
+F: programs/winecfg/input.c
Input methods
M: Rémi Bernon <rbernon@codeweavers.com>
M: Rémi Bernon <rbernon@codeweavers.com> @rbernon
diff --git a/programs/winecfg/Makefile.in b/programs/winecfg/Makefile.in
index 99c829a9468..1105a99e177 100644
--- a/programs/winecfg/Makefile.in
@@ -153,10 +153,10 @@ index 00000000000..115161b9040
+ return FALSE;
+}
diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c
index de5340c721f..819aaaf61e1 100644
index afecfd664a9..b733b11be5e 100644
--- a/programs/winecfg/main.c
+++ b/programs/winecfg/main.c
@@ -57,7 +57,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
@@ -58,7 +58,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
return 0;
}
@@ -165,7 +165,7 @@ index de5340c721f..819aaaf61e1 100644
static INT_PTR
doPropertySheet (HINSTANCE hInstance, HWND hOwner)
@@ -148,6 +148,16 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
@@ -149,6 +149,16 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
psp[pg].lParam = 0;
pg++;
@@ -304,10 +304,10 @@ index 428c477413c..1231e5319c5 100644
/* @makedep: winecfg.ico */
diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c
index 215cd6534a2..cd7b7552a1e 100644
index 9db8da5a4f4..bca9583c7f6 100644
--- a/programs/winecfg/x11drvdlg.c
+++ b/programs/winecfg/x11drvdlg.c
@@ -47,7 +47,7 @@ static const UINT dpi_values[] = { 96, 120, 144, 168, 192, 216, 240, 288, 336, 3
@@ -46,7 +46,7 @@ static const UINT dpi_values[] = { 96, 120, 144, 168, 192, 216, 240, 288, 336, 3
static BOOL updating_ui;
/* convert the x11 desktop key to the new explorer config */
@@ -316,7 +316,7 @@ index 215cd6534a2..cd7b7552a1e 100644
{
WCHAR *buf;
@@ -139,13 +139,6 @@ static void init_dialog(HWND dialog)
@@ -138,13 +138,6 @@ static void init_dialog(HWND dialog)
SendDlgItemMessageW(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
}
@@ -330,7 +330,7 @@ index 215cd6534a2..cd7b7552a1e 100644
buf = get_reg_key(config_key, keypath(L"X11 Driver"), L"Managed", L"Y");
if (IS_OPTION_TRUE(*buf))
CheckDlgButton(dialog, IDC_ENABLE_MANAGED, BST_CHECKED);
@@ -220,14 +213,6 @@ static void on_enable_decorated_clicked(HWND dialog) {
@@ -219,14 +212,6 @@ static void on_enable_decorated_clicked(HWND dialog) {
}
}
@@ -345,7 +345,7 @@ index 215cd6534a2..cd7b7552a1e 100644
static INT read_logpixels_reg(void)
{
DWORD dwLogPixels;
@@ -383,7 +368,6 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -381,7 +366,6 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case IDC_ENABLE_DESKTOP: on_enable_desktop_clicked(hDlg); break;
case IDC_ENABLE_MANAGED: on_enable_managed_clicked(hDlg); break;
case IDC_ENABLE_DECORATED: on_enable_decorated_clicked(hDlg); break;
@@ -354,5 +354,5 @@ index 215cd6534a2..cd7b7552a1e 100644
break;
}
--
2.42.0
2.51.0

View File

@@ -1,27 +1,18 @@
From da3cf82252881cb1e4315bd0ecb44bd27ee5520f Mon Sep 17 00:00:00 2001
From b15d46b4ddeddaea146f754ac5a618b8721deeee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 4 Mar 2016 16:15:50 +0100
Subject: [PATCH] winmm: Do not crash in Win 9X mode when an invalid device ptr
is passed to MCI_OPEN.
---
dlls/winmm/mci.c | 44 +++++++++++++++++++++-----------------------
1 file changed, 21 insertions(+), 23 deletions(-)
dlls/winmm/mci.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c
index 959801aa835..c56a69def11 100644
index 2048dd65a50..1df3430dc74 100644
--- a/dlls/winmm/mci.c
+++ b/dlls/winmm/mci.c
@@ -204,7 +204,7 @@ static LPWSTR MCI_strdupAtoW( LPCSTR str )
return ret;
}
-static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
+static DWORD MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
{
if (msg < DRV_RESERVED) return 0;
@@ -247,8 +247,12 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
@@ -247,6 +247,10 @@ static DWORD MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
MCI_ANIM_OPEN_PARMSW *mci_openW;
DWORD_PTR *ptr;
@@ -30,146 +21,16 @@ index 959801aa835..c56a69def11 100644
+ return MCIERR_MISSING_COMMAND_STRING;
+
ptr = malloc(sizeof(DWORD_PTR) + sizeof(*mci_openW));
- if (!ptr) return -1;
+ if (!ptr) return MCIERR_OUT_OF_MEMORY;
if (!ptr) return MCIERR_OUT_OF_MEMORY;
*ptr++ = *dwParam2; /* save the previous pointer */
*dwParam2 = (DWORD_PTR)ptr;
@@ -278,7 +282,7 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
if (HIWORD(dwParam1))
memcpy(&mci_openW->dwStyle, &mci_openA->dwStyle, sizeof(MCI_ANIM_OPEN_PARMSW) - sizeof(MCI_OPEN_PARMSW));
}
- return 1;
+ return 0;
case MCI_WINDOW:
if (dwParam1 & MCI_ANIM_WINDOW_TEXT)
@@ -286,8 +290,8 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
MCI_ANIM_WINDOW_PARMSA *mci_windowA = (MCI_ANIM_WINDOW_PARMSA *)*dwParam2;
MCI_ANIM_WINDOW_PARMSW *mci_windowW;
- mci_windowW = malloc(sizeof(*mci_windowW));
- if (!mci_windowW) return -1;
+ mci_windowW = malloc( sizeof(*mci_windowW));
+ if (!mci_windowW) return MCIERR_OUT_OF_MEMORY;
*dwParam2 = (DWORD_PTR)mci_windowW;
@@ -299,8 +303,6 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
mci_windowW->hWnd = mci_windowA->hWnd;
if (dwParam1 & MCI_ANIM_WINDOW_STATE)
mci_windowW->nCmdShow = mci_windowA->nCmdShow;
@@ -2288,7 +2292,6 @@ DWORD WINAPI mciSendCommandA(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1,
return ret;
}
ret = mciSendCommandW(wDevID, wMsg, dwParam1, dwParam2);
-
- return 1;
}
return 0;
@@ -312,7 +314,7 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
DWORD_PTR *ptr;
ptr = malloc(sizeof(*mci_sysinfoW) + sizeof(DWORD_PTR));
- if (!ptr) return -1;
+ if (!ptr) return MCIERR_OUT_OF_MEMORY;
*ptr++ = *dwParam2; /* save the previous pointer */
*dwParam2 = (DWORD_PTR)ptr;
@@ -326,7 +328,6 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
mci_sysinfoW->lpstrReturn = malloc(mci_sysinfoW->dwRetSize * sizeof(WCHAR));
mci_sysinfoW->dwNumber = mci_sysinfoA->dwNumber;
mci_sysinfoW->wDeviceType = mci_sysinfoA->wDeviceType;
- return 1;
}
return 0;
case MCI_INFO:
@@ -336,7 +337,7 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
DWORD_PTR *ptr;
ptr = malloc(sizeof(*mci_infoW) + sizeof(DWORD_PTR));
- if (!ptr) return -1;
+ if (!ptr) return MCIERR_OUT_OF_MEMORY;
*ptr++ = *dwParam2; /* save the previous pointer */
*dwParam2 = (DWORD_PTR)ptr;
@@ -350,8 +351,8 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
mci_infoW->lpstrReturn = malloc(mci_infoW->dwRetSize * sizeof(WCHAR));
if (dwParam1 & MCI_DGV_INFO_ITEM)
mci_infoW->dwItem = mci_infoA->dwItem;
- return 1;
}
+ return 0;
case MCI_SAVE:
case MCI_LOAD:
case MCI_CAPTURE:
@@ -361,7 +362,7 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
MCI_OVLY_LOAD_PARMSW *mci_loadW;
mci_loadW = malloc(sizeof(*mci_loadW));
- if (!mci_loadW) return -1;
+ if (!mci_loadW) return MCIERR_OUT_OF_MEMORY;
*dwParam2 = (DWORD_PTR)mci_loadW;
if (dwParam1 & MCI_NOTIFY)
@@ -372,8 +373,8 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
(MCI_CAPTURE == msg && dwParam1 & MCI_DGV_CAPTURE_AT) ||
(MCI_RESTORE == msg && dwParam1 & MCI_DGV_RESTORE_AT))
mci_loadW->rc = mci_loadA->rc;
- return 1;
}
+ return 0;
case MCI_SOUND:
case MCI_ESCAPE:
{ /* All these commands have the same layout: callback + string */
@@ -381,14 +382,14 @@ static int MCI_MapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR *dwParam2)
MCI_VD_ESCAPE_PARMSW *mci_vd_escapeW;
mci_vd_escapeW = malloc(sizeof(*mci_vd_escapeW));
- if (!mci_vd_escapeW) return -1;
+ if (!mci_vd_escapeW) return MCIERR_OUT_OF_MEMORY;
*dwParam2 = (DWORD_PTR)mci_vd_escapeW;
if (dwParam1 & MCI_NOTIFY)
mci_vd_escapeW->dwCallback = mci_vd_escapeA->dwCallback;
mci_vd_escapeW->lpstrCommand = MCI_strdupAtoW(mci_vd_escapeA->lpstrCommand);
- return 1;
}
+ return 0;
case MCI_SETAUDIO:
case MCI_SETVIDEO:
if (!(dwParam1 & (MCI_DGV_SETVIDEO_QUALITY | MCI_DGV_SETVIDEO_ALG
@@ -501,7 +502,6 @@ static void MCI_UnmapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR dwParam2,
break;
default:
- FIXME("Message %s needs unmapping\n", MCI_MessageToString(msg));
break;
}
}
@@ -2282,20 +2282,18 @@ DWORD WINAPI mciSendCommandW(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1,
DWORD WINAPI mciSendCommandA(MCIDEVICEID wDevID, UINT wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
DWORD ret;
- int mapped;
TRACE("(%08x, %s, %08Ix, %08Ix)\n",
wDevID, MCI_MessageToString(wMsg), dwParam1, dwParam2);
- mapped = MCI_MapMsgAtoW(wMsg, dwParam1, &dwParam2);
- if (mapped == -1)
+ ret = MCI_MapMsgAtoW(wMsg, dwParam1, &dwParam2);
+ if (ret)
{
FIXME("message %04x mapping failed\n", wMsg);
- return MCIERR_OUT_OF_MEMORY;
+ return ret;
}
- ret = mciSendCommandW(wDevID, wMsg, dwParam1, dwParam2);
- if (mapped)
- MCI_UnmapMsgAtoW(wMsg, dwParam1, dwParam2, ret);
+ ret = mciSendCommandW(wDevID, wMsg, dwParam1, dwParam2);
+ MCI_UnmapMsgAtoW(wMsg, dwParam1, dwParam2, ret);
MCI_UnmapMsgAtoW(wMsg, dwParam1, dwParam2, ret);
return ret;
}
--
2.40.1
2.51.0

View File

@@ -1 +1 @@
c20abdb856139f156ceab0afbb8454e0ad79f0a4
92e6124a9855b1c398b2822c2679df4ec3e38b83