gsdx-linux: add an option to enable/disable recording

Avoid to kill the computer/application if the user press F12 by accident
This commit is contained in:
Gregory Hainaut 2015-05-19 11:53:56 +02:00
parent 4c7b151851
commit fa761a129d
2 changed files with 11 additions and 5 deletions

View File

@ -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)
{

View File

@ -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);