Added patches to allow EAX support to be disabled.

This commit is contained in:
Mark Harmstone
2015-04-05 14:47:34 +01:00
parent 9e0bb28fcb
commit 9138b6d929
2 changed files with 285 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
From 0008314c5601a3b5a4d5273b24d44393d449d3dd Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Sun, 5 Apr 2015 14:16:11 +0100
Subject: winecfg: Add checkbox to enable/disable EAX support.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.0.5"
This is a multi-part message in MIME format.
--------------2.0.5
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
programs/winecfg/resource.h | 1 +
programs/winecfg/staging.c | 21 +++++++++++++++++++++
programs/winecfg/winecfg.rc | 1 +
3 files changed, 23 insertions(+)
--------------2.0.5
Content-Type: text/x-patch; name="0001-winecfg-Add-checkbox-to-enable-disable-EAX-support.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-winecfg-Add-checkbox-to-enable-disable-EAX-support.patch"
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index 4b21d16..a78d9af 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -213,6 +213,7 @@
/* Staging tab */
#define IDC_ENABLE_CSMT 9001
#define IDC_ENABLE_VAAPI 9002
+#define IDC_ENABLE_EAX 9003
/* About tab */
#define IDC_ABT_OWNER 8432
diff --git a/programs/winecfg/staging.c b/programs/winecfg/staging.c
index bda2e6e..0270ebd 100644
--- a/programs/winecfg/staging.c
+++ b/programs/winecfg/staging.c
@@ -65,10 +65,27 @@ static void vaapi_set(BOOL status)
set_reg_key(config_key, keypath("DXVA2"), "backend", status ? "va" : NULL);
}
+/*
+ * EAX
+ */
+static BOOL eax_get(void)
+{
+ BOOL ret;
+ char *value = get_reg_key(config_key, keypath("EAX"), "Enabled", NULL);
+ ret = (value && !strcmp(value, "true"));
+ HeapFree(GetProcessHeap(), 0, value);
+ return ret;
+}
+static void eax_set(BOOL status)
+{
+ set_reg_key(config_key, keypath("EAX"), "Enabled", status ? "true" : "false");
+}
+
static void load_staging_settings(HWND dialog)
{
CheckDlgButton(dialog, IDC_ENABLE_CSMT, csmt_get() ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(dialog, IDC_ENABLE_VAAPI, vaapi_get() ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(dialog, IDC_ENABLE_EAX, eax_get() ? BST_CHECKED : BST_UNCHECKED);
}
INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -102,6 +119,10 @@ INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
vaapi_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_VAAPI) == BST_CHECKED);
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
return TRUE;
+ case IDC_ENABLE_EAX:
+ eax_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_EAX) == 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 171672d..0f1af19 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -315,6 +315,7 @@ BEGIN
LTEXT "The following settings are experimental and may break stuff!\nMake sure to reset them again in case of a problem.",IDC_STATIC,16,16,230,16
CONTROL "Enable &CSMT for better graphic performance",IDC_ENABLE_CSMT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,40,230,8
CONTROL "Enable &VAAPI as backend for DXVA2 GPU decoding",IDC_ENABLE_VAAPI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,55,230,8
+ CONTROL "Enable Environmental Audio E&xtensions (EAX)",IDC_ENABLE_EAX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,70,230,8
END
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
--------------2.0.5--