Rebase against ccf6211c0ae6e86218f7e6c1f2fe725a23e568b9.

This commit is contained in:
Zebediah Figura 2018-08-16 23:11:33 -05:00
parent 06c1bde586
commit 93e4c328d7
20 changed files with 142 additions and 955 deletions

View File

@ -1 +0,0 @@
Depends: ml-patches

View File

@ -1 +1 @@
Fixes: [45327] Stop access volation in League of Legends
Fixes: [45568] League of Legends 8.12+ fails to start a game (anticheat engine, validation of loaded DLLs)

View File

@ -1,289 +0,0 @@
From fb031b7cf30e5258aa855019961bbdeafb3cfa78 Mon Sep 17 00:00:00 2001
From: Jacek Caban <jacek@codeweavers.com>
Date: Sat, 28 Jul 2018 10:49:59 +1000
Subject: [PATCH] kernel32: Add AttachConsole implementation
---
dlls/kernel32/console.c | 19 +++++-
dlls/kernel32/tests/console.c | 131 +++++++++++++++++++++++++++++++++++++++---
server/console.c | 43 ++++++++++++++
server/protocol.def | 10 ++++
4 files changed, 193 insertions(+), 10 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 51061de..1637a87 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -2909,8 +2909,23 @@ BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput, LPSMALL_RECT lpScr
*/
BOOL WINAPI AttachConsole(DWORD dwProcessId)
{
- FIXME("stub %x\n",dwProcessId);
- return TRUE;
+ BOOL ret;
+
+ TRACE("(%x)\n", dwProcessId);
+
+ SERVER_START_REQ( attach_console )
+ {
+ req->pid = dwProcessId;
+ ret = !wine_server_call_err( req );
+ if (ret)
+ {
+ SetStdHandle(STD_INPUT_HANDLE, wine_server_ptr_handle(reply->std_in));
+ SetStdHandle(STD_OUTPUT_HANDLE, wine_server_ptr_handle(reply->std_out));
+ SetStdHandle(STD_ERROR_HANDLE, wine_server_ptr_handle(reply->std_err));
+ }
+ }
+ SERVER_END_REQ;
+ return ret;
}
/******************************************************************
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index ac77ab7..acd61d0 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -208,19 +208,29 @@ static void testEmptyWrite(HANDLE hCon)
okCURSOR(hCon, c);
}
-static void testWriteSimple(HANDLE hCon)
+static void simple_write_console(HANDLE console, const char *text)
{
- COORD c;
- DWORD len;
- const char* mytest = "abcdefg";
- const int mylen = strlen(mytest);
+ DWORD len;
+ COORD c = {0, 0};
+ BOOL ret;
/* single line write */
c.X = c.Y = 0;
- ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n");
+ ok(SetConsoleCursorPosition(console, c) != 0, "Cursor in upper-left\n");
+
+ ret = WriteConsoleA(console, text, strlen(text), &len, NULL);
+ ok(ret, "WriteConsoleA failed: %u\n", GetLastError());
+ ok(len == strlen(text), "unexpected len %u\n", len);
+}
+
+static void testWriteSimple(HANDLE hCon)
+{
+ const char* mytest = "abcdefg";
+ int mylen = strlen(mytest);
+ COORD c = {0, 0};
+
+ simple_write_console(hCon, mytest);
- ok(WriteConsoleA(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n");
- c.Y = 0;
for (c.X = 0; c.X < mylen; c.X++)
{
okCHAR(hCon, c, mytest[c.X], TEST_ATTRIB);
@@ -3019,6 +3029,98 @@ static void test_GetConsoleScreenBufferInfoEx(HANDLE std_output)
ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
}
+static void test_AttachConsole_child(DWORD console_pid)
+{
+ HANDLE pipe_in, pipe_out;
+ COORD c = {0,0};
+ HANDLE console;
+ char buf[32];
+ DWORD len;
+ BOOL res;
+
+ res = CreatePipe(&pipe_in, &pipe_out, NULL, 0);
+ ok(res, "CreatePipe failed: %u\n", GetLastError());
+
+ res = AttachConsole(console_pid);
+ ok(!res && GetLastError() == ERROR_ACCESS_DENIED,
+ "AttachConsole returned: %x(%u)\n", res, GetLastError());
+
+ res = FreeConsole();
+ ok(res, "FreeConsole failed: %u\n", GetLastError());
+
+ SetStdHandle(STD_ERROR_HANDLE, pipe_out);
+
+ res = AttachConsole(console_pid);
+ ok(res, "AttachConsole failed: %u\n", GetLastError());
+
+ ok(pipe_out != GetStdHandle(STD_ERROR_HANDLE), "std handle not set to console\n");
+
+ console = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(console != INVALID_HANDLE_VALUE, "Could not open console\n");
+
+ res = ReadConsoleOutputCharacterA(console, buf, 6, c, &len);
+ ok(res, "ReadConsoleOutputCharacterA failed: %u\n", GetLastError());
+ ok(len == 6, "len = %u\n", len);
+ ok(!memcmp(buf, "Parent", 6), "Unexpected console output\n");
+
+ res = FreeConsole();
+ ok(res, "FreeConsole failed: %u\n", GetLastError());
+
+ SetStdHandle(STD_INPUT_HANDLE, pipe_in);
+ SetStdHandle(STD_OUTPUT_HANDLE, pipe_out);
+
+ res = AttachConsole(ATTACH_PARENT_PROCESS);
+ ok(res, "AttachConsole failed: %u\n", GetLastError());
+
+ ok(pipe_in != GetStdHandle(STD_INPUT_HANDLE), "std handle not set to console\n");
+ ok(pipe_out != GetStdHandle(STD_OUTPUT_HANDLE), "std handle not set to console\n");
+
+ console = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok(console != INVALID_HANDLE_VALUE, "Could not open console\n");
+
+ res = ReadConsoleOutputCharacterA(console, buf, 6, c, &len);
+ ok(res, "ReadConsoleOutputCharacterA failed: %u\n", GetLastError());
+ ok(len == 6, "len = %u\n", len);
+ ok(!memcmp(buf, "Parent", 6), "Unexpected console output\n");
+
+ simple_write_console(console, "Child");
+ CloseHandle(console);
+
+ res = FreeConsole();
+ ok(res, "FreeConsole failed: %u\n", GetLastError());
+
+ res = CloseHandle(pipe_in);
+ ok(res, "pipe_in is no longer valid\n");
+ res = CloseHandle(pipe_out);
+ ok(res, "pipe_out is no longer valid\n");
+}
+
+static void test_AttachConsole(HANDLE console)
+{
+ STARTUPINFOA si = { sizeof(si) };
+ PROCESS_INFORMATION info;
+ char **argv, buf[MAX_PATH];
+ COORD c = {0,0};
+ DWORD len;
+ BOOL res;
+
+ simple_write_console(console, "Parent console");
+
+ winetest_get_mainargs(&argv);
+ sprintf(buf, "\"%s\" console attach_console %x", argv[0], GetCurrentProcessId());
+ res = CreateProcessA(NULL, buf, NULL, NULL, TRUE, 0, NULL, NULL, &si, &info);
+ ok(res, "CreateProcess failed: %u\n", GetLastError());
+ CloseHandle(info.hThread);
+
+ winetest_wait_child_process(info.hProcess);
+ CloseHandle(info.hProcess);
+
+ res = ReadConsoleOutputCharacterA(console, buf, 5, c, &len);
+ ok(res, "ReadConsoleOutputCharacterA failed: %u\n", GetLastError());
+ ok(len == 5, "len = %u\n", len);
+ ok(!memcmp(buf, "Child", 5), "Unexpected console output\n");
+}
+
START_TEST(console)
{
static const char font_name[] = "Lucida Console";
@@ -3030,9 +3132,21 @@ START_TEST(console)
char old_font[LF_FACESIZE];
BOOL delete = FALSE;
DWORD size;
+ char **argv;
+ int argc;
init_function_pointers();
+ argc = winetest_get_mainargs(&argv);
+
+ if (argc > 3 && !strcmp(argv[2], "attach_console"))
+ {
+ DWORD parent_pid;
+ sscanf(argv[3], "%x", &parent_pid);
+ test_AttachConsole_child(parent_pid);
+ return;
+ }
+
/* be sure we have a clean console (and that's our own)
* FIXME: this will make the test fail (currently) if we don't run
* under X11
@@ -3170,4 +3284,5 @@ START_TEST(console)
test_GetConsoleFontInfo(hConOut);
test_SetConsoleFont(hConOut);
test_GetConsoleScreenBufferInfoEx(hConOut);
+ test_AttachConsole(hConOut);
}
diff --git a/server/console.c b/server/console.c
index 058c8ce..8460a7f 100644
--- a/server/console.c
+++ b/server/console.c
@@ -1546,6 +1546,49 @@ DECL_HANDLER(open_console)
else if (!get_error()) set_error( STATUS_ACCESS_DENIED );
}
+/* attach to a other process's console */
+DECL_HANDLER(attach_console)
+{
+ struct process *process;
+
+ if (current->process->console)
+ {
+ set_error( STATUS_ACCESS_DENIED );
+ return;
+ }
+
+ process = get_process_from_id( req->pid == ATTACH_PARENT_PROCESS
+ ? current->process->parent_id : req->pid );
+ if (!process) return;
+
+ if (process->console && process->console->active )
+ {
+ reply->std_in = alloc_handle( current->process, process->console, GENERIC_READ, 0 );
+ if (!reply->std_in) goto error;
+
+ reply->std_out = alloc_handle( current->process, process->console->active, GENERIC_WRITE, 0 );
+ if (!reply->std_out) goto error;
+
+ reply->std_err = alloc_handle( current->process, process->console->active, GENERIC_WRITE, 0 );
+ if (!reply->std_err) goto error;
+
+ current->process->console = (struct console_input*)grab_object( process->console );
+ current->process->console->num_proc++;
+ }
+ else
+ {
+ set_error( STATUS_INVALID_HANDLE );
+ }
+
+ release_object( process );
+ return;
+
+error:
+ if (reply->std_in) close_handle( current->process, reply->std_in);
+ if (reply->std_out) close_handle( current->process, reply->std_out);
+ release_object( process );
+}
+
/* set info about a console input */
DECL_HANDLER(set_console_input_info)
{
diff --git a/server/protocol.def b/server/protocol.def
index 5d89c2b..c8bb3b1 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1463,6 +1463,16 @@ struct console_renderer_event
@END
+/* Attach to a other process's console */
+@REQ(attach_console)
+ process_id_t pid; /* pid of attached console process */
+@REPLY
+ obj_handle_t std_in; /* attached stdin */
+ obj_handle_t std_out; /* attached stdout */
+ obj_handle_t std_err; /* attached stderr */
+@END
+
+
/* Get the input queue wait event */
@REQ(get_console_wait_event)
@REPLY
--
1.9.1

View File

@ -1,2 +0,0 @@
Fixes: [41573] AttachConsole implementation.
Fixes: [43910] "Battle.net helper.exe" [NOT BLIZZARD APP!] crashes with Win 7 or higher

View File

@ -1,200 +0,0 @@
From 9448c872e54c1f930c213bd639c5650c98e3e89f Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 25 Jul 2018 15:22:57 +0800
Subject: [PATCH 08/24] programs: Allow to disable MIME-type associations.
This patch should at least mitigate the state of the bug 19182.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
programs/winecfg/resource.h | 1 +
programs/winecfg/theme.c | 30 ++++++++++++++++++++--
programs/winecfg/winecfg.rc | 40 ++++++++++++++++--------------
programs/winemenubuilder/winemenubuilder.c | 23 ++++++++++++++++-
4 files changed, 73 insertions(+), 21 deletions(-)
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index 0c0b038..2760e92 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -176,6 +176,7 @@
#define IDC_SYSPARAM_COLOR_TEXT 1415
#define IDC_SYSPARAM_COLOR 1416
#define IDC_SYSPARAM_FONT 1417
+#define IDC_ENABLE_FILE_ASSOCIATIONS 1418
#define IDC_SYSPARAMS_BUTTON 8400
#define IDC_SYSPARAMS_BUTTON_TEXT 8401
diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c
index f98dcc3..863bc6b 100644
--- a/programs/winecfg/theme.c
+++ b/programs/winecfg/theme.c
@@ -1168,6 +1168,26 @@ static void on_select_font(HWND hDlg)
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
}
+static void init_mime_types(HWND hDlg)
+{
+ char *buf = get_reg_key(config_key, keypath("MIME-types"), "EnableFileAssociations", "Y");
+ int state = IS_OPTION_TRUE(*buf) ? BST_CHECKED : BST_UNCHECKED;
+
+ CheckDlgButton(hDlg, IDC_ENABLE_FILE_ASSOCIATIONS, state);
+
+ HeapFree(GetProcessHeap(), 0, buf);
+}
+
+static void update_mime_types(HWND hDlg)
+{
+ const char *state = "Y";
+
+ if (IsDlgButtonChecked(hDlg, IDC_ENABLE_FILE_ASSOCIATIONS) != BST_CHECKED)
+ state = "N";
+
+ set_reg_key(config_key, keypath("MIME-types"), "EnableFileAssociations", state);
+}
+
INT_PTR CALLBACK
ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@@ -1177,8 +1197,9 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
init_shell_folder_listview_headers(hDlg);
update_shell_folder_listview(hDlg);
read_sysparams(hDlg);
+ init_mime_types(hDlg);
break;
-
+
case WM_DESTROY:
free_theme_files();
break;
@@ -1186,7 +1207,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_SHOWWINDOW:
set_window_title(hDlg);
break;
-
+
case WM_COMMAND:
switch(HIWORD(wParam)) {
case CBN_SELCHANGE: {
@@ -1296,6 +1317,10 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;
}
+
+ case IDC_ENABLE_FILE_ASSOCIATIONS:
+ update_mime_types(hDlg);
+ break;
}
break;
}
@@ -1314,6 +1339,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
apply_sysparams();
read_shell_folder_link_targets();
update_shell_folder_listview(hDlg);
+ update_mime_types(hDlg);
SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
break;
}
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
index 5908b49..d37a55e 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -284,25 +284,29 @@ IDD_DESKTOP_INTEGRATION DIALOG 0, 0, 260, 220
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Shell Dlg"
BEGIN
- GROUPBOX "Appearance",IDC_STATIC,8,4,244,106
- LTEXT "&Theme:",IDC_STATIC,15,16,130,8
- COMBOBOX IDC_THEME_THEMECOMBO,15,26,130,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "&Install theme...",IDC_THEME_INSTALL,152,26,93,14
- LTEXT "&Color:",IDC_THEME_COLORTEXT,15,48,105,8
- COMBOBOX IDC_THEME_COLORCOMBO,15,58,105,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "&Size:",IDC_THEME_SIZETEXT,126,48,120,8
- COMBOBOX IDC_THEME_SIZECOMBO,126,58,120,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "It&em:",IDC_STATIC,15,80,105,8
- COMBOBOX IDC_SYSPARAM_COMBO,15,90,105,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT
- LTEXT "C&olor:",IDC_SYSPARAM_COLOR_TEXT,126,80,25,8,WS_DISABLED
- PUSHBUTTON "",IDC_SYSPARAM_COLOR,126,90,25,13,WS_DISABLED | BS_OWNERDRAW
- LTEXT "Si&ze:",IDC_SYSPARAM_SIZE_TEXT,157,80,30,8,WS_DISABLED
- EDITTEXT IDC_SYSPARAM_SIZE,157,90,30,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED
- CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASSA,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | WS_DISABLED, 185,90,15,13
- PUSHBUTTON "&Font...",IDC_SYSPARAM_FONT,190,90,55,13,WS_DISABLED
- GROUPBOX "Folders",IDC_STATIC,8,114,244,100
+ GROUPBOX "Appearance",IDC_STATIC,8,4,244,90
+ LTEXT "&Theme:",IDC_STATIC,15,15,130,8
+ COMBOBOX IDC_THEME_THEMECOMBO,15,25,130,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Install theme...",IDC_THEME_INSTALL,152,25,93,13
+ LTEXT "&Color:",IDC_THEME_COLORTEXT,15,40,105,8
+ COMBOBOX IDC_THEME_COLORCOMBO,15,50,105,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "&Size:",IDC_THEME_SIZETEXT,126,40,120,8
+ COMBOBOX IDC_THEME_SIZECOMBO,126,50,120,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "It&em:",IDC_STATIC,15,65,105,8
+ COMBOBOX IDC_SYSPARAM_COMBO,15,75,105,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT
+ LTEXT "C&olor:",IDC_SYSPARAM_COLOR_TEXT,126,65,25,8,WS_DISABLED
+ PUSHBUTTON "",IDC_SYSPARAM_COLOR,126,75,25,13,WS_DISABLED | BS_OWNERDRAW
+ LTEXT "Si&ze:",IDC_SYSPARAM_SIZE_TEXT,157,65,30,8,WS_DISABLED
+ EDITTEXT IDC_SYSPARAM_SIZE,157,75,30,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED
+ CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASSA,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | WS_DISABLED, 185,75,15,13
+
+ GROUPBOX "MIME types",IDC_STATIC,8,95,244,23
+ CONTROL "Allow Wine to manage file &associations",IDC_ENABLE_FILE_ASSOCIATIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,105,230,8
+
+ PUSHBUTTON "&Font...",IDC_SYSPARAM_FONT,190,75,55,13,WS_DISABLED
+ GROUPBOX "Folders",IDC_STATIC,8,120,244,94
CONTROL "",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT |
- LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64
+ LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,132,230,58
CONTROL "&Link to:",IDC_LINK_SFPATH,"Button",BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED,15,195,65,13
EDITTEXT IDC_EDIT_SFPATH,80,195,110,13,ES_AUTOHSCROLL|WS_TABSTOP|WS_DISABLED
PUSHBUTTON "B&rowse...",IDC_BROWSE_SFPATH,195,195,50,13,WS_DISABLED
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 0013b04..dd69ff9 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -104,6 +104,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(menubuilder);
#define in_startmenu(csidl) ((csidl)==CSIDL_STARTMENU || \
(csidl)==CSIDL_COMMON_STARTMENU)
+#define IS_OPTION_TRUE(ch) \
+ ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
+
/* link file formats */
#include "pshpack1.h"
@@ -3619,6 +3622,23 @@ static BOOL init_xdg(void)
return FALSE;
}
+static BOOL associations_enabled(void)
+{
+ BOOL ret = TRUE;
+ HKEY hkey;
+ BYTE buf[32];
+ DWORD len;
+
+ if (!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\MIME-types", &hkey))
+ {
+ len = sizeof(buf);
+ if (!RegQueryValueExA(hkey, "EnableFileAssociations", NULL, NULL, buf, &len))
+ ret = IS_OPTION_TRUE(buf[0]);
+ }
+
+ return ret;
+}
+
/***********************************************************************
*
* wWinMain
@@ -3654,7 +3674,8 @@ int PASCAL wWinMain (HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int sh
break;
if( !strcmpW( token, dash_aW ) )
{
- RefreshFileTypeAssociations();
+ if (associations_enabled())
+ RefreshFileTypeAssociations();
continue;
}
if( !strcmpW( token, dash_rW ) )
--
1.9.1

View File

@ -1,91 +0,0 @@
From 1a3385427b0834c46a262959ed7da3f21b59d8bd Mon Sep 17 00:00:00 2001
From: Chip Davis <cdavis@codeweavers.com>
Date: Wed, 1 Aug 2018 15:46:09 -0500
Subject: [PATCH 20/24] libwine: Use getsegmentdata(3) on Mac OS to find the
end of the __TEXT segment.
Don't assume it ends with the fake PE header. This assumption doesn't
hold on Mac OS: the __data section where it was placed is located after
several other sections, all in the __DATA segment.
Unfortunately, this causes Wine, when DEP/NX is turned off, to override
the page protections for the start of the __DATA segment, removing write
permission from them, leading to a crash when winemac.drv attempted to
use an Objective-C class for the first time.
Also, be sure to include the zero-fill (i.e. BSS) sections in the total
size of the .data section. This should fix some tests that use large
uninitialized arrays.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
---
libs/wine/loader.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
index c07042a..0af3b8e 100644
--- a/libs/wine/loader.c
+++ b/libs/wine/loader.c
@@ -49,6 +49,7 @@
#undef LoadResource
#undef GetCurrentThread
#include <pthread.h>
+#include <mach-o/getsect.h>
#else
extern char **environ;
#endif
@@ -387,11 +388,15 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
IMAGE_NT_HEADERS *nt;
IMAGE_SECTION_HEADER *sec;
BYTE *addr;
- DWORD code_start, data_start, data_end;
+ DWORD code_start, code_end, data_start, data_end;
const size_t page_size = sysconf( _SC_PAGESIZE );
const size_t page_mask = page_size - 1;
int delta, nb_sections = 2; /* code + data */
unsigned int i;
+#ifdef __APPLE__
+ Dl_info dli;
+ unsigned long data_size;
+#endif
size_t size = (sizeof(IMAGE_DOS_HEADER)
+ sizeof(IMAGE_NT_HEADERS)
@@ -425,7 +430,15 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
delta = (const BYTE *)nt_descr - addr;
code_start = page_size;
data_start = delta & ~page_mask;
+#ifdef __APPLE__
+ /* Need the mach_header, not the PE header, to give to getsegmentdata(3) */
+ dladdr(addr, &dli);
+ code_end = getsegmentdata(dli.dli_fbase, "__DATA", &data_size) - addr;
+ data_end = (code_end + data_size + page_mask) & ~page_mask;
+#else
+ code_end = data_start;
data_end = (nt->OptionalHeader.SizeOfImage + delta + page_mask) & ~page_mask;
+#endif
fixup_rva_ptrs( &nt->OptionalHeader.AddressOfEntryPoint, addr, 1 );
@@ -434,7 +447,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
#ifndef _WIN64
nt->OptionalHeader.BaseOfData = data_start;
#endif
- nt->OptionalHeader.SizeOfCode = data_start - code_start;
+ nt->OptionalHeader.SizeOfCode = code_end - code_start;
nt->OptionalHeader.SizeOfInitializedData = data_end - data_start;
nt->OptionalHeader.SizeOfUninitializedData = 0;
nt->OptionalHeader.SizeOfImage = data_end;
@@ -443,7 +456,7 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
/* Build the code section */
memcpy( sec->Name, ".text", sizeof(".text") );
- sec->SizeOfRawData = data_start - code_start;
+ sec->SizeOfRawData = code_end - code_start;
sec->Misc.VirtualSize = sec->SizeOfRawData;
sec->VirtualAddress = code_start;
sec->PointerToRawData = code_start;
--
1.9.1

View File

@ -1,38 +0,0 @@
From 6d9aadecbafcd048702db67dab8c42cf6141712a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 31 Jul 2018 18:57:59 +0800
Subject: [PATCH 22/24] kernel32: Set environment variable %PUBLIC% on the
process start-up.
This patch fixes an installer that has "[%PUBLIC]\Documents" entry
for some of the targets being copied from a cabinet file. Under
Windows %PUBLIC% environment variable is set to C:\Users\Public.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
---
dlls/kernel32/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 5aa245c..65b3091 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -520,6 +520,7 @@ static void set_additional_environment(void)
static const WCHAR computernameW[] = {'C','O','M','P','U','T','E','R','N','A','M','E',0};
static const WCHAR allusersW[] = {'A','L','L','U','S','E','R','S','P','R','O','F','I','L','E',0};
static const WCHAR programdataW[] = {'P','r','o','g','r','a','m','D','a','t','a',0};
+ static const WCHAR publicW[] = {'P','U','B','L','I','C',0};
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
WCHAR *profile_dir = NULL, *all_users_dir = NULL, *program_data_dir = NULL;
@@ -560,6 +561,7 @@ static void set_additional_environment(void)
if (p > value && p[-1] != '\\') *p++ = '\\';
strcpyW( p, all_users_dir );
SetEnvironmentVariableW( allusersW, value );
+ SetEnvironmentVariableW( publicW, value );
HeapFree( GetProcessHeap(), 0, value );
}
--
1.9.1

View File

@ -1,113 +0,0 @@
From bde1bbf224f90b5ca4cfddad918e3a096a6c3a05 Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Thu, 2 Aug 2018 19:48:59 +0200
Subject: [PATCH] cmd: Handle quotes when parsing the folders in the PATH
environment variable
Semicolons are also allowed inside a path,
as long as they are quoted.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45552
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
---
programs/cmd/tests/test_builtins.cmd | 17 +++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 3 +++
programs/cmd/wcmdmain.c | 27 ++++++++++++++++++++++-----
3 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index b9e9b25..775f21b 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -507,6 +507,23 @@ rem Only the final quote ends the string
set "WINE_FOO=apple"banana"grape"orange
echo '%WINE_FOO%'
set WINE_FOO=
+rem set PATH must work with quotes
+set PATH_BACKUP=%PATH%
+mkdir folder
+mkdir "fol;der"
+echo echo I'm here! > "fol;der\sub1.bat"
+echo echo I'm here! > folder\sub1.bat
+set PATH=nothing;"fol;der"
+call sub1
+set PATH="folder
+call sub1
+set PATH=folder"
+call sub1
+del "fol;der\sub1.bat"
+del folder\sub1.bat
+rmdir "fol;der"
+rmdir folder
+PATH=%PATH_BACKUP%
echo ------------ Testing variable expansion ------------
call :setError 0
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 3118359..ea4157c 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -475,6 +475,9 @@ foo
'jim fred'
'jim'
'apple"banana"grape'
+I'm here!@space@
+I'm here!@space@
+I'm here!@space@
------------ Testing variable expansion ------------
~p0 should be path containing batch file
@path@
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 8fe2d57..5135be4 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1099,24 +1099,41 @@ void WCMD_run_program (WCHAR *command, BOOL called)
wine_dbgstr_w(stemofsearch));
while (pathposn) {
WCHAR thisDir[MAX_PATH] = {'\0'};
+ int length = 0;
WCHAR *pos = NULL;
BOOL found = FALSE;
+ BOOL inside_quotes = FALSE;
/* Work on the first directory on the search path */
- pos = strchrW(pathposn, ';');
- if (pos) {
+ pos = pathposn;
+ while ((inside_quotes || *pos != ';') && *pos != 0)
+ {
+ if (*pos == '"')
+ inside_quotes = !inside_quotes;
+ pos++;
+ }
+
+ if (*pos) { /* Reached semicolon */
memcpy(thisDir, pathposn, (pos-pathposn) * sizeof(WCHAR));
thisDir[(pos-pathposn)] = 0x00;
pathposn = pos+1;
-
- } else {
+ } else { /* Reached string end */
strcpyW(thisDir, pathposn);
pathposn = NULL;
}
+ /* Remove quotes */
+ length = strlenW(thisDir);
+ if (thisDir[length - 1] == '"')
+ thisDir[length - 1] = 0;
+
+ if (*thisDir != '"')
+ strcpyW(temp, thisDir);
+ else
+ strcpyW(temp, thisDir + 1);
+
/* Since you can have eg. ..\.. on the path, need to expand
to full information */
- strcpyW(temp, thisDir);
GetFullPathNameW(temp, MAX_PATH, thisDir, NULL);
/* 1. If extension supplied, see if that file exists */
--
1.9.1

View File

@ -1 +1,2 @@
Fixes: [45570] League of Legends 8.12+ fails to start a game (anticheat engine, incorrect implementation of LdrInitializeThunk)
Fixes: [45570] League of Legends 8.12+ fails to start a game (anticheat engine, incorrect implementation of LdrInitializeThunk)
Depends: advapi32-Token_Integrity_Level

View File

@ -1,2 +1,2 @@
Fixes: [31910] Add stub for NtContinue
Fixes: [45327] Helps League of Legends anti-cheat engine.
Fixes: [45572] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtContinue)

View File

@ -1 +1 @@
Fixes: [45327] Added support ProcessCookie in NtQueryInformationProcess
Fixes: [45569] League of Legends 8.12+ needs NtQueryInformationProcess(ProcessCookie) stub

View File

@ -1 +1 @@
Fixes: [45327] Add RtlSetUnhandledExceptionFilter stub
Fixes: [45566] League of Legends 8.12+ needs ntdll.RtlSetUnhandledExceptionFilter stub

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "d744f367d263a131feee96e103fb8220e8400b53"
echo "ccf6211c0ae6e86218f7e6c1f2fe725a23e568b9"
}
# Show version information
@ -164,7 +164,6 @@ patch_enable_all ()
enable_inseng_Implementation="$1"
enable_iphlpapi_System_Ping="$1"
enable_iphlpapi_TCP_Table="$1"
enable_kernel32_AttachConsole="$1"
enable_kernel32_COMSPEC="$1"
enable_kernel32_CopyFileEx="$1"
enable_kernel32_Cwd_Startup_Info="$1"
@ -187,7 +186,6 @@ patch_enable_all ()
enable_libs_Debug_Channel="$1"
enable_libs_Unicode_Collation="$1"
enable_loader_OSX_Preloader="$1"
enable_ml_patches="$1"
enable_mmsystem_dll16_MIDIHDR_Refcount="$1"
enable_mountmgr_DosDevices="$1"
enable_mscoree_CorValidateImage="$1"
@ -289,7 +287,6 @@ patch_enable_all ()
enable_server_Misc_ACL="$1"
enable_server_Object_Types="$1"
enable_server_PeekMessage="$1"
enable_server_Pipe_ObjectName="$1"
enable_server_Realtime_Priority="$1"
enable_server_Registry_Notifications="$1"
enable_server_Shared_Memory="$1"
@ -299,7 +296,6 @@ patch_enable_all ()
enable_server_device_manager_destroy="$1"
enable_server_send_hardware_message="$1"
enable_setupapi_DiskSpaceList="$1"
enable_setupapi_Display_Device="$1"
enable_setupapi_HSPFILEQ_Check_Type="$1"
enable_setupapi_SPFILENOTIFY_FILEINCABINET="$1"
enable_setupapi_SP_COPY_IN_USE_NEEDS_REBOOT="$1"
@ -672,9 +668,6 @@ patch_enable ()
iphlpapi-TCP_Table)
enable_iphlpapi_TCP_Table="$2"
;;
kernel32-AttachConsole)
enable_kernel32_AttachConsole="$2"
;;
kernel32-COMSPEC)
enable_kernel32_COMSPEC="$2"
;;
@ -741,9 +734,6 @@ patch_enable ()
loader-OSX_Preloader)
enable_loader_OSX_Preloader="$2"
;;
ml-patches)
enable_ml_patches="$2"
;;
mmsystem.dll16-MIDIHDR_Refcount)
enable_mmsystem_dll16_MIDIHDR_Refcount="$2"
;;
@ -1047,9 +1037,6 @@ patch_enable ()
server-PeekMessage)
enable_server_PeekMessage="$2"
;;
server-Pipe_ObjectName)
enable_server_Pipe_ObjectName="$2"
;;
server-Realtime_Priority)
enable_server_Realtime_Priority="$2"
;;
@ -1077,9 +1064,6 @@ patch_enable ()
setupapi-DiskSpaceList)
enable_setupapi_DiskSpaceList="$2"
;;
setupapi-Display_Device)
enable_setupapi_Display_Device="$2"
;;
setupapi-HSPFILEQ_Check_Type)
enable_setupapi_HSPFILEQ_Check_Type="$2"
;;
@ -1988,13 +1972,6 @@ if test "$enable_server_Realtime_Priority" -eq 1; then
enable_ntdll_ThreadTime=1
fi
if test "$enable_server_Pipe_ObjectName" -eq 1; then
if test "$enable_server_Desktop_Refcount" -gt 1; then
abort "Patchset server-Desktop_Refcount disabled, but server-Pipe_ObjectName depends on that."
fi
enable_server_Desktop_Refcount=1
fi
if test "$enable_server_Object_Types" -eq 1; then
if test "$enable_server_Misc_ACL" -gt 1; then
abort "Patchset server-Misc_ACL disabled, but server-Object_Types depends on that."
@ -2138,6 +2115,13 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then
enable_ntdll_Pipe_SpecialCharacters=1
fi
if test "$enable_ntdll_LdrInitializeThunk" -eq 1; then
if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
abort "Patchset advapi32-Token_Integrity_Level disabled, but ntdll-LdrInitializeThunk depends on that."
fi
enable_advapi32_Token_Integrity_Level=1
fi
if test "$enable_ntdll_Junction_Points" -eq 1; then
if test "$enable_ntdll_NtQueryEaFile" -gt 1; then
abort "Patchset ntdll-NtQueryEaFile disabled, but ntdll-Junction_Points depends on that."
@ -2266,6 +2250,13 @@ if test "$enable_d3dx9_36_DXTn" -eq 1; then
enable_wined3d_DXTn=1
fi
if test "$enable_wined3d_DXTn" -eq 1; then
if test "$enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM" -gt 1; then
abort "Patchset wined3d-WINED3DFMT_B8G8R8X8_UNORM disabled, but wined3d-DXTn depends on that."
fi
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM=1
fi
if test "$enable_d3d11_Deferred_Context" -eq 1; then
if test "$enable_nvapi_Stub_DLL" -gt 1; then
abort "Patchset nvapi-Stub_DLL disabled, but d3d11-Deferred_Context depends on that."
@ -2328,13 +2319,6 @@ if test "$enable_advapi32_LsaLookupSids" -eq 1; then
enable_server_Misc_ACL=1
fi
if test "$enable_Compiler_Warnings" -eq 1; then
if test "$enable_ml_patches" -gt 1; then
abort "Patchset ml-patches disabled, but Compiler_Warnings depends on that."
fi
enable_ml_patches=1
fi
# If autoupdate is enabled then create a tempfile to keep track of all patches
if test "$enable_patchlist" -eq 1; then
@ -2351,31 +2335,8 @@ if test "$enable_patchlist" -eq 1; then
fi
# Patchset ml-patches
# |
# | Modified files:
# | * dlls/kernel32/process.c, libs/wine/loader.c, programs/cmd/tests/test_builtins.cmd,
# | programs/cmd/tests/test_builtins.cmd.exp, programs/cmd/wcmdmain.c, programs/winecfg/resource.h,
# | programs/winecfg/theme.c, programs/winecfg/winecfg.rc, programs/winemenubuilder/winemenubuilder.c
# |
if test "$enable_ml_patches" -eq 1; then
patch_apply ml-patches/0008-programs-Allow-to-disable-MIME-type-associations.patch
patch_apply ml-patches/0020-libwine-Use-getsegmentdata-3-on-Mac-OS-to-find-the-e.patch
patch_apply ml-patches/0022-kernel32-Set-environment-variable-PUBLIC-on-the-proc.patch
patch_apply ml-patches/0028-cmd-Handle-quotes-when-parsing-the-folders-in-the-PA.patch
(
printf '%s\n' '+ { "Dmitry Timoshkov", "programs: Allow to disable MIME-type associations.", 1 },';
printf '%s\n' '+ { "Chip Davis", "libwine: Use getsegmentdata(3) on Mac OS to find the end of the __TEXT segment.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Set environment variable %PUBLIC% on the process start-up.", 1 },';
printf '%s\n' '+ { "Fabian Maurer", "cmd: Handle quotes when parsing the folders in the PATH environment variable.", 1 },';
) >> "$patchlist"
fi
# Patchset Compiler_Warnings
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ml-patches
# |
# | Modified files:
# | * dlls/amstream/mediastreamfilter.c, dlls/d2d1/brush.c, dlls/d2d1/geometry.c, dlls/d3d11/view.c, dlls/d3d8/texture.c,
# | dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dwrite/font.c, dlls/dwrite/layout.c,
@ -3271,8 +3232,26 @@ if test "$enable_d3dx9_36_DDS" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-WINED3DFMT_B8G8R8X8_UNORM
# |
# | This patchset fixes the following Wine bugs:
# | * [#44888] Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion
# |
# | Modified files:
# | * dlls/wined3d/surface.c
# |
if test "$enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM" -eq 1; then
patch_apply wined3d-WINED3DFMT_B8G8R8X8_UNORM/0001-wined3d-Implement-WINED3DFMT_B8G8R8X8_UNORM-to-WINED.patch
(
printf '%s\n' '+ { "Stanislav Zhukov", "wined3d: Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-DXTn
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * wined3d-WINED3DFMT_B8G8R8X8_UNORM
# |
# | This patchset fixes the following Wine bugs:
# | * [#25486] Lego Stunt Rally requires DXTn software de/encoding support
# | * [#29586] Tumblebugs 2 requires DXTn software encoding support
@ -3280,7 +3259,7 @@ fi
# |
# | Modified files:
# | * dlls/wined3d/Makefile.in, dlls/wined3d/dxtn.c, dlls/wined3d/dxtn.h, dlls/wined3d/surface.c, dlls/wined3d/wined3d.spec,
# | dlls/wined3d/wined3d_main.c, include/wine/wined3d.h
# | include/wine/wined3d.h
# |
if test "$enable_wined3d_DXTn" -eq 1; then
patch_apply wined3d-DXTn/0001-wined3d-add-DXTn-support.patch
@ -3292,7 +3271,7 @@ fi
# Patchset d3dx9_36-DXTn
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * wined3d-DXTn
# | * wined3d-WINED3DFMT_B8G8R8X8_UNORM, wined3d-DXTn
# |
# | This patchset fixes the following Wine bugs:
# | * [#33768] Fix texture corruption in CSI: Fatal Conspiracy
@ -3599,7 +3578,7 @@ fi
# Patchset dinput8-shared-code
# |
# | This patchset fixes the following Wine bugs:
# | * [#45327] Stop access volation in League of Legends
# | * [#45568] League of Legends 8.12+ fails to start a game (anticheat engine, validation of loaded DLLs)
# |
# | Modified files:
# | * dlls/dinput/Makefile.in, dlls/dinput/dinput_main.c, dlls/dinput8/Makefile.in, dlls/dinput8/dinput8_main.c
@ -4040,7 +4019,7 @@ fi
# | * [#8332] Fallback to system ping command when CAP_NET_RAW is not available
# |
# | Modified files:
# | * dlls/iphlpapi/icmp.c, dlls/iphlpapi/tests/iphlpapi.c
# | * dlls/iphlpapi/icmp.c
# |
if test "$enable_iphlpapi_System_Ping" -eq 1; then
patch_apply iphlpapi-System_Ping/0001-iphlpapi-Fallback-to-system-ping-when-ICMP-permissio.patch
@ -4064,22 +4043,6 @@ if test "$enable_iphlpapi_TCP_Table" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-AttachConsole
# |
# | This patchset fixes the following Wine bugs:
# | * [#41573] AttachConsole implementation.
# | * [#43910] "Battle.net helper.exe" [NOT BLIZZARD APP!] crashes with Win 7 or higher
# |
# | Modified files:
# | * dlls/kernel32/console.c, dlls/kernel32/tests/console.c, server/console.c, server/protocol.def
# |
if test "$enable_kernel32_AttachConsole" -eq 1; then
patch_apply kernel32-AttachConsole/0001-kernel32-Add-AttachConsole-implementation.patch
(
printf '%s\n' '+ { "Jacek Caban", "kernel32: Add AttachConsole implementation.", 1 },';
) >> "$patchlist"
fi
# Patchset server-File_Permissions
# |
# | This patchset fixes the following Wine bugs:
@ -5107,6 +5070,10 @@ fi
# Patchset ntdll-LdrInitializeThunk
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, kernel32-COMSPEC, server-CreateProcess_ACLs, server-Misc_ACL,
# | advapi32-Token_Integrity_Level
# |
# | This patchset fixes the following Wine bugs:
# | * [#45570] League of Legends 8.12+ fails to start a game (anticheat engine, incorrect implementation of
# | LdrInitializeThunk)
@ -5139,7 +5106,7 @@ fi
# |
# | This patchset fixes the following Wine bugs:
# | * [#31910] Add stub for NtContinue
# | * [#45327] Helps League of Legends anti-cheat engine.
# | * [#45572] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtContinue)
# |
# | Modified files:
# | * dlls/ntdll/exception.c, dlls/ntdll/ntdll.spec, dlls/ntdll/signal_i386.c
@ -5189,7 +5156,7 @@ fi
# Patchset ntdll-NtQueryInformationProcess-ProcessCookie
# |
# | This patchset fixes the following Wine bugs:
# | * [#45327] Added support ProcessCookie in NtQueryInformationProcess
# | * [#45569] League of Legends 8.12+ needs NtQueryInformationProcess(ProcessCookie) stub
# |
# | Modified files:
# | * dlls/ntdll/process.c
@ -5324,7 +5291,8 @@ fi
# Patchset ntdll-RtlCreateUserThread
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-LdrInitializeThunk
# | * Staging, advapi32-CreateRestrictedToken, kernel32-COMSPEC, server-CreateProcess_ACLs, server-Misc_ACL,
# | advapi32-Token_Integrity_Level, ntdll-LdrInitializeThunk
# |
# | This patchset fixes the following Wine bugs:
# | * [#45571] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtCreateThread/Ex)
@ -5372,7 +5340,7 @@ fi
# Patchset ntdll-RtlSetUnhandledExceptionFilter
# |
# | This patchset fixes the following Wine bugs:
# | * [#45327] Add RtlSetUnhandledExceptionFilter stub
# | * [#45566] League of Legends 8.12+ needs ntdll.RtlSetUnhandledExceptionFilter stub
# |
# | Modified files:
# | * dlls/ntdll/exception.c, dlls/ntdll/ntdll.spec
@ -5592,7 +5560,7 @@ fi
# Patchset ntoskrnl-Stubs
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ml-patches, Compiler_Warnings
# | * Compiler_Warnings
# |
# | Modified files:
# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, dlls/ntoskrnl.exe/tests/driver.c, include/ddk/wdm.h,
@ -6204,21 +6172,6 @@ if test "$enable_server_Object_Types" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Pipe_ObjectName
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-Desktop_Refcount
# |
# | Modified files:
# | * dlls/ntdll/tests/om.c, server/named_pipe.c, server/object.c, server/object.h
# |
if test "$enable_server_Pipe_ObjectName" -eq 1; then
patch_apply server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "server: Store a reference to the parent object for pipe servers.", 2 },';
) >> "$patchlist"
fi
# Patchset server-Realtime_Priority
# |
# | This patchset has the following (direct or indirect) dependencies:
@ -6310,25 +6263,6 @@ if test "$enable_setupapi_DiskSpaceList" -eq 1; then
) >> "$patchlist"
fi
# Patchset setupapi-Display_Device
# |
# | This patchset fixes the following Wine bugs:
# | * [#35345] Fix enumeration of display driver properties using setupapi
# |
# | Modified files:
# | * dlls/setupapi/devinst.c, dlls/setupapi/tests/devinst.c, loader/wine.inf.in
# |
if test "$enable_setupapi_Display_Device" -eq 1; then
patch_apply setupapi-Display_Device/0001-setupapi-Create-registry-keys-for-display-devices-an.patch
patch_apply setupapi-Display_Device/0002-setupapi-Handle-the-case-that-a-full-driver-path-is-.patch
patch_apply setupapi-Display_Device/0003-setupapi-Also-create-HardwareId-registry-key-for-dis.patch
(
printf '%s\n' '+ { "Michael Müller", "setupapi: Create registry keys for display devices and display drivers.", 1 },';
printf '%s\n' '+ { "Michael Müller", "setupapi: Handle the case that a full driver path is passed to SetupDiGetClassDevs.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "setupapi: Also create HardwareId registry key for display devices.", 1 },';
) >> "$patchlist"
fi
# Patchset setupapi-HSPFILEQ_Check_Type
# |
# | This patchset fixes the following Wine bugs:
@ -7675,8 +7609,9 @@ fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * nvcuda-CUDA_Support, nvapi-Stub_DLL, d3d11-Deferred_Context, d3d9-Tests, wined3d-Accounting, wined3d-DXTn, wined3d-
# | Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters
# | * nvcuda-CUDA_Support, nvapi-Stub_DLL, d3d11-Deferred_Context, d3d9-Tests, wined3d-Accounting, wined3d-
# | WINED3DFMT_B8G8R8X8_UNORM, wined3d-DXTn, wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs,
# | wined3d-UAV_Counters
# |
# | Modified files:
# | * dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/view.c, dlls/wined3d/wined3d_private.h
@ -7744,21 +7679,6 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-WINED3DFMT_B8G8R8X8_UNORM
# |
# | This patchset fixes the following Wine bugs:
# | * [#44888] Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion
# |
# | Modified files:
# | * dlls/wined3d/surface.c
# |
if test "$enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM" -eq 1; then
patch_apply wined3d-WINED3DFMT_B8G8R8X8_UNORM/0001-wined3d-Implement-WINED3DFMT_B8G8R8X8_UNORM-to-WINED.patch
(
printf '%s\n' '+ { "Stanislav Zhukov", "wined3d: Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_guess_gl_vendor
# |
# | This patchset fixes the following Wine bugs:
@ -7789,7 +7709,7 @@ fi
# Patchset winedevice-Default_Drivers
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * dxva2-Video_Decoder, ml-patches, Compiler_Warnings, ntoskrnl-Stubs
# | * dxva2-Video_Decoder, Compiler_Warnings, ntoskrnl-Stubs
# |
# | Modified files:
# | * configure.ac, dlls/dxgkrnl.sys/Makefile.in, dlls/dxgkrnl.sys/dxgkrnl.sys.spec, dlls/dxgkrnl.sys/main.c,

View File

@ -1,3 +1,7 @@
Fixes: Report correct ObjectName for NamedPipe wineserver objects
# Depends: kernel32-Named_Pipe
Depends: server-Desktop_Refcount
# This was originally written for msys2's strace.exe. It was broken by
# 59dd8ba..6098af8. Since msys2 has been broken in Wine for a while now, this
# really isn't worth fixing.
Disabled: true

View File

@ -1,4 +1,4 @@
From 79cc09b9e1b952772d33335518267dcabb927b01 Mon Sep 17 00:00:00 2001
From f32342b9bb7bae0e42b79e61f29ab25d9f6b2873 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 11 Feb 2016 03:17:09 +0100
Subject: setupapi: Create registry keys for display devices and display
@ -10,10 +10,10 @@ Subject: setupapi: Create registry keys for display devices and display
2 files changed, 101 insertions(+), 12 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 318dcdf..fc53c31 100644
index 9f77669..74a8e2b 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -90,6 +90,15 @@ static const WCHAR LowerFilters[] = {'L','o','w','e','r','F','i','l','t','e','r'
@@ -92,6 +92,15 @@ static const WCHAR LowerFilters[] = {'L','o','w','e','r','F','i','l','t','e','r'
static const WCHAR Phantom[] = {'P','h','a','n','t','o','m',0};
static const WCHAR SymbolicLink[] = {'S','y','m','b','o','l','i','c','L','i','n','k',0};
@ -29,8 +29,8 @@ index 318dcdf..fc53c31 100644
/* is used to identify if a DeviceInfoSet pointer is
valid or not */
#define SETUP_DEVICE_INFO_SET_MAGIC 0xd00ff056
@@ -140,6 +149,90 @@ struct DeviceInfo
struct list interfaces;
@@ -127,6 +136,90 @@ struct device_iface
struct list entry;
};
+static void create_display_keys(HKEY enumKey, int index, DISPLAY_DEVICEW *disp)
@ -117,10 +117,10 @@ index 318dcdf..fc53c31 100644
+ return ERROR_SUCCESS;
+}
+
static void SETUPDI_GuidToString(const GUID *guid, LPWSTR guidStr)
static inline void copy_device_data(SP_DEVINFO_DATA *data, const struct device *device)
{
static const WCHAR fmt[] = {'{','%','0','8','X','-','%','0','4','X','-',
@@ -420,8 +513,7 @@ static HKEY SETUPDI_CreateDevKey(struct DeviceInfo *devInfo)
data->ClassGuid = device->class;
@@ -393,8 +486,7 @@ static HKEY SETUPDI_CreateDevKey(struct device *device)
HKEY enumKey, key = INVALID_HANDLE_VALUE;
LONG l;
@ -129,8 +129,8 @@ index 318dcdf..fc53c31 100644
+ l = open_enum_key(&enumKey);
if (!l)
{
RegCreateKeyExW(enumKey, devInfo->instanceId, 0, NULL, 0,
@@ -509,8 +601,7 @@ static void SETUPDI_FreeDeviceInfo(struct DeviceInfo *devInfo)
RegCreateKeyExW(enumKey, device->instanceId, 0, NULL, 0,
@@ -486,8 +578,7 @@ static void SETUPDI_RemoveDevice(struct device *device)
HKEY enumKey;
LONG l;
@ -139,8 +139,8 @@ index 318dcdf..fc53c31 100644
+ l = open_enum_key(&enumKey);
if (!l)
{
RegDeleteTreeW(enumKey, devInfo->instanceId);
@@ -2036,8 +2127,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
RegDeleteTreeW(enumKey, device->instanceId);
@@ -2012,8 +2103,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
TRACE("%s\n", debugstr_w(enumstr));
@ -150,7 +150,7 @@ index 318dcdf..fc53c31 100644
for (i = 0; !l; i++)
{
len = sizeof(subKeyName) / sizeof(subKeyName[0]);
@@ -2265,8 +2355,7 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
@@ -2239,8 +2329,7 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
TRACE("%p, %s, %s, %08x\n", DeviceInfoSet, debugstr_guid(class),
debugstr_w(enumstr), flags);
@ -160,7 +160,7 @@ index 318dcdf..fc53c31 100644
if (enumKey != INVALID_HANDLE_VALUE)
{
if (enumstr)
@@ -3717,8 +3806,7 @@ static HKEY SETUPDI_OpenDevKey(struct DeviceInfo *devInfo, REGSAM samDesired)
@@ -3580,8 +3669,7 @@ static HKEY SETUPDI_OpenDevKey(struct device *device, REGSAM samDesired)
HKEY enumKey, key = INVALID_HANDLE_VALUE;
LONG l;
@ -169,8 +169,8 @@ index 318dcdf..fc53c31 100644
+ l = open_enum_key(&enumKey);
if (!l)
{
RegOpenKeyExW(enumKey, devInfo->instanceId, 0, samDesired, &key);
@@ -3834,8 +3922,7 @@ static BOOL SETUPDI_DeleteDevKey(struct DeviceInfo *devInfo)
RegOpenKeyExW(enumKey, device->instanceId, 0, samDesired, &key);
@@ -3697,8 +3785,7 @@ static BOOL SETUPDI_DeleteDevKey(struct device *device)
BOOL ret = FALSE;
LONG l;
@ -179,12 +179,12 @@ index 318dcdf..fc53c31 100644
+ l = open_enum_key(&enumKey);
if (!l)
{
ret = RegDeleteTreeW(enumKey, devInfo->instanceId);
ret = RegDeleteTreeW(enumKey, device->instanceId);
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index d22b29b..48083b8 100644
index 79ac6c5..2a2313e 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -443,6 +443,8 @@ HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"Locale",0x1
@@ -465,6 +465,8 @@ HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"Locale",0x1
[ControlClass]
HKLM,System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318},,,"Disk drives"
HKLM,System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318},"Class",,"DiskDrive"
@ -194,5 +194,5 @@ index d22b29b..48083b8 100644
HKLM,System\CurrentControlSet\Control\Class\{4d36e978-e325-11ce-bfc1-08002be10318},"Class",,"Ports"
HKLM,System\CurrentControlSet\Control\Class\{6bdd1fc6-810f-11d0-bec7-08002be2092f},,,"Imaging devices"
--
2.7.1
2.7.4

View File

@ -1,4 +1,4 @@
From 29e1247c38bc714ea74e624821381091d4ea4bf0 Mon Sep 17 00:00:00 2001
From 8a2cfa7797641f79216ab21b6e027f908879c2a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 11 Feb 2016 03:20:33 +0100
Subject: setupapi: Handle the case that a full driver path is passed to
@ -10,10 +10,10 @@ Subject: setupapi: Handle the case that a full driver path is passed to
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index e6a6272..e3cc257 100644
index 74a8e2b..4291c09 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -2376,8 +2376,30 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
@@ -2340,8 +2340,30 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
&enumStrKey);
if (!l)
{
@ -47,11 +47,11 @@ index e6a6272..e3cc257 100644
}
}
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 6ca0e92..b1f1d04 100644
index 9a8ecbc..d2b1500 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -1347,6 +1347,28 @@ static void testSetupDiGetINFClassA(void)
}
@@ -1430,6 +1430,28 @@ static void test_device_interface_key(void)
SetupDiDestroyDeviceInfoList(set);
}
+static void testSetupDiGetClassDevsA(void)
@ -79,12 +79,14 @@ index 6ca0e92..b1f1d04 100644
START_TEST(devinst)
{
HKEY hkey;
@@ -1384,4 +1406,5 @@ START_TEST(devinst)
@@ -1467,6 +1489,7 @@ START_TEST(devinst)
testDeviceRegistryPropertyA();
testDeviceRegistryPropertyW();
testSetupDiGetINFClassA();
+ testSetupDiGetClassDevsA();
test_devnode();
test_device_interface_key();
}
--
2.9.0
2.7.4

View File

@ -1,59 +1,65 @@
From 687fc3ff0c5ea37f782bd0f02c7fe856cab583a5 Mon Sep 17 00:00:00 2001
From e9a6546ce13c09f63a180aceb7181d8145c120d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 19 Aug 2016 00:47:08 +0200
Subject: setupapi: SetupDiGetDeviceInterfaceDetail should fill out
DeviceInfoData even if the buffer for DeviceInterfaceData is too small.
---
dlls/setupapi/devinst.c | 8 ++++----
dlls/setupapi/tests/devinst.c | 6 +++++-
2 files changed, 9 insertions(+), 5 deletions(-)
dlls/setupapi/devinst.c | 14 ++++++++------
dlls/setupapi/tests/devinst.c | 6 +++++-
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 02e75b6..4dac40d 100644
index 9f77669..f8c347b 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -2956,8 +2956,6 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(
NULL, NULL);
@@ -2844,9 +2844,6 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(
else
DeviceInterfaceDetailData->DevicePath[0] = '\0';
- if (DeviceInfoData && DeviceInfoData->cbSize == sizeof(SP_DEVINFO_DATA))
- *DeviceInfoData = *info->device;
- if (device_data && device_data->cbSize == sizeof(SP_DEVINFO_DATA))
- copy_device_data(device_data, iface->device);
-
ret = TRUE;
}
else
@@ -2966,6 +2964,8 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(
@@ -2855,6 +2852,10 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(
*RequiredSize = bytesNeeded;
SetLastError(ERROR_INSUFFICIENT_BUFFER);
}
+ if (DeviceInfoData && DeviceInfoData->cbSize == sizeof(SP_DEVINFO_DATA))
+ *DeviceInfoData = *info->device;
+
+ if (device_data && device_data->cbSize == sizeof(SP_DEVINFO_DATA))
+ copy_device_data(device_data, iface->device);
+
return ret;
}
@@ -3024,8 +3024,6 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
lstrcpyW(DeviceInterfaceDetailData->DevicePath, info->symbolicLink);
@@ -2914,9 +2915,6 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
else
DeviceInterfaceDetailData->DevicePath[0] = '\0';
- if (DeviceInfoData && DeviceInfoData->cbSize == sizeof(SP_DEVINFO_DATA))
- *DeviceInfoData = *info->device;
- if (device_data && device_data->cbSize == sizeof(SP_DEVINFO_DATA))
- copy_device_data(device_data, iface->device);
-
ret = TRUE;
}
else
@@ -3034,6 +3032,8 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
@@ -2925,6 +2923,10 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
*RequiredSize = bytesNeeded;
SetLastError(ERROR_INSUFFICIENT_BUFFER);
}
+ if (DeviceInfoData && DeviceInfoData->cbSize == sizeof(SP_DEVINFO_DATA))
+ *DeviceInfoData = *info->device;
+
+ if (device_data && device_data->cbSize == sizeof(SP_DEVINFO_DATA))
+ copy_device_data(device_data, iface->device);
+
return ret;
}
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 319bb31..d349917 100644
index 9a8ecbc..187e022 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -833,6 +833,7 @@ static void testGetDeviceInterfaceDetail(void)
@@ -674,6 +674,7 @@ static void testGetDeviceInterfaceDetail(void)
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}";
static const char path_w2k[] =
"\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\";
@ -61,7 +67,7 @@ index 319bb31..d349917 100644
LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size);
SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail =
(SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf;
@@ -860,9 +861,12 @@ static void testGetDeviceInterfaceDetail(void)
@@ -701,9 +702,12 @@ static void testGetDeviceInterfaceDetail(void)
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
detail->DevicePath);
/* Check SetupDiGetDeviceInterfaceDetailW */
@ -76,5 +82,5 @@ index 319bb31..d349917 100644
(expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */,
"SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n",
--
2.9.0
2.7.4

View File

@ -1,17 +1,16 @@
From 7dd189fb2256e64540fce8dfddc499ce41e01675 Mon Sep 17 00:00:00 2001
From e1402515ec1008c3393d434a1016a717c791bd62 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Fri, 30 Mar 2018 08:25:44 +0000
Subject: [PATCH] wined3d: add DXTn support
---
dlls/wined3d/Makefile.in | 1 +
dlls/wined3d/dxtn.c | 435 +++++++++++++++++++
dlls/wined3d/dxtn.h | 987 ++++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/surface.c | 153 +++++++
dlls/wined3d/wined3d.spec | 7 +
dlls/wined3d/wined3d_main.c | 1 +
include/wine/wined3d.h | 13 +
7 files changed, 1597 insertions(+)
dlls/wined3d/Makefile.in | 1 +
dlls/wined3d/dxtn.c | 435 ++++++++++++++++++++
dlls/wined3d/dxtn.h | 987 ++++++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/surface.c | 153 +++++++
dlls/wined3d/wined3d.spec | 7 +
include/wine/wined3d.h | 13 +
6 files changed, 1596 insertions(+)
create mode 100644 dlls/wined3d/dxtn.c
create mode 100644 dlls/wined3d/dxtn.h
@ -1462,10 +1461,10 @@ index 0000000..23536c0
+ }
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5502d05..d75dbdb 100644
index ba0b647..30421b9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -800,6 +800,126 @@ static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst,
@@ -820,6 +820,126 @@ static void convert_x8r8g8b8_l8(const BYTE *src, BYTE *dst,
}
}
@ -1592,8 +1591,8 @@ index 5502d05..d75dbdb 100644
struct d3dfmt_converter_desc
{
enum wined3d_format_id from, to;
@@ -816,6 +936,33 @@ static const struct d3dfmt_converter_desc converters[] =
{WINED3DFMT_YUY2, WINED3DFMT_B5G6R5_UNORM, convert_yuy2_r5g6b5},
@@ -837,6 +957,33 @@ static const struct d3dfmt_converter_desc converters[] =
{WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_L8_UNORM, convert_x8r8g8b8_l8},
};
+static const struct d3dfmt_converter_desc dxtn_converters[] =
@ -1626,7 +1625,7 @@ index 5502d05..d75dbdb 100644
static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_format_id from,
enum wined3d_format_id to)
{
@@ -827,6 +974,12 @@ static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_fo
@@ -848,6 +995,12 @@ static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_fo
return &converters[i];
}
@ -1654,18 +1653,6 @@ index 93cecf0..78cf50d 100644
+@ cdecl wined3d_dxt3_encode(ptr ptr long long long long long)
+@ cdecl wined3d_dxt5_decode(ptr ptr long long long long long)
+@ cdecl wined3d_dxt5_encode(ptr ptr long long long long long)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index f8a84a1..0fc3738 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -349,6 +349,7 @@ static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL)
DeleteCriticalSection(&wined3d_wndproc_cs);
DeleteCriticalSection(&wined3d_cs);
+
return TRUE;
}
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 239ccd8..614805a 100644
--- a/include/wine/wined3d.h
@ -1689,5 +1676,5 @@ index 239ccd8..614805a 100644
+
#endif /* __WINE_WINED3D_H */
--
1.9.1
2.7.4

