mirror of https://github.com/PCSX2/pcsx2.git
zzogl-pg: Majorly revise the Windows config dialog box. (May still need more work.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3784 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
c728bf2ddf
commit
0c151275eb
|
@ -37,62 +37,27 @@ void CALLBACK GSkeyEvent(keyEvent *ev)
|
|||
|
||||
#include "Win32/resource.h"
|
||||
|
||||
BOOL CALLBACK LoggingDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
map<int, int> mapConfOpts;
|
||||
#define PUT_CONF(id) mapConfOpts[IDC_CONFOPT_##id] = 0x##id;
|
||||
|
||||
void OnAdvOK(HWND hW)
|
||||
{
|
||||
switch (uMsg)
|
||||
conf.hacks._u32 = 0;
|
||||
|
||||
for (map<int, int>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
||||
{
|
||||
if (IsDlgButtonChecked(hW, it->first)) conf.hacks._u32 |= it->second;
|
||||
}
|
||||
|
||||
case WM_INITDIALOG:
|
||||
|
||||
if (conf.log) CheckDlgButton(hW, IDC_LOG, true);
|
||||
|
||||
return true;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDCANCEL:
|
||||
EndDialog(hW, true);
|
||||
return true;
|
||||
|
||||
case IDOK:
|
||||
|
||||
if (IsDlgButtonChecked(hW, IDC_LOG))
|
||||
conf.log = 1;
|
||||
else
|
||||
conf.log = 0;
|
||||
GSsetGameCRC(g_LastCRC, conf.hacks._u32);
|
||||
|
||||
SaveConfig();
|
||||
|
||||
EndDialog(hW, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
map<int, int> mapConfOpts;
|
||||
#define PUT_CONF(id) mapConfOpts[IDC_CONFOPT_##id] = 0x##id;
|
||||
|
||||
void OnInitDialog(HWND hW)
|
||||
void OnInitAdvDialog(HWND hW)
|
||||
{
|
||||
if (!(conf.zz_options.loaded)) LoadConfig();
|
||||
|
||||
CheckDlgButton(hW, IDC_CONFIG_INTERLACE, conf.interlace);
|
||||
CheckDlgButton(hW, IDC_CONFIG_BILINEAR, conf.bilinear);
|
||||
CheckDlgButton(hW, IDC_CONFIG_DEPTHWRITE, conf.mrtdepth);
|
||||
CheckRadioButton(hW, IDC_CONFIG_AANONE, IDC_CONFIG_AA4, IDC_CONFIG_AANONE + conf.aa);
|
||||
CheckDlgButton(hW, IDC_CONFIG_WIREFRAME, (conf.wireframe()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_CAPTUREAVI, (conf.captureAvi()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_FULLSCREEN, (conf.fullscreen()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_WIDESCREEN, (conf.widescreen()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_BMPSS, (conf.zz_options.tga_snap) ? 1 : 0);
|
||||
CheckRadioButton(hW, IDC_CONF_WIN640, IDC_CONF_WIN1280, IDC_CONF_WIN640 + conf.zz_options.dimensions);
|
||||
|
||||
prevbilinearfilter = conf.bilinear;
|
||||
|
||||
mapConfOpts.clear();
|
||||
|
||||
PUT_CONF(00000001);
|
||||
|
@ -129,45 +94,87 @@ void OnInitDialog(HWND hW)
|
|||
}
|
||||
}
|
||||
|
||||
void OnOK(HWND hW)
|
||||
BOOL CALLBACK AdvancedDialogProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
OnInitAdvDialog(hW);
|
||||
return true;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDCANCEL:
|
||||
EndDialog(hW, true);
|
||||
return true;
|
||||
|
||||
case IDOK:
|
||||
OnAdvOK(hW);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CALLBACK AdvancedDialog()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_ADV_OPTIONS),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)AdvancedDialogProc);
|
||||
}
|
||||
|
||||
void OnInitConfDialog(HWND hW)
|
||||
{
|
||||
if (!(conf.zz_options.loaded)) LoadConfig();
|
||||
|
||||
TCHAR *aaName[] = {"None", "x2", "x4", "x8", "x16"};
|
||||
|
||||
for(int i=0; i<5; i++)
|
||||
{
|
||||
ComboBox_AddString(GetDlgItem(hW, IDC_AA_COMBO), (LPARAM)aaName[i]);
|
||||
}
|
||||
ComboBox_SelectString(GetDlgItem(hW, IDC_AA_COMBO), -1, (LPARAM)aaName[conf.aa]);
|
||||
|
||||
TCHAR *sizeName[] = {"640 x 480", "800 x 600", "1024 x 768", "1280 x 960"};
|
||||
|
||||
for(int i=0; i<4; i++)
|
||||
{
|
||||
ComboBox_AddString(GetDlgItem(hW, IDC_WIN_SIZE_COMBO), (LPARAM)sizeName[i]);
|
||||
}
|
||||
ComboBox_SelectString(GetDlgItem(hW, IDC_WIN_SIZE_COMBO), -1, (LPARAM)sizeName[conf.zz_options.dimensions]);
|
||||
|
||||
CheckDlgButton(hW, IDC_CONFIG_INTERLACE, conf.interlace);
|
||||
CheckDlgButton(hW, IDC_CONFIG_BILINEAR, conf.bilinear);
|
||||
CheckDlgButton(hW, IDC_CONFIG_DEPTHWRITE, conf.mrtdepth);
|
||||
CheckDlgButton(hW, IDC_CONFIG_WIREFRAME, (conf.wireframe()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_CAPTUREAVI, (conf.captureAvi()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_FULLSCREEN, (conf.fullscreen()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_WIDESCREEN, (conf.widescreen()) ? 1 : 0);
|
||||
CheckDlgButton(hW, IDC_CONFIG_BMPSS, (conf.zz_options.tga_snap) ? 1 : 0);
|
||||
|
||||
prevbilinearfilter = conf.bilinear;
|
||||
}
|
||||
|
||||
void OnConfOK(HWND hW)
|
||||
{
|
||||
u32 newinterlace = IsDlgButtonChecked(hW, IDC_CONFIG_INTERLACE);
|
||||
|
||||
if (!conf.interlace) conf.interlace = newinterlace;
|
||||
else if (!newinterlace) conf.interlace = 2; // off
|
||||
if (!conf.interlace)
|
||||
conf.interlace = newinterlace;
|
||||
else if (!newinterlace)
|
||||
conf.interlace = 2; // off
|
||||
|
||||
conf.bilinear = IsDlgButtonChecked(hW, IDC_CONFIG_BILINEAR);
|
||||
|
||||
// restore
|
||||
if (conf.bilinear && prevbilinearfilter)
|
||||
conf.bilinear = prevbilinearfilter;
|
||||
if (conf.bilinear && prevbilinearfilter) conf.bilinear = prevbilinearfilter;
|
||||
|
||||
//conf.mrtdepth = 1;//IsDlgButtonChecked(hW, IDC_CONFIG_DEPTHWRITE);
|
||||
|
||||
if (SendDlgItemMessage(hW, IDC_CONFIG_AANONE, BM_GETCHECK, 0, 0))
|
||||
{
|
||||
conf.aa = 0;
|
||||
}
|
||||
else if (SendDlgItemMessage(hW, IDC_CONFIG_AA2, BM_GETCHECK, 0, 0))
|
||||
{
|
||||
conf.aa = 1;
|
||||
}
|
||||
else if (SendDlgItemMessage(hW, IDC_CONFIG_AA4, BM_GETCHECK, 0, 0))
|
||||
{
|
||||
conf.aa = 2;
|
||||
}
|
||||
else if (SendDlgItemMessage(hW, IDC_CONFIG_AA8, BM_GETCHECK, 0, 0))
|
||||
{
|
||||
conf.aa = 3;
|
||||
}
|
||||
else if (SendDlgItemMessage(hW, IDC_CONFIG_AA16, BM_GETCHECK, 0, 0))
|
||||
{
|
||||
conf.aa = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
conf.aa = 0;
|
||||
}
|
||||
if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_AA_COMBO)) != -1)
|
||||
conf.aa = ComboBox_GetCurSel(GetDlgItem(hW, IDC_AA_COMBO));
|
||||
|
||||
conf.zz_options._u32 = 0;
|
||||
|
||||
|
@ -177,22 +184,13 @@ void OnOK(HWND hW)
|
|||
conf.zz_options.widescreen = IsDlgButtonChecked(hW, IDC_CONFIG_WIDESCREEN) ? 1 : 0;
|
||||
conf.zz_options.tga_snap = IsDlgButtonChecked(hW, IDC_CONFIG_BMPSS) ? 1 : 0;
|
||||
|
||||
conf.hacks._u32 = 0;
|
||||
|
||||
for (map<int, int>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
||||
{
|
||||
if (IsDlgButtonChecked(hW, it->first)) conf.hacks._u32 |= it->second;
|
||||
}
|
||||
|
||||
GSsetGameCRC(g_LastCRC, conf.hacks._u32);
|
||||
|
||||
if (SendDlgItemMessage(hW, IDC_CONF_WIN640, BM_GETCHECK, 0, 0))
|
||||
if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 0)
|
||||
conf.zz_options.dimensions = GSDim_640;
|
||||
else if (SendDlgItemMessage(hW, IDC_CONF_WIN800, BM_GETCHECK, 0, 0))
|
||||
else if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 1)
|
||||
conf.zz_options.dimensions = GSDim_800;
|
||||
else if (SendDlgItemMessage(hW, IDC_CONF_WIN1024, BM_GETCHECK, 0, 0))
|
||||
else if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 2)
|
||||
conf.zz_options.dimensions = GSDim_1024;
|
||||
else if (SendDlgItemMessage(hW, IDC_CONF_WIN1280, BM_GETCHECK, 0, 0))
|
||||
else if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 3)
|
||||
conf.zz_options.dimensions = GSDim_1280;
|
||||
|
||||
SaveConfig();
|
||||
|
@ -205,19 +203,26 @@ BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
OnInitDialog(hW);
|
||||
OnInitConfDialog(hW);
|
||||
return true;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_AA_COMBO:
|
||||
break;
|
||||
|
||||
case IDC_ADV_BTN:
|
||||
AdvancedDialog();
|
||||
return true;
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog(hW, true);
|
||||
return true;
|
||||
|
||||
case IDOK:
|
||||
OnOK(hW);
|
||||
OnConfOK(hW);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -225,13 +230,26 @@ BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return false;
|
||||
}
|
||||
|
||||
void CALLBACK GSconfigure()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_CONFIG2),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)ConfigureDlgProc);
|
||||
|
||||
if (g_nPixelShaderVer == SHADER_REDUCED) conf.bilinear = 0;
|
||||
}
|
||||
|
||||
s32 CALLBACK GStest()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
//ZeroGS uses floating point render targets because A8R8G8B8 format is not sufficient for ps2 blending and this requires alpha blending on floating point render targets
|
||||
//There might be a problem with pixel shader precision with older geforce models (textures will look blocky).
|
||||
return true;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
@ -246,21 +264,6 @@ BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return false;
|
||||
}
|
||||
|
||||
void CALLBACK GSconfigure()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
MAKEINTRESOURCE(IDD_CONFIG),
|
||||
GetActiveWindow(),
|
||||
(DLGPROC)ConfigureDlgProc);
|
||||
|
||||
if (g_nPixelShaderVer == SHADER_REDUCED) conf.bilinear = 0;
|
||||
}
|
||||
|
||||
s32 CALLBACK GStest()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CALLBACK GSabout()
|
||||
{
|
||||
DialogBox(hInst,
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#define IDC_CONF_DEFAULT 3
|
||||
#define IDR_DATA1 112
|
||||
#define IDD_ADV_OPTIONS 113
|
||||
#define IDD_DIALOG1 114
|
||||
#define IDD_CONFIG2 114
|
||||
#define IDC_ABOUTTEXT 1015
|
||||
#define IDC_CONFIG_AA 1016
|
||||
|
@ -52,12 +51,15 @@
|
|||
#define IDC_CONFOPT_00004000 1047
|
||||
#define IDC_BUTTON1 1048
|
||||
#define IDC_CONFOPT_COMPUTEOR 1048
|
||||
#define IDC_ADV_BTN 1048
|
||||
#define IDC_CONFOPT_4001 1049
|
||||
#define IDC_CONFOPT_00000010 1049
|
||||
#define IDC_CONFOPT_00008000 1050
|
||||
#define IDC_CONFOPT_00010000 1052
|
||||
#define IDC_CONFOPT_00020000 1054
|
||||
#define IDC_AA_COMBO 1054
|
||||
#define IDC_CONFOPT_00000002 1055
|
||||
#define IDC_WIN_SIZE_COMBO 1055
|
||||
#define IDC_CONFOPT_01000000 1056
|
||||
#define IDC_CONFOPT_00800000 1057
|
||||
#define IDC_CONFOPT_00000008 1058
|
||||
|
@ -80,7 +82,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 116
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1051
|
||||
#define _APS_NEXT_CONTROL_VALUE 1056
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -206,32 +206,28 @@ BEGIN
|
|||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,266,365,8
|
||||
END
|
||||
|
||||
IDD_CONFIG2 DIALOGEX 0, 0, 171, 217
|
||||
IDD_CONFIG2 DIALOGEX 0, 0, 159, 160
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ZZOgl Options"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,55,192,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,108,192,50,14
|
||||
GROUPBOX "Static",IDC_STATIC,7,7,152,183
|
||||
CONTROL "Logging (For Debugging)",1000,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,18,102,10
|
||||
DEFPUSHBUTTON "OK",IDOK,37,138,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,91,138,50,14
|
||||
CONTROL "Logging (For Debugging)",1000,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,102,10
|
||||
CONTROL "Interlace Enable (toggle with F5). There are 2 modes + interlace off",IDC_CONFIG_INTERLACE,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,45,137,18
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,32,137,18
|
||||
CONTROL "Bilinear Filtering (Shift+F5). Best quality is on, turn off for speed.",IDC_CONFIG_BILINEAR,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,67,137,18
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,50,137,18
|
||||
CONTROL "Capture Avi (zerogs.avi) (F12)",IDC_CONFIG_CAPTUREAVI,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,103,109,10
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,82,109,10
|
||||
CONTROL "Save Snapshots as BMP(default is JPG)",IDC_CONFIG_BMPSS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,116,141,10
|
||||
CONTROL "Wide Screen",IDC_CONFIG_WIDESCREEN,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,90,109,10
|
||||
CONTROL "640 x 480",IDC_CONF_WIN640,"Button",BS_AUTORADIOBUTTON | WS_GROUP,20,140,59,8
|
||||
CONTROL "800 x 600",IDC_CONF_WIN800,"Button",BS_AUTORADIOBUTTON,21,152,59,8
|
||||
CONTROL "1024 x 768",IDC_CONF_WIN1024,"Button",BS_AUTORADIOBUTTON,86,140,59,8
|
||||
CONTROL "1280 x 960",IDC_CONF_WIN1280,"Button",BS_AUTORADIOBUTTON,86,151,53,8
|
||||
GROUPBOX "Default Window Size (no speed impact)",IDC_STATIC,14,129,137,39
|
||||
COMBOBOX IDC_COMBO1,59,31,48,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Anti-aliasing",IDC_STATIC,15,33,43,13
|
||||
PUSHBUTTON "Advanced...",IDC_BUTTON1,17,170,134,14
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,93,141,10
|
||||
CONTROL "Wide Screen",IDC_CONFIG_WIDESCREEN,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,69,109,10
|
||||
LTEXT "Anti-aliasing",IDC_STATIC,7,20,43,13
|
||||
PUSHBUTTON "Advanced...",IDC_ADV_BTN,7,118,134,14
|
||||
COMBOBOX IDC_AA_COMBO,53,18,48,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_WIN_SIZE_COMBO,78,104,62,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Default Window Size",IDC_STATIC,7,106,68,8
|
||||
END
|
||||
|
||||
|
||||
|
@ -277,9 +273,9 @@ BEGIN
|
|||
IDD_CONFIG2, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 164
|
||||
RIGHTMARGIN, 152
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 210
|
||||
BOTTOMMARGIN, 152
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
@ -311,27 +307,6 @@ END
|
|||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_CONFIG2 DLGINIT
|
||||
BEGIN
|
||||
IDC_COMBO1, 0x403, 5, 0
|
||||
0x6f4e, 0x656e, "\000"
|
||||
IDC_COMBO1, 0x403, 3, 0
|
||||
0x5832, "\000"
|
||||
IDC_COMBO1, 0x403, 3, 0
|
||||
0x5834, "\000"
|
||||
IDC_COMBO1, 0x403, 3, 0
|
||||
0x5838, "\000"
|
||||
IDC_COMBO1, 0x403, 4, 0
|
||||
0x3631, 0x0058,
|
||||
0
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -528,11 +528,11 @@
|
|||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ps2hw.dat"
|
||||
RelativePath="..\ps2hw.dat"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\ps2hw.dat"
|
||||
RelativePath=".\ps2hw.dat"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
|
|
Loading…
Reference in New Issue