mirror of https://github.com/snes9xgit/snes9x.git
win32: Shaders: Save parameters and restore on cancel.
Also, change "Parameters" button to "Parameters..." to indicate it opens a dialog box.
This commit is contained in:
parent
e678ad558d
commit
93a4cdea96
|
@ -164,11 +164,16 @@ CShaderParamDlg::~CShaderParamDlg()
|
|||
|
||||
bool CShaderParamDlg::show()
|
||||
{
|
||||
saved_parameters = shader.param;
|
||||
|
||||
if(DialogBoxParam(GUI.hInstance, MAKEINTRESOURCE(IDD_DIALOG_SHADER_PARAMS), GUI.hWnd, DlgShaderParams, (LPARAM)this) == IDOK)
|
||||
{
|
||||
save_custom_shader();
|
||||
return true;
|
||||
}
|
||||
|
||||
shader.param = saved_parameters;
|
||||
WinRefreshDisplay();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ private:
|
|||
unsigned int avgCharWidth;
|
||||
unsigned int avgCharHeight;
|
||||
int scrollpos;
|
||||
std::vector<GLSLParam> saved_parameters;
|
||||
|
||||
WNDPROC oldStaticProc;
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ BEGIN
|
|||
CONTROL "Reduce Input Lag",IDC_REDUCEINPUTLAG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,118,76,10
|
||||
CONTROL "Scale messages with EPX if possible",IDC_MESSAGES_SCALE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,162,153,10
|
||||
PUSHBUTTON "Parameters",IDC_SHADER_GLSL_PARAMETERS,112,222,49,12,WS_DISABLED
|
||||
PUSHBUTTON "Parameters...",IDC_SHADER_GLSL_PARAMETERS,112,222,60,12,WS_DISABLED
|
||||
END
|
||||
|
||||
IDD_CHEATER DIALOGEX 0, 0, 375, 194
|
||||
|
|
Loading…
Reference in New Issue