View File

@ -2,3 +2,4 @@ Fixes: [25486] Lego Stunt Rally requires DXTn software de/encoding support
Fixes: [29586] Tumblebugs 2 requires DXTn software encoding support
# Fixes: [14939] Black & White needs DXTn software decoding support
Fixes: [17913] Port Royale doesn't display ocean correctly
Depends: wined3d-WINED3DFMT_B8G8R8X8_UNORM

View File

@ -1,4 +1,4 @@
From e2d79a523dba80544b4358a60b5f248f74eb4c00 Mon Sep 17 00:00:00 2001
From 8fc8b557147de0cffc56501a6ec7ca02b5aa2af0 Mon Sep 17 00:00:00 2001
From: Stanislav Zhukov <koncord@tes3mp.com>
Date: Wed, 11 Jul 2018 09:33:19 +1000
Subject: [PATCH] wined3d: Implement WINED3DFMT_B8G8R8X8_UNORM to
@ -10,11 +10,11 @@ Signed-off-by: Stanislav Zhukov <koncord@tes3mp.com>
1 file changed, 20 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f9e3af37ff4..6ad7bb94573 100644
index 2f74ad6..ba0b647 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -919,6 +919,25 @@ static void convert_x8r8g8b8_dxt5(const BYTE *src, BYTE *dst,
wined3d_dxt5_encode(src, dst, pitch_in, pitch_out, WINED3DFMT_B8G8R8X8_UNORM, w, h);
@@ -801,6 +801,25 @@ static void convert_yuy2_r5g6b5(const BYTE *src, BYTE *dst,
}
}
+static void convert_x8r8g8b8_l8(const BYTE *src, BYTE *dst,
@ -39,14 +39,14 @@ index f9e3af37ff4..6ad7bb94573 100644
struct d3dfmt_converter_desc
{
enum wined3d_format_id from, to;
@@ -933,6 +952,7 @@ static const struct d3dfmt_converter_desc converters[] =
@@ -815,6 +834,7 @@ static const struct d3dfmt_converter_desc converters[] =
{WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_B8G8R8A8_UNORM, convert_a8r8g8b8_x8r8g8b8},
{WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8},
{WINED3DFMT_YUY2, WINED3DFMT_B5G6R5_UNORM, convert_yuy2_r5g6b5},
+ {WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_L8_UNORM, convert_x8r8g8b8_l8},
};
static const struct d3dfmt_converter_desc dxtn_converters[] =
static inline const struct d3dfmt_converter_desc *find_converter(enum wined3d_format_id from,
--
2.18.0
2.7.4