Skip to content

Commit

Permalink
gsdx-linux: add an option to enable/disable recording
Browse files Browse the repository at this point in the history
Avoid to kill the computer/application if the user press F12 by accident
  • Loading branch information
gregory38 committed May 19, 2015
1 parent 4c7b151 commit fa761a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions plugins/GSdx/GS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,12 @@ EXPORT_C_(int) GSsetupRecording(int start, void* data)
printf("GSdx: no s_gs for recording\n");
return 0;
}
#ifdef __linux__
if (theApp.GetConfig("capture_enabled", 0)) {
printf("GSdx: Recording is disabled\n");
return 0;
}
#endif

if(start & 1)
{
Expand Down
10 changes: 5 additions & 5 deletions plugins/GSdx/GSLinuxDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,16 @@ void populate_debug_table(GtkWidget* debug_table)

void populate_record_table(GtkWidget* record_table)
{
GtkWidget* resxy_label = gtk_label_new("Resolution:");
GtkWidget* resx_spin = CreateSpinButton(256, 8192, "capture_resx", 1280);
GtkWidget* resy_spin = CreateSpinButton(256, 8192, "capture_resy", 1024);

GtkWidget* capture_check = CreateCheckBox("Enable Recording (with F12)", "capture_enabled");
GtkWidget* resxy_label = gtk_label_new("Resolution:");
GtkWidget* resx_spin = CreateSpinButton(256, 8192, "capture_resx", 1280);
GtkWidget* resy_spin = CreateSpinButton(256, 8192, "capture_resy", 1024);
GtkWidget* threads_label = gtk_label_new("Saving Threads:");
GtkWidget* threads_spin = CreateSpinButton(1, 32, "capture_threads", 4);

GtkWidget* out_dir_label = gtk_label_new("Output Directory:");
GtkWidget* out_dir = CreateFileChooser(GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, "Select a directory", "capture_out_dir", "/tmp");

InsertWidgetInTable(record_table , capture_check);
InsertWidgetInTable(record_table , resxy_label , resx_spin , resy_spin);
InsertWidgetInTable(record_table , threads_label , threads_spin);
InsertWidgetInTable(record_table , out_dir_label , out_dir);
Expand Down

0 comments on commit fa761a1

Please sign in to comment.