gsdx linux: add a nice gui option for previous hack

I also added two nice tooltips :)
This commit is contained in:
Gregory Hainaut 2015-04-03 21:25:34 +02:00
parent fbaa84e691
commit 53ab390e72
1 changed files with 18 additions and 3 deletions

View File

@ -157,14 +157,14 @@ bool RunLinuxDialog()
{
GtkWidget *dialog;
GtkWidget *main_box, *central_box, *advance_box, *res_box, *hw_box, *sw_box, *shader_box;
GtkWidget *native_box, *fsaa_box, *resxy_box, *renderer_box, *interlace_box, *threads_box, *filter_box, *stretch_hack_box;
GtkWidget *native_box, *fsaa_box, *resxy_box, *renderer_box, *interlace_box, *threads_box, *filter_box, *stretch_hack_box, *align_sprite_box;
GtkWidget *hw_table, *shader_table, *res_frame, *hw_frame, *sw_frame, *shader_frame;
GtkWidget *interlace_combo_box, *threads_spin;
GtkWidget *interlace_label, *threads_label, *native_label, *stretch_hack_label, *fsaa_label, *rexy_label, *render_label, *filter_label;
GtkWidget *interlace_label, *threads_label, *native_label, *stretch_hack_label, *fsaa_label, *rexy_label, *render_label, *filter_label, *align_sprite_label;
GtkWidget *fsaa_combo_box, *render_combo_box, *filter_combo_box;
GtkWidget *shader, *shader_conf, *shader_label, *shader_conf_label;
GtkWidget *shadeboost_check, *paltex_check, *fba_check, *aa_check, *native_res_check, *stretch_hack_check, *fxaa_check, *shaderfx_check;
GtkWidget *shadeboost_check, *paltex_check, *fba_check, *aa_check, *native_res_check, *stretch_hack_check, *fxaa_check, *shaderfx_check, *align_sprite_check;
GtkWidget *sb_contrast, *sb_brightness, *sb_saturation;
GtkWidget *resx_spin, *resy_spin;
@ -288,6 +288,18 @@ bool RunLinuxDialog()
stretch_hack_box = gtk_hbox_new(false, 5);
gtk_box_pack_start(GTK_BOX(stretch_hack_box), stretch_hack_label, false, false, 5);
gtk_box_pack_start(GTK_BOX(stretch_hack_box), stretch_hack_check, false, false, 5);
const char* tooltip_stretch_hack = "Correct the sampling of 2D sprite texture. It is highly recommended to enable it.";
gtk_widget_set_tooltip_text(stretch_hack_label, tooltip_stretch_hack);
gtk_widget_set_tooltip_text(stretch_hack_check, tooltip_stretch_hack);
align_sprite_label = gtk_label_new("Anti vertical-line-glitch:");
align_sprite_check = gtk_check_button_new();
align_sprite_box = gtk_hbox_new(false, 5);
gtk_box_pack_start(GTK_BOX(align_sprite_box), align_sprite_label, false, false, 5);
gtk_box_pack_start(GTK_BOX(align_sprite_box), align_sprite_check, false, false, 5);
const char* tooltip_align_sprite = "Correct vertical lines if previous hack doesn't work. It helps game such as Ace Combat/Tekken/Colin";
gtk_widget_set_tooltip_text(align_sprite_label, tooltip_align_sprite);
gtk_widget_set_tooltip_text(align_sprite_check, tooltip_align_sprite);
// shader fx entry
shader = gtk_file_chooser_button_new("Select an external shader", GTK_FILE_CHOOSER_ACTION_OPEN);
@ -343,6 +355,7 @@ bool RunLinuxDialog()
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(shaderfx_check), theApp.GetConfig("shaderfx", 0));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(native_res_check), theApp.GetConfig("nativeres", 0));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stretch_hack_check), theApp.GetConfig("UserHacks_stretch_sprite", 0));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(align_sprite_check), theApp.GetConfig("UserHacks_align_sprite_X", 0));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hack_alpha_check), theApp.GetConfig("UserHacks_AlphaHack", 0));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hack_offset_check), theApp.GetConfig("UserHacks_HalfPixelOffset", 0));
@ -391,6 +404,7 @@ bool RunLinuxDialog()
gtk_container_add(GTK_CONTAINER(res_box), fsaa_box);
gtk_container_add(GTK_CONTAINER(res_box), resxy_box);
gtk_container_add(GTK_CONTAINER(res_box), stretch_hack_box);
gtk_container_add(GTK_CONTAINER(res_box), align_sprite_box);
gtk_container_add(GTK_CONTAINER(sw_box), threads_box);
gtk_container_add(GTK_CONTAINER(sw_box), aa_check);
@ -528,6 +542,7 @@ override_GL_ARB_shading_language_420pack = -1
theApp.SetConfig("shaderfx", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(shaderfx_check)));
theApp.SetConfig("nativeres", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(native_res_check)));
theApp.SetConfig("UserHacks_stretch_sprite", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(stretch_hack_check)));
theApp.SetConfig("UserHacks_align_sprite_X", (int)gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(align_sprite_check)));
theApp.SetConfig("shaderfx_glsl", gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(shader)));
theApp.SetConfig("shaderfx_conf", gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(shader_conf)));