gsdx: Save hotkey toggle to ini config.

This will allow to save hotkey option toggling to the ini which
should fix gui updating with hotkey toggles.

Note: Render hw/sw switch doesn't work.

Also update some options that didn't have hotkey nametag.
This commit is contained in:
lightningterror 2019-02-20 04:10:13 +01:00
parent 8cb6d255ca
commit c6f57c0bdb
4 changed files with 18 additions and 7 deletions

View File

@ -184,7 +184,7 @@ BEGIN
LTEXT "Shade Boost Saturation",IDC_SATURATION_TEXT,16,100,80,8
CONTROL "",IDC_SATURATION_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,95,98,135,15
RTEXT "100",IDC_SATURATION_VALUE,225,100,15,8
CONTROL "External Shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,116,90,10
CONTROL "External Shader (Home)",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,116,90,10
LTEXT "External Shader",IDC_SHADER_FX_TEXT,16,131,75,8
EDITTEXT IDC_SHADER_FX_EDIT,16,139,170,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_SHADER_FX_BUTTON,196,139,36,14
@ -327,7 +327,7 @@ BEGIN
COMBOBOX IDC_ACCURATE_BLEND_UNIT,104,269,127,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
// Software Renderer Settings:
GROUPBOX "Software Renderer Settings",IDC_STATIC,6,295,230,40,BS_CENTER
CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,306,91,10
CONTROL "Edge Anti-aliasing (Del)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,306,91,10
LTEXT "Rendering threads:",IDC_SWTHREADS_TEXT,123,307,80,8
EDITTEXT IDC_SWTHREADS_EDIT,197,305,34,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,221,304,11,14

View File

@ -251,18 +251,23 @@ LRESULT GPURenderer::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
case VK_DELETE:
m_filter = (m_filter + 1) % 3;
theApp.SetConfig("filter", m_filter);
return 0;
case VK_END:
m_dither = m_dither ? 0 : 1;
theApp.SetConfig("dithering", m_dither);
return 0;
case VK_NEXT:
m_aspectratio = (m_aspectratio + 1) % 3;
theApp.SetConfig("AspectRatio", m_aspectratio);
return 0;
case VK_PRIOR:
m_fxaa = !m_fxaa;
theApp.SetConfig("fxaa", m_fxaa);
return 0;
case VK_HOME:
m_shaderfx = !m_shaderfx;
theApp.SetConfig("shaderfx", m_shaderfx);
return 0;
}
}

View File

@ -579,7 +579,8 @@ void GSRenderer::KeyEvent(GSKeyEventData* e)
{
case VK_F5:
m_interlace = (m_interlace + s_interlace_nb + step) % s_interlace_nb;
printf("GSdx: Set deinterlace mode to %d (%s).\n", (int)m_interlace, theApp.m_gs_interlace.at(m_interlace).name.c_str());
theApp.SetConfig("interlace", m_interlace);
printf("GSdx: Set deinterlace mode to %d (%s).\n", m_interlace, theApp.m_gs_interlace.at(m_interlace).name.c_str());
return;
case VK_F6:
if( m_wnd->IsManaged() )
@ -587,22 +588,27 @@ void GSRenderer::KeyEvent(GSKeyEventData* e)
return;
case VK_F7:
m_shader = (m_shader + s_post_shader_nb + step) % s_post_shader_nb;
printf("GSdx: Set shader to: %d.\n", (int)m_shader);
theApp.SetConfig("TVShader", m_shader);
printf("GSdx: Set shader to: %d.\n", m_shader);
return;
case VK_DELETE:
m_aa1 = !m_aa1;
theApp.SetConfig("aa1", m_aa1);
printf("GSdx: (Software) Edge anti-aliasing is now %s.\n", m_aa1 ? "enabled" : "disabled");
return;
case VK_INSERT:
m_mipmap = (m_mipmap + s_mipmap_nb + step) % s_mipmap_nb;
theApp.SetConfig("mipmap_hw", m_mipmap);
printf("GSdx: Mipmapping is now %s.\n", theApp.m_gs_hack.at(m_mipmap).name.c_str());
return;
case VK_PRIOR:
m_fxaa = !m_fxaa;
theApp.SetConfig("fxaa", m_fxaa);
printf("GSdx: FXAA anti-aliasing is now %s.\n", m_fxaa ? "enabled" : "disabled");
return;
case VK_HOME:
m_shaderfx = !m_shaderfx;
theApp.SetConfig("shaderfx", m_shaderfx);
printf("GSdx: External post-processing is now %s.\n", m_shaderfx ? "enabled" : "disabled");
return;
}

View File

@ -338,7 +338,7 @@ void populate_sw_table(GtkWidget* sw_table)
GtkWidget* threads_label = left_label("Extra rendering threads:");
GtkWidget* threads_spin = CreateSpinButton(0, 32, "extrathreads");
GtkWidget* aa_check = CreateCheckBox("Edge anti-aliasing (AA1)", "aa1");
GtkWidget* aa_check = CreateCheckBox("Edge Anti-aliasing (Del)", "aa1");
GtkWidget* mipmap_check = CreateCheckBox("Mipmapping", "mipmap");
AddTooltip(aa_check, IDC_AA1);
@ -359,9 +359,9 @@ void populate_shader_table(GtkWidget* shader_table)
GtkWidget* shadeboost_check = CreateCheckBox("Shade Boost", "ShadeBoost");
GtkWidget* fxaa_check = CreateCheckBox("Fxaa Shader (PgUp)", "fxaa");
GtkWidget* shaderfx_check = CreateCheckBox("External Shader", "shaderfx");
GtkWidget* shaderfx_check = CreateCheckBox("External Shader (Home)", "shaderfx");
GtkWidget* tv_shader_label = left_label("TV shader (F7):");
GtkWidget* tv_shader_label = left_label("TV Shader (F7):");
GtkWidget* tv_shader = CreateComboBoxFromVector(theApp.m_gs_tv_shaders, "TVShader");
GtkWidget* linear_check = CreateCheckBox("Texture Filtering of Display", "linear_present");