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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Globale Einstellung benutzen"
|
||||||
IDS_SELECT_EXECUTABLE "Ausführbares Programm auswählen"
|
IDS_SELECT_EXECUTABLE "Ausführbares Programm auswählen"
|
||||||
END
|
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"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_SHADER_MODE_HARDWARE "Hardware"
|
||||||
|
IDS_SHADER_MODE_NONE "None"
|
||||||
|
IDS_SHADER_MODE_EMULATION "Emulated"
|
||||||
|
END
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
/* English neutral resources
|
/* English neutral resources
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
|
@ -226,3 +226,10 @@ BEGIN
|
||||||
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
IDS_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "전체 설정 사용"
|
||||||
IDS_SELECT_EXECUTABLE "실행 파일 선택"
|
IDS_SELECT_EXECUTABLE "실행 파일 선택"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Bruk globale innstillinger"
|
||||||
IDS_SELECT_EXECUTABLE "Velg en programfil"
|
IDS_SELECT_EXECUTABLE "Velg en programfil"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Use global settings"
|
||||||
IDS_SELECT_EXECUTABLE "Select an executable file"
|
IDS_SELECT_EXECUTABLE "Select an executable file"
|
||||||
END
|
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_USE_GLOBAL_SETTINGS "Genel ayarları kullan"
|
||||||
IDS_SELECT_EXECUTABLE "Çalıştırılabilir bir dosya seçin"
|
IDS_SELECT_EXECUTABLE "Çalıştırılabilir bir dosya seçin"
|
||||||
END
|
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_DOUBLE_BUFFER 1104
|
||||||
#define IDC_D3D_VSHADER_MODE 1105
|
#define IDC_D3D_VSHADER_MODE 1105
|
||||||
#define IDC_D3D_PSHADER_MODE 1106
|
#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 */
|
/* applications tab */
|
||||||
#define IDC_APP_LISTVIEW 1200
|
#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? */
|
#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[] = {
|
static struct SHADERMODE
|
||||||
"hardware",
|
{
|
||||||
"none",
|
UINT displayStrID;
|
||||||
"emulation",
|
const char* settingStr;
|
||||||
NULL
|
} 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);
|
HeapFree(GetProcessHeap(), 0, buf);
|
||||||
|
|
||||||
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_RESETCONTENT, 0, 0);
|
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_RESETCONTENT, 0, 0);
|
||||||
for (it = 0; NULL != D3D_VS_Modes[it]; ++it) {
|
for (it = 0; 0 != D3D_VS_Modes[it].displayStrID; ++it) {
|
||||||
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_ADDSTRING, 0, (LPARAM) D3D_VS_Modes[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");
|
buf = get_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode", "hardware");
|
||||||
for (it = 0; NULL != D3D_VS_Modes[it]; ++it) {
|
for (it = 0; NULL != D3D_VS_Modes[it].settingStr; ++it) {
|
||||||
if (strcmp(buf, D3D_VS_Modes[it]) == 0) {
|
if (strcmp(buf, D3D_VS_Modes[it].settingStr) == 0) {
|
||||||
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_SETCURSEL, it, 0);
|
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_SETCURSEL, it, 0);
|
||||||
break ;
|
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);
|
WINE_ERR("Invalid Direct3D VertexShader Mode read from registry (%s)\n", buf);
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(), 0, 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) {
|
static void on_d3d_vshader_mode_changed(HWND dialog) {
|
||||||
int selected_mode = SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_GETCURSEL, 0, 0);
|
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) {
|
static void on_d3d_pshader_mode_clicked(HWND dialog) {
|
||||||
|
|
Loading…
Reference in New Issue