summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2016-05-16 16:17:19 +0100
committeriCatButler <i.am.catbutler@gmail.com>2016-05-16 16:17:19 +0100
commita64d62be4b433fcad3804d3bb616bdf4f13504f4 (patch)
treea149e7e9795065735e4e3966b3b0078b60caeb9b /win32
parent1e37eec079558337768c4487fcd0fdd80ea8b005 (diff)
downloadpcsxr-a64d62be4b433fcad3804d3bb616bdf4f13504f4.tar.gz
Add PGXP configuration dialog
- Allows independent toggling of PGXP, vertex caching and texture correction
Diffstat (limited to 'win32')
-rwxr-xr-xwin32/gui/ConfigurePlugins.c9
-rwxr-xr-xwin32/gui/Win32.h1
-rwxr-xr-xwin32/gui/WndMain.c53
-rwxr-xr-xwin32/pcsxr.rc27
-rwxr-xr-xwin32/resource.h10
5 files changed, 97 insertions, 3 deletions
diff --git a/win32/gui/ConfigurePlugins.c b/win32/gui/ConfigurePlugins.c
index 7abe6119..84c7f93e 100755
--- a/win32/gui/ConfigurePlugins.c
+++ b/win32/gui/ConfigurePlugins.c
@@ -96,6 +96,10 @@ int LoadConfig() {
QueryKeyV("PsxType", Conf->PsxType);
QueryKeyV("PsxClock", Conf->PsxClock);
+ QueryKeyV("PGXP_GTE", Conf->PGXP_GTE);
+ QueryKeyV("PGXP_Cache", Conf->PGXP_Cache);
+ QueryKeyV("PGXP_Texture", Conf->PGXP_Texture);
+
if (Config.Cpu == CPU_DYNAREC) {
Config.Debug = 0; // don't enable debugger if using dynarec core
}
@@ -158,6 +162,11 @@ void SaveConfig() {
SetKeyV("PsxType", Conf->PsxType);
SetKeyV("PsxClock", Conf->PsxClock);
+ SetKeyV("PGXP_GTE", Conf->PGXP_GTE);
+ SetKeyV("PGXP_Cache", Conf->PGXP_Cache);
+ SetKeyV("PGXP_Texture", Conf->PGXP_Texture);
+
+
RegCloseKey(myKey);
}
diff --git a/win32/gui/Win32.h b/win32/gui/Win32.h
index b03a1a09..b5950c81 100755
--- a/win32/gui/Win32.h
+++ b/win32/gui/Win32.h
@@ -42,6 +42,7 @@ void strcatz(char *dst, char *src);
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK ConfigureMcdsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK ConfigurePGXPDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK ConfigureNetPlayDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT WINAPI CheatDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
diff --git a/win32/gui/WndMain.c b/win32/gui/WndMain.c
index b1ff02d3..0e7a7d38 100755
--- a/win32/gui/WndMain.c
+++ b/win32/gui/WndMain.c
@@ -703,6 +703,10 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_CPUCONF), hWnd, (DLGPROC)ConfigureCpuDlgProc);
return TRUE;
+ case ID_CONFIGURATION_PGXP:
+ DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_PGXPCONF), hWnd, (DLGPROC)ConfigurePGXPDlgProc);
+ return TRUE;
+
case ID_CONFIGURATION:
ConfigurePlugins(hWnd);
return TRUE;
@@ -1328,6 +1332,53 @@ BOOL CALLBACK ConfigureMcdsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lPa
return FALSE;
}
+
+BOOL CALLBACK ConfigurePGXPDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ long tmp;
+ RECT rect;
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ SetWindowText(hW, _("PGXP Config"));
+
+ Button_SetCheck(GetDlgItem(hW, IDC_PGXP_GTE), Config.PGXP_GTE);
+ Button_SetCheck(GetDlgItem(hW, IDC_PGXP_CACHE), Config.PGXP_Cache);
+ Button_SetCheck(GetDlgItem(hW, IDC_PGXP_PERSP), Config.PGXP_Texture);
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDCANCEL:
+ EndDialog(hW, FALSE);
+ return TRUE;
+ case IDOK:
+ Config.PGXP_GTE = Button_GetCheck(GetDlgItem(hW, IDC_PGXP_GTE));
+ Config.PGXP_Cache = Button_GetCheck(GetDlgItem(hW, IDC_PGXP_CACHE));
+ Config.PGXP_Texture = Button_GetCheck(GetDlgItem(hW, IDC_PGXP_PERSP));
+
+ if (Config.SaveWindowPos)
+ {
+ GetWindowRect(gApp.hWnd, &rect);
+ Config.WindowPos[0] = rect.left;
+ Config.WindowPos[1] = rect.top;
+ }
+
+ SaveConfig();
+
+ EndDialog(hW, TRUE);
+
+ if (Config.PsxOut) OpenConsole();
+ else CloseConsole();
+
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
BOOL CALLBACK ConfigureCpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
long tmp;
RECT rect;
@@ -1763,6 +1814,8 @@ void CreateMainMenu() {
ADDMENUITEM(0, _("&Memory cards..."), ID_CONFIGURATION_MEMORYCARDMANAGER);
ADDMENUITEM(0, _("C&PU..."), ID_CONFIGURATION_CPU);
ADDSEPARATOR(0);
+ ADDMENUITEM(0, _("&PGXP..."), ID_CONFIGURATION_PGXP);
+ ADDSEPARATOR(0);
ADDMENUITEM(0, _("&NetPlay..."), ID_CONFIGURATION_NETPLAY);
ADDSEPARATOR(0);
ADDMENUITEM(0, _("&Link cable..."), ID_CONFIGURATION_LINKCABLE);
diff --git a/win32/pcsxr.rc b/win32/pcsxr.rc
index afdf6899..caba4fc6 100755
--- a/win32/pcsxr.rc
+++ b/win32/pcsxr.rc
@@ -270,6 +270,20 @@ BEGIN
EDITTEXT IDC_VALUE,41,22,113,12,ES_AUTOHSCROLL
END
+IDD_PGXPCONF DIALOGEX 0, 0, 241, 101
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "PGXP Config"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,55,80,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,127,80,50,14
+ GROUPBOX "Options",IDC_MISCOPT,6,7,229,87
+ CONTROL "Enable PGXP GTE",IDC_PGXP_GTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,24,76,10
+ CONTROL "Enable Vertex Caching",IDC_PGXP_CACHE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,39,88,10
+ CONTROL "Enable Perspective Correct Texturing",IDC_PGXP_PERSP,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,55,133,10
+END
+
/////////////////////////////////////////////////////////////////////////////
//
@@ -341,6 +355,14 @@ BEGIN
IDD_CHEATVALEDIT, DIALOG
BEGIN
END
+
+ IDD_PGXPCONF, DIALOG
+ BEGIN
+ LEFTMARGIN, 6
+ RIGHTMARGIN, 235
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 94
+ END
END
#endif // APSTUDIO_INVOKED
@@ -383,6 +405,11 @@ BEGIN
0
END
+IDD_PGXPCONF AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/win32/resource.h b/win32/resource.h
index 43a2c90c..dc174418 100755
--- a/win32/resource.h
+++ b/win32/resource.h
@@ -35,6 +35,7 @@
#define IDD_COP2C 117
#define MAIN_LOGO 118
#define IDD_CONFIG 120
+#define IDD_PGXPCONF 121
#define IDD_MEMVIEW 136
#define IDC_EDIT2 1001
#define IDC_CODE 1001
@@ -115,7 +116,6 @@
#define IDC_CP021 1034
#define IDC_ASMCHECK20 1034
#define IDC_FIRSTCONTROLLER 1034
-#define IDC_SELPSX2 1034
#define IDC_SELPSXCLOCK 1034
#define IDC_CP022 1035
#define IDC_ASMCHECK21 1035
@@ -158,10 +158,13 @@
#define IDC_LISTCDR 1054
#define IDC_GPR8 1055
#define IDC_LISTBIOS 1055
+#define IDC_PGXP_GTE 1055
#define IDC_GPR9 1056
#define IDC_CONFIGGPU 1056
+#define IDC_PGXP_CACHE 1056
#define IDC_GPR10 1057
#define IDC_TESTGPU 1057
+#define IDC_PGXP_PERSP 1057
#define IDC_ABOUTGPU 1058
#define IDC_CONFIGSPU 1059
#define IDC_TESTSPU 1060
@@ -332,6 +335,7 @@
#define ID_CONFIGURATION_CONTROLLERS 40017
#define ID_CONFIGURATION 40018
#define ID_CONFIGURATION_LINKCABLE 40019
+#define ID_CONFIGURATION_PGXP 40021
#define ID_FILE_RUNBIOS 40026
#define ID_CONFIGURATION_NETPLAY 40043
#define ID_EMULATOR_SWITCH_ISO 40044
@@ -365,7 +369,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 117
#define _APS_NEXT_COMMAND_VALUE 40047
-#define _APS_NEXT_CONTROL_VALUE 1054
-#define _APS_NEXT_SYMED_VALUE 102
+#define _APS_NEXT_CONTROL_VALUE 1056
+#define _APS_NEXT_SYMED_VALUE 103
#endif
#endif