diff --git a/patches/Makefile b/patches/Makefile index 319777e5..5d71c03b 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -722,7 +722,7 @@ iphlpapi-TCP_Table.ok: # | * [#36216] Hearthstone fails to start # | # | Modified files: -# | * dlls/kernel32/process.c +# | * dlls/kernel32/console.c, dlls/kernel32/process.c # | .INTERMEDIATE: kernel32-Create_Handles_for_New_Consoles.ok kernel32-Create_Handles_for_New_Consoles.ok: diff --git a/patches/kernel32-Create_Handles_for_New_Consoles/0001-kernel32-Allocate-console-handles-for-new-consoles-a.patch b/patches/kernel32-Create_Handles_for_New_Consoles/0001-kernel32-Allocate-console-handles-for-new-consoles-a.patch index 755f1ca1..917862de 100644 --- a/patches/kernel32-Create_Handles_for_New_Consoles/0001-kernel32-Allocate-console-handles-for-new-consoles-a.patch +++ b/patches/kernel32-Create_Handles_for_New_Consoles/0001-kernel32-Allocate-console-handles-for-new-consoles-a.patch @@ -1,26 +1,53 @@ -From d0bb3326c980625e1b5424a3603928380878599f Mon Sep 17 00:00:00 2001 +From d15f6c220c9892be869e50e4a5f52a1bbc2e5b60 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 3 Jan 2015 23:37:42 -0700 Subject: kernel32: Allocate console handles for new consoles at long as the process is not detached. --- - dlls/kernel32/process.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + dlls/kernel32/console.c | 3 ++- + dlls/kernel32/process.c | 8 +++++++- + 2 files changed, 9 insertions(+), 2 deletions(-) +diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c +index 303b638..8243de2 100644 +--- a/dlls/kernel32/console.c ++++ b/dlls/kernel32/console.c +@@ -3061,7 +3061,8 @@ DWORD WINAPI GetConsoleProcessList(LPDWORD processlist, DWORD processcount) + BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params) + { + memset(&S_termios, 0, sizeof(S_termios)); +- if (params->ConsoleHandle == KERNEL32_CONSOLE_SHELL) ++ if (params->ConsoleHandle == KERNEL32_CONSOLE_SHELL || ++ params->ConsoleHandle == KERNEL32_CONSOLE_ALLOC) + { + HANDLE conin; + diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 0a087ab..ba59244 100644 +index 0a087ab..0979978 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c -@@ -1679,7 +1679,7 @@ static startup_info_t *create_startup_info( LPCWSTR filename, LPCWSTR cmdline, +@@ -1679,13 +1679,19 @@ static startup_info_t *create_startup_info( LPCWSTR filename, LPCWSTR cmdline, info->hstdin = wine_server_obj_handle( hstdin ); info->hstdout = wine_server_obj_handle( hstdout ); info->hstderr = wine_server_obj_handle( hstderr ); - if ((flags & (CREATE_NEW_CONSOLE | DETACHED_PROCESS)) != 0) -+ if (flags & DETACHED_PROCESS) /* FIXME: probably not correct, needs more tests */ ++ if (flags & DETACHED_PROCESS) { /* this is temporary (for console handles). We have no way to control that the handle is invalid in child process otherwise */ if (is_console_handle(hstdin)) info->hstdin = wine_server_obj_handle( INVALID_HANDLE_VALUE ); + if (is_console_handle(hstdout)) info->hstdout = wine_server_obj_handle( INVALID_HANDLE_VALUE ); + if (is_console_handle(hstderr)) info->hstderr = wine_server_obj_handle( INVALID_HANDLE_VALUE ); + } ++ else if (flags & CREATE_NEW_CONSOLE) ++ { ++ info->hstdin = 0; ++ info->hstdout = 0; ++ info->hstderr = 0; ++ } + else + { + if (is_console_handle(hstdin)) info->hstdin = console_handle_unmap(hstdin); -- 1.9.1 diff --git a/patches/kernel32-NeedCurrentDirectoryForExePath/0002-kernel32-NeedCurrentDirectoryForExePath-does-not-use.patch b/patches/kernel32-NeedCurrentDirectoryForExePath/0002-kernel32-NeedCurrentDirectoryForExePath-does-not-use.patch index 076b61cf..b9ed870a 100644 --- a/patches/kernel32-NeedCurrentDirectoryForExePath/0002-kernel32-NeedCurrentDirectoryForExePath-does-not-use.patch +++ b/patches/kernel32-NeedCurrentDirectoryForExePath/0002-kernel32-NeedCurrentDirectoryForExePath-does-not-use.patch @@ -17,7 +17,7 @@ index bb167a0..dc90e58 100644 - /* MSDN mentions some 'registry location'. We do not use registry. */ - FIXME("(%s): partial stub\n", debugstr_w(name)); -+ TRACE("(%s)\n"); ++ TRACE("(%s)\n", debugstr_w(name)); if (strchrW(name, '\\')) return TRUE;