Commit 6b6502b0 authored by Michael Müller's avatar Michael Müller Committed by Vitaly Lipatov

winecfg: Add staging tab for CSMT.

parent 611b1a4e
......@@ -11,6 +11,7 @@ C_SRCS = \
driveui.c \
libraries.c \
main.c \
staging.c \
theme.c \
winecfg.c \
x11drvdlg.c
......
......@@ -58,7 +58,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
return 0;
}
#define NUM_PROPERTY_PAGES 7
#define NUM_PROPERTY_PAGES 8
static INT_PTR
doPropertySheet (HINSTANCE hInstance, HWND hOwner)
......@@ -139,6 +139,16 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
psp[pg].lParam = 0;
pg++;
psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_STAGING);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = StagingDlgProc;
psp[pg].pszTitle = load_string (IDS_TAB_STAGING);
psp[pg].lParam = 0;
pg++;
/*
* Fill out the (General) PROPSHEETPAGE data structure
* for the property sheet
......
......@@ -45,6 +45,7 @@
#define IDS_SHELL_FOLDER 16
#define IDS_LINKS_TO 17
#define IDS_WINECFG_TITLE_APP 18 /* App specific title */
#define IDS_TAB_STAGING 19
#define IDI_WINECFG 100
#define IDI_LOGO 102
#define IDD_ABOUTCFG 107
......@@ -54,6 +55,7 @@
#define IDD_DLLCFG 111
#define IDD_DRIVECFG 112
#define IDD_DESKTOP_INTEGRATION 115
#define IDD_STAGING 116
#define IDC_WINVER 1012
#define IDC_DESKTOP_WIDTH 1023
#define IDC_DESKTOP_HEIGHT 1024
......@@ -210,6 +212,9 @@
#define IDC_SYSPARAMS_MENU_HIGHLIGHT 8430
#define IDC_SYSPARAMS_MENUBAR 8431
/* Staging tab */
#define IDC_ENABLE_CSMT 9001
/* About tab */
#define IDC_ABT_OWNER 8432
#define IDC_ABT_ORG 8433
......
/*
* WineCfg Staging panel
*
* Copyright 2014 Michael Müller
* Copyright 2015 Sebastian Lackner
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#define COBJMACROS
#include <windows.h>
#include "resource.h"
#include "winecfg.h"
/*
* Command stream multithreading
*/
static BOOL csmt_get(void)
{
WCHAR *buf = get_reg_key(config_key, L"Direct3D", L"csmt", NULL);
BOOL ret = buf ? !!*buf : TRUE;
HeapFree(GetProcessHeap(), 0, buf);
return ret;
}
static void csmt_set(BOOL status)
{
set_reg_key_dword(config_key, L"Direct3D", L"csmt", status);
}
static void load_staging_settings(HWND dialog)
{
CheckDlgButton(dialog, IDC_ENABLE_CSMT, csmt_get() ? BST_CHECKED : BST_UNCHECKED);
}
INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == PSN_SETACTIVE)
load_staging_settings(hDlg);
break;
case WM_SHOWWINDOW:
set_window_title(hDlg);
break;
case WM_DESTROY:
break;
case WM_COMMAND:
if (HIWORD(wParam) != BN_CLICKED) break;
switch (LOWORD(wParam))
{
case IDC_ENABLE_CSMT:
csmt_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_CSMT) == BST_CHECKED);
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
return TRUE;
}
break;
}
return FALSE;
}
......@@ -83,6 +83,7 @@ INT_PTR CALLBACK AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
INT_PTR CALLBACK LibrariesDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK StagingDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* Windows version management */
......
......@@ -38,6 +38,7 @@ BEGIN
IDS_TAB_GRAPHICS "Graphics"
IDS_TAB_DESKTOP_INTEGRATION "Desktop Integration"
IDS_TAB_AUDIO "Audio"
IDS_TAB_STAGING "Staging"
IDS_TAB_ABOUT "About"
IDS_WINECFG_TITLE "Wine configuration"
IDS_WINECFG_TITLE_APP "Wine configuration for %s"
......@@ -310,6 +311,15 @@ BEGIN
PUSHBUTTON "B&rowse...",IDC_BROWSE_SFPATH,195,195,50,13,WS_DISABLED
END
IDD_STAGING DIALOG 0, 0, 260, 220
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Staging settings",IDC_STATIC,8,4,244,210
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 (deprecated)",IDC_ENABLE_CSMT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,40,230,8
END
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: winecfg.ico */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment