From 6259e61792410be8bb3cb079920920473ed7b3a0 Mon Sep 17 00:00:00 2001 From: willkuer Date: Sat, 12 Dec 2015 03:28:42 +0100 Subject: [PATCH] gsdx: defaulting extra rendering threads to 2 --- plugins/GSdx/GPU.cpp | 2 +- plugins/GSdx/GPUSettingsDlg.cpp | 2 +- plugins/GSdx/GS.cpp | 2 +- plugins/GSdx/GS.h | 4 ++++ plugins/GSdx/GSLinuxDialog.cpp | 2 +- plugins/GSdx/GSSettingsDlg.cpp | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/GSdx/GPU.cpp b/plugins/GSdx/GPU.cpp index 7b6cfff0cc..66b360926c 100644 --- a/plugins/GSdx/GPU.cpp +++ b/plugins/GSdx/GPU.cpp @@ -108,7 +108,7 @@ EXPORT_C_(int32) GPUopen(void* hWnd) #endif int renderer = theApp.GetConfig("Renderer", 1); - int threads = theApp.GetConfig("extrathreads", 0); + int threads = theApp.GetConfig("extrathreads", DEFAULT_EXTRA_RENDERING_THREADS); switch(renderer) { diff --git a/plugins/GSdx/GPUSettingsDlg.cpp b/plugins/GSdx/GPUSettingsDlg.cpp index 28d8c96f1c..bdbcecb9b3 100644 --- a/plugins/GSdx/GPUSettingsDlg.cpp +++ b/plugins/GSdx/GPUSettingsDlg.cpp @@ -74,7 +74,7 @@ void GPUSettingsDlg::OnInit() CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1)); SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 0)); - SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("extrathreads", 0), 0)); + SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("extrathreads", DEFAULT_EXTRA_RENDERING_THREADS), 0)); UpdateControls(); } diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 60373155eb..eaf33e7614 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -190,7 +190,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t if(threads == -1) { - threads = theApp.GetConfig("extrathreads", 0); + threads = theApp.GetConfig("extrathreads", DEFAULT_EXTRA_RENDERING_THREADS); } GSWnd* wnd[2] = { NULL, NULL }; diff --git a/plugins/GSdx/GS.h b/plugins/GSdx/GS.h index 389eecf5a2..24ee2f4191 100644 --- a/plugins/GSdx/GS.h +++ b/plugins/GSdx/GS.h @@ -1280,3 +1280,7 @@ enum {FREEZE_LOAD=0, FREEZE_SAVE=1, FREEZE_SIZE=2}; struct GSFreezeData {int size; uint8* data;}; enum stateType {ST_WRITE, ST_TRANSFER, ST_VSYNC}; + +// default gs config settings +#define DEFAULT_EXTRA_RENDERING_THREADS 2 + diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index 313361150e..ee97840975 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -286,7 +286,7 @@ void populate_gl_table(GtkWidget* gl_table) void populate_sw_table(GtkWidget* sw_table) { GtkWidget* threads_label = left_label("Extra rendering threads:"); - GtkWidget* threads_spin = CreateSpinButton(0, 32, "extrathreads", 0); + GtkWidget* threads_spin = CreateSpinButton(0, 32, "extrathreads", DEFAULT_EXTRA_RENDERING_THREADS); GtkWidget* aa_check = CreateCheckBox("Edge anti-aliasing (AA1)", "aa1"); GtkWidget* mipmap_check = CreateCheckBox("Mipmap", "mipmap", true); diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 0fe51ed5c6..71a1e5c97a 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -172,7 +172,7 @@ void GSSettingsDlg::OnInit() SendMessage(GetDlgItem(m_hWnd, IDC_RESY), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("resy", 1024), 0)); SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 0)); - SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("extrathreads", 0), 0)); + SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("extrathreads", DEFAULT_EXTRA_RENDERING_THREADS), 0)); AddTooltip(IDC_FILTER); AddTooltip(IDC_CRC_LEVEL);