diff --git a/patches/dxdiag-dontskip/0001-programs-dxdiag-Handle-dontskip-parameter.patch b/patches/dxdiag-dontskip/0001-programs-dxdiag-Handle-dontskip-parameter.patch new file mode 100644 index 00000000..940669e3 --- /dev/null +++ b/patches/dxdiag-dontskip/0001-programs-dxdiag-Handle-dontskip-parameter.patch @@ -0,0 +1,83 @@ +From befe898a3dec51161eb46eab8cd7a271967acb9d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Sun, 28 May 2017 01:54:31 +0200 +Subject: programs/dxdiag: Handle /dontskip parameter. + +--- + programs/dxdiag/main.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/programs/dxdiag/main.c b/programs/dxdiag/main.c +index 3ced122d6e7..7be6ca4a73d 100644 +--- a/programs/dxdiag/main.c ++++ b/programs/dxdiag/main.c +@@ -36,6 +36,7 @@ struct command_line_info + WCHAR outfile[MAX_PATH]; + enum output_type output_type; + BOOL whql_check; ++ BOOL dont_skip; + }; + + static void usage(void) +@@ -110,9 +111,11 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info + static const WCHAR whql_colonW[] = {'w','h','q','l',':',0}; + static const WCHAR offW[] = {'o','f','f',0}; + static const WCHAR onW[] = {'o','n',0}; ++ static const WCHAR dontskipW[] = {'d','o','n','t','s','k','i','p'}; + + info->whql_check = FALSE; + info->output_type = OUTPUT_NONE; ++ info->dont_skip = FALSE; + + while (*cmdline) + { +@@ -132,6 +135,14 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info + + switch (*cmdline) + { ++ case 'd': ++ case 'D': ++ if (strncmpiW(cmdline, dontskipW, sizeof(dontskipW)/sizeof(WCHAR))) ++ return FALSE; ++ ++ info->dont_skip = TRUE; ++ cmdline += sizeof(dontskipW)/sizeof(WCHAR); ++ break; + case 'T': + case 't': + info->output_type = OUTPUT_TEXT; +@@ -152,12 +163,12 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info + if (!strncmpiW(cmdline, offW, 3)) + { + info->whql_check = FALSE; +- cmdline += 2; ++ cmdline += 3; + } + else if (!strncmpiW(cmdline, onW, 2)) + { + info->whql_check = TRUE; +- cmdline++; ++ cmdline += 2; + } + else + return FALSE; +@@ -166,8 +177,6 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info + default: + return FALSE; + } +- +- cmdline++; + } + + return TRUE; +@@ -184,6 +193,7 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm + usage(); + + WINE_TRACE("WHQL check: %s\n", info.whql_check ? "TRUE" : "FALSE"); ++ WINE_TRACE("No skip: %s\n", info.dont_skip ? "TRUE" : "FALSE"); + WINE_TRACE("Output type: %d\n", info.output_type); + if (info.output_type != OUTPUT_NONE) + WINE_TRACE("Output filename: %s\n", debugstr_output_type(info.output_type)); +-- +2.12.2 + diff --git a/patches/dxdiag-dontskip/definition b/patches/dxdiag-dontskip/definition new file mode 100644 index 00000000..c58f9c61 --- /dev/null +++ b/patches/dxdiag-dontskip/definition @@ -0,0 +1 @@ +Fixes: Handle /dontskip parameter in dxdiag diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d2ed377f..5761af6e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -150,6 +150,7 @@ patch_enable_all () enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" enable_dsound_Revert_Cleanup="$1" + enable_dxdiag_dontskip="$1" enable_dxdiagn_Display_Information="$1" enable_dxdiagn_Enumerate_DirectSound="$1" enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1" @@ -690,6 +691,9 @@ patch_enable () dsound-Revert_Cleanup) enable_dsound_Revert_Cleanup="$2" ;; + dxdiag-dontskip) + enable_dxdiag_dontskip="$2" + ;; dxdiagn-Display_Information) enable_dxdiagn_Display_Information="$2" ;; @@ -4177,6 +4181,18 @@ if test "$enable_dsound_EAX" -eq 1; then ) >> "$patchlist" fi +# Patchset dxdiag-dontskip +# | +# | Modified files: +# | * programs/dxdiag/main.c +# | +if test "$enable_dxdiag_dontskip" -eq 1; then + patch_apply dxdiag-dontskip/0001-programs-dxdiag-Handle-dontskip-parameter.patch + ( + printf '%s\n' '+ { "Michael Müller", "programs/dxdiag: Handle /dontskip parameter.", 1 },'; + ) >> "$patchlist" +fi + # Patchset dxdiagn-Display_Information # | # | This patchset fixes the following Wine bugs: