winecfg: x11drv: Load vertex shader mode strings from resources.
This commit is contained in:
parent
a3c52ef87b
commit
61404d3d74
|
@ -232,3 +232,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -230,3 +230,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Globale Einstellung benutzen"
|
||||
IDS_SELECT_EXECUTABLE "Ausführbares Programm auswählen"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "Aus"
|
||||
IDS_SHADER_MODE_EMULATION "Emuliert"
|
||||
END
|
||||
|
|
|
@ -232,6 +232,13 @@ BEGIN
|
|||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
||||
/****************************************************************/
|
||||
/* English neutral resources
|
||||
/****************************************************************/
|
||||
|
|
|
@ -226,3 +226,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -229,3 +229,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -230,3 +230,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -226,3 +226,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -224,3 +224,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -233,3 +233,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "전체 설정 사용"
|
||||
IDS_SELECT_EXECUTABLE "실행 파일 선택"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -231,3 +231,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -229,3 +229,10 @@ END
|
|||
IDS_USE_GLOBAL_SETTINGS "Bruk globale innstillinger"
|
||||
IDS_SELECT_EXECUTABLE "Velg en programfil"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -226,3 +226,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -229,3 +229,10 @@ BEGIN
|
|||
IDS_USE_GLOBAL_SETTINGS "Genel ayarları kullan"
|
||||
IDS_SELECT_EXECUTABLE "Çalıştırılabilir bir dosya seçin"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||
IDS_SHADER_MODE_NONE "None"
|
||||
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||
END
|
||||
|
|
|
@ -139,6 +139,9 @@
|
|||
#define IDC_DOUBLE_BUFFER 1104
|
||||
#define IDC_D3D_VSHADER_MODE 1105
|
||||
#define IDC_D3D_PSHADER_MODE 1106
|
||||
#define IDS_SHADER_MODE_HARDWARE 8100
|
||||
#define IDS_SHADER_MODE_NONE 8101
|
||||
#define IDS_SHADER_MODE_EMULATION 8102
|
||||
|
||||
/* applications tab */
|
||||
#define IDC_APP_LISTVIEW 1200
|
||||
|
|
|
@ -38,11 +38,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
|
|||
#define RES_MAXLEN 5 /* the maximum number of characters in a screen dimension. 5 digits should be plenty, what kind of crazy person runs their screen >10,000 pixels across? */
|
||||
|
||||
|
||||
static const char* D3D_VS_Modes[] = {
|
||||
"hardware",
|
||||
"none",
|
||||
"emulation",
|
||||
NULL
|
||||
static struct SHADERMODE
|
||||
{
|
||||
UINT displayStrID;
|
||||
const char* settingStr;
|
||||
} const D3D_VS_Modes[] = {
|
||||
{IDS_SHADER_MODE_HARDWARE, "hardware"},
|
||||
{IDS_SHADER_MODE_EMULATION, "emulation"},
|
||||
{IDS_SHADER_MODE_NONE, "none"},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
|
||||
|
@ -145,17 +149,18 @@ static void init_dialog(HWND dialog)
|
|||
HeapFree(GetProcessHeap(), 0, buf);
|
||||
|
||||
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_RESETCONTENT, 0, 0);
|
||||
for (it = 0; NULL != D3D_VS_Modes[it]; ++it) {
|
||||
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_ADDSTRING, 0, (LPARAM) D3D_VS_Modes[it]);
|
||||
for (it = 0; 0 != D3D_VS_Modes[it].displayStrID; ++it) {
|
||||
SendDlgItemMessageW (dialog, IDC_D3D_VSHADER_MODE, CB_ADDSTRING, 0,
|
||||
(LPARAM)load_string (D3D_VS_Modes[it].displayStrID));
|
||||
}
|
||||
buf = get_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode", "hardware");
|
||||
for (it = 0; NULL != D3D_VS_Modes[it]; ++it) {
|
||||
if (strcmp(buf, D3D_VS_Modes[it]) == 0) {
|
||||
for (it = 0; NULL != D3D_VS_Modes[it].settingStr; ++it) {
|
||||
if (strcmp(buf, D3D_VS_Modes[it].settingStr) == 0) {
|
||||
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_SETCURSEL, it, 0);
|
||||
break ;
|
||||
}
|
||||
}
|
||||
if (NULL == D3D_VS_Modes[it]) {
|
||||
if (NULL == D3D_VS_Modes[it].settingStr) {
|
||||
WINE_ERR("Invalid Direct3D VertexShader Mode read from registry (%s)\n", buf);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, buf);
|
||||
|
@ -238,7 +243,8 @@ static void on_double_buffer_clicked(HWND dialog) {
|
|||
|
||||
static void on_d3d_vshader_mode_changed(HWND dialog) {
|
||||
int selected_mode = SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_GETCURSEL, 0, 0);
|
||||
set_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode", D3D_VS_Modes[selected_mode]);
|
||||
set_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode",
|
||||
D3D_VS_Modes[selected_mode].settingStr);
|
||||
}
|
||||
|
||||
static void on_d3d_pshader_mode_clicked(HWND dialog) {
|
||||
|
|
Loading…
Reference in New Issue