-
Notifications
You must be signed in to change notification settings - Fork 9
/
staging-helper.patch
112 lines (102 loc) · 4.19 KB
/
staging-helper.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
From 5d144635348cb686f89593311bd6218aa99b5dc3 Mon Sep 17 00:00:00 2001
From: Nick Sarnie <sarnex@gentoo.org>
Date: Mon, 18 Feb 2019 10:04:44 -0500
Subject: [PATCH] Staging Helper
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
---
dlls/ntdll/loadorder.c | 2 ++
programs/winecfg/resource.h | 1 +
programs/winecfg/staging.c | 25 +++++++++++++++++++++++++
programs/winecfg/winecfg.rc | 1 +
4 files changed, 29 insertions(+)
diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c
index d05d7b321e..7945d2a599 100644
--- a/dlls/ntdll/loadorder.c
+++ b/dlls/ntdll/loadorder.c
@@ -629,8 +629,10 @@ WCHAR* get_redirect( const WCHAR *app_name, const WCHAR *path, BYTE *buffer, ULO
goto done;
/* then module basename without '*' (only if explicit path) */
+ /*
if (basename != module+1 && (ret = get_redirect_value( std_key, app_key, basename, buffer, size )))
goto done;
+ */
/* and last the hard-coded default */
ret = NULL;
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index 96f2429090..06f41f5c70 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -219,6 +219,7 @@
#define IDC_ENABLE_EAX 9003
#define IDC_ENABLE_HIDEWINE 9004
#define IDC_ENABLE_GTK3 9005
+#define IDC_ENABLE_NATIVE_D3D9 9006
/* About tab */
#define IDC_ABT_OWNER 8432
diff --git a/programs/winecfg/staging.c b/programs/winecfg/staging.c
index df9bf0f1ad..cccfa02957 100644
--- a/programs/winecfg/staging.c
+++ b/programs/winecfg/staging.c
@@ -121,6 +121,23 @@ static void gtk3_set(BOOL status)
#endif
}
+/*
+ * Gallium nine
+ */
+static BOOL nine_get(void)
+{
+ BOOL ret;
+ char *value = get_reg_key(config_key, keypath("DllRedirects"), "d3d9", NULL);
+ ret = (value && !strcmp(value, "d3d9-nine.dll"));
+ HeapFree(GetProcessHeap(), 0, value);
+ return ret;
+}
+
+static void nine_set(BOOL status)
+{
+ set_reg_key(config_key, keypath("DllRedirects"), "d3d9", status ? "d3d9-nine.dll" : NULL);
+}
+
static void load_staging_settings(HWND dialog)
{
CheckDlgButton(dialog, IDC_ENABLE_CSMT, csmt_get() ? BST_CHECKED : BST_UNCHECKED);
@@ -128,6 +145,7 @@ static void load_staging_settings(HWND dialog)
CheckDlgButton(dialog, IDC_ENABLE_EAX, eax_get() ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(dialog, IDC_ENABLE_HIDEWINE, hidewine_get() ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(dialog, IDC_ENABLE_GTK3, gtk3_get() ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(dialog, IDC_ENABLE_NATIVE_D3D9, nine_get() ? BST_CHECKED : BST_UNCHECKED);
#ifndef HAVE_VAAPI
disable(IDC_ENABLE_VAAPI);
@@ -135,6 +153,9 @@ static void load_staging_settings(HWND dialog)
#ifndef HAVE_GTK3
disable(IDC_ENABLE_GTK3);
#endif
+#if !defined(HAVE_D3D9NINE)
+ disable(IDC_ENABLE_NATIVE_D3D9);
+#endif
}
INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -180,6 +201,10 @@ INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
gtk3_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_GTK3) == BST_CHECKED);
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
return TRUE;
+ case IDC_ENABLE_NATIVE_D3D9:
+ nine_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_NATIVE_D3D9) == BST_CHECKED);
+ SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
+ return TRUE;
}
break;
}
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
index 33f2642ed6..ad9c9d894f 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -324,6 +324,7 @@ BEGIN
CONTROL "Enable Environmental Audio E&xtensions (EAX)",IDC_ENABLE_EAX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,70,230,8
CONTROL "&Hide Wine version from applications",IDC_ENABLE_HIDEWINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,85,230,8
CONTROL "Enable >K3 Theming",IDC_ENABLE_GTK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,230,8
+ CONTROL "Enable Gallium &Nine for better D3D9 graphic performance",IDC_ENABLE_NATIVE_D3D9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,115,230,8
END
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
--
2.20.1