Skip to content

Commit

Permalink
Update GLSL-toggle patch for staging ef11bb6 and move previous versio…
Browse files Browse the repository at this point in the history
…n to legacy
  • Loading branch information
Tk-Glitch committed Sep 11, 2021
1 parent 99797eb commit 9ef7303
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 21 deletions.
2 changes: 1 addition & 1 deletion wine-tkg-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ md5sums=('SKIP'
'ed6060dc030ebd5865f1fcc40d8863be'
'cff441678d798466a13a0d03b01e23d7'
'483db4a06f898354bd84ee0b0964c8d2'
'65d47ea14d7c666d6308fc65a5ccd729'
'ca2d808e943f5c173e93a40f1dea7b01'
'3aafb27f35d4817942085d87904dcfc8'
'49c44bf1b15741358e064fba28092f4e'
'6262b0ff26fd1e00eb6123db5e0a4160'
Expand Down
38 changes: 19 additions & 19 deletions wine-tkg-git/wine-tkg-patches/misc/GLSL-toggle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
--- a/programs/winecfg/staging.c
+++ b/programs/winecfg/staging.c
@@ -133,6 +133,23 @@
#endif
set_reg_key(config_key, keypath(L""), L"ThemeEngine", status ? L"GTK" : NULL);
}

+ /*
+ * OpenGL shading language toggle
+ */
+ static BOOL glsl_get(void)
+ {
+ char *buf = get_reg_key(config_key, "Direct3D", "MaxVersionGL", NULL);
+ BOOL ret = buf ? !!*buf : FALSE;
+ HeapFree(GetProcessHeap(), 0, buf);
+ return ret;
+ }
+/*
+ * OpenGL shading language toggle
+ */
+static BOOL glsl_get(void)
+{
+ char *buf = get_reg_key(config_key, "Direct3D", "MaxVersionGL", NULL);
+ BOOL ret = buf ? !!*buf : FALSE;
+ HeapFree(GetProcessHeap(), 0, buf);
+ return ret;
+}
+
+ static void glsl_set(BOOL status)
+ {
+ set_reg_key(config_key, "Direct3D", "UseGLSL", status ? "disabled" : "enabled");
+ set_reg_key_dword(config_key, "Direct3D", "MaxVersionGL", status ? 0x00030001 : NULL);
+ }
+static void glsl_set(BOOL status)
+{
+ set_reg_key(config_key, "Direct3D", "UseGLSL", status ? "disabled" : "enabled");
+ set_reg_key_dword(config_key, "Direct3D", "MaxVersionGL", status ? 0x00030001 : NULL);
+}
+
static void load_staging_settings(HWND dialog)
{
Expand All @@ -42,9 +42,9 @@
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_ARB, glsl_get() ? BST_CHECKED : BST_UNCHECKED);

#ifndef HAVE_VAAPI
disable(IDC_ENABLE_VAAPI);
}

INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -192,6 +210,10 @@
gtk3_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_GTK3) == BST_CHECKED);
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
2018-12-12
--- 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_ARB 9006

/* About tab */
#define IDC_ABT_OWNER 8432


--- a/programs/winecfg/staging.c
+++ b/programs/winecfg/staging.c
@@ -133,6 +133,23 @@
#endif
}

+ /*
+ * OpenGL shading language toggle
+ */
+ static BOOL glsl_get(void)
+ {
+ char *buf = get_reg_key(config_key, "Direct3D", "MaxVersionGL", NULL);
+ BOOL ret = buf ? !!*buf : FALSE;
+ HeapFree(GetProcessHeap(), 0, buf);
+ return ret;
+ }
+
+ static void glsl_set(BOOL status)
+ {
+ set_reg_key(config_key, "Direct3D", "UseGLSL", status ? "disabled" : "enabled");
+ set_reg_key_dword(config_key, "Direct3D", "MaxVersionGL", status ? 0x00030001 : NULL);
+ }
+
static void load_staging_settings(HWND dialog)
{
CheckDlgButton(dialog, IDC_DISABLE_CSMT, csmt_get() ? BST_CHECKED : BST_UNCHECKED);
@@ -140,6 +157,7 @@
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_ARB, glsl_get() ? BST_CHECKED : BST_UNCHECKED);

#ifndef HAVE_VAAPI
disable(IDC_ENABLE_VAAPI);
@@ -192,6 +210,10 @@
gtk3_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_GTK3) == BST_CHECKED);
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
return TRUE;
+ case IDC_ENABLE_ARB:
+ glsl_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_ARB) == BST_CHECKED);
+ SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
+ return TRUE;
}
break;
}


--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -324,6 +324,7 @@
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 &GTK3 Theming",IDC_ENABLE_GTK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,230,8
+ CONTROL "&Use ARB Shaders",IDC_ENABLE_ARB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,115,230,8
END

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
6 changes: 5 additions & 1 deletion wine-tkg-git/wine-tkg-scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,11 @@ EOM

# GLSL toggle patch - Allows for use of ARB instead of GLSL
if [ "$_GLSL_toggle" = "true" ] && [ "$_use_staging" = "true" ] && [ "$_use_legacy_gallium_nine" != "true" ]; then
_patchname='GLSL-toggle.patch' && _patchmsg="Applied GLSL toggle patch" && nonuser_patcher
if ( cd "${srcdir}"/"${_stgsrcdir}" && git merge-base --is-ancestor ef11bb63ce54490bc5a1e14ab650207b515340da HEAD ); then
_patchname='GLSL-toggle.patch' && _patchmsg="Applied GLSL toggle patch" && nonuser_patcher
else
_patchname='GLSL-toggle-ef11bb6.patch' && _patchmsg="Applied GLSL toggle patch" && nonuser_patcher
fi
fi

# Set a custom fake refresh rate for virtual desktop
Expand Down

0 comments on commit 9ef7303

Please sign in to comment.