From d130a6f3dfc8b4bf798121e53ee229d36038deba Mon Sep 17 00:00:00 2001 From: "gregory.hainaut@gmail.com" Date: Thu, 7 Apr 2011 12:30:29 +0000 Subject: [PATCH] gsdx linux: add a config box for swthreads and fix a bad copy paste git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4542 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSLinuxDialog.cpp | 14 ++++++++++++++ plugins/GSdx/GSdx.cpp | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index 8b885a5700..0c7fcc4257 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -48,6 +48,7 @@ bool RunLinuxDialog() GtkWidget *render_label, *render_combo_box; GtkWidget *interlace_label, *interlace_combo_box; GtkWidget *aspect_label, *aspect_combo_box; + GtkWidget *swthreads_label, *swthreads_text; GtkWidget *filter_check, *logz_check, *paltex_check, *fba_check, *aa_check, *win_check; int return_value; @@ -132,10 +133,21 @@ bool RunLinuxDialog() gtk_combo_box_append_text(GTK_COMBO_BOX(aspect_combo_box), label.c_str()); } + gtk_combo_box_set_active(GTK_COMBO_BOX(aspect_combo_box), 0); gtk_container_add(GTK_CONTAINER(main_box), aspect_label); gtk_container_add(GTK_CONTAINER(main_box), aspect_combo_box); + swthreads_label = gtk_label_new("Software renderer threads:"); + swthreads_text = gtk_entry_new(); + char buf[5]; + sprintf(buf, "%d", theApp.GetConfig("swthreads", 1)); + + gtk_entry_set_text(GTK_ENTRY(swthreads_text), buf); + gtk_container_add(GTK_CONTAINER(main_box), swthreads_label); + gtk_container_add(GTK_CONTAINER(main_box), swthreads_text); + + filter_check = gtk_check_button_new_with_label("Texture Filtering"); logz_check = gtk_check_button_new_with_label("Logarithmic Z"); @@ -193,6 +205,8 @@ bool RunLinuxDialog() } + theApp.SetConfig("swthreads", atoi((char*)gtk_entry_get_text(GTK_ENTRY(swthreads_text))) ); + theApp.SetConfig("filter", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filter_check))); theApp.SetConfig("logz", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(logz_check))); theApp.SetConfig("paltex", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(paltex_check))); diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index f642ba5876..85be3b3f37 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -170,7 +170,7 @@ void GSdxApp::BuildConfigurationMap(const char* lpFileName) char key[255]; FILE* f = fopen(lpFileName, "r"); - if (f == NULL) return false; // FIXME print a nice message + if (f == NULL) return; // FIXME print a nice message while( fscanf(f, "%s = %s\n", key, value) != EOF ) { std::string key_s(key);