Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make autobuild folders consistent

  • Loading branch information...
commit 25526501d1020984bdbba33ec99e8b24143239be 1 parent dda3856
Sébastien Bourdeauducq authored May 25, 2011
10  src/keyboard.c
@@ -29,11 +29,10 @@
29 29
 #include "cp.h"
30 30
 #include "messagebox.h"
31 31
 #include "filedialog.h"
  32
+#include "performance.h"
32 33
 
33 34
 #include "keyboard.h"
34 35
 
35  
-#define AUTOBUILD_PATCHES_FOLDER "/ssd/patches/"
36  
-
37 36
 static int appid;
38 37
 static struct filedialog *browse_dlg;
39 38
 
@@ -209,11 +208,6 @@ static void autobuild(int sk, char *folder)
209 208
 	}
210 209
 	closedir(d);
211 210
 
212  
-	if(n_files == 0) {
213  
-		messagebox("Auto build failed", "No patches under "AUTOBUILD_PATCHES_FOLDER);
214  
-		return;
215  
-	}
216  
-
217 211
 	qsort(files, n_files, sizeof(char *), cmpstringp);
218 212
 	
219 213
 	for(i=0;i<n_files;i++) {
@@ -237,7 +231,7 @@ static void autobuild_callback(mtk_event *e, void *arg)
237 231
 		key[1] = 0x00;
238 232
 	}
239 233
 	if(filename[0] == 0x00)
240  
-		strcpy(filename, AUTOBUILD_PATCHES_FOLDER);
  234
+		strcpy(filename, SIMPLE_PATCHES_FOLDER);
241 235
 	if((key[1] != 0x00) || (key[0] < 'a') || (key[0] > 'z')) {
242 236
 		messagebox("Auto build failed", "Invalid starting key. Use only one lower case letter from 'a' to 'z'.");
243 237
 		return;
3  src/midi.c
@@ -31,6 +31,7 @@
31 31
 #include "cp.h"
32 32
 #include "messagebox.h"
33 33
 #include "filedialog.h"
  34
+#include "performance.h"
34 35
 
35 36
 #include "midi.h"
36 37
 
@@ -391,7 +392,7 @@ static void autobuild_callback(mtk_event *e, void *arg)
391 392
 	if(note[0] == 0x00)
392 393
 		strcpy(note, "C2");
393 394
 	if(filename[0] == 0x00)
394  
-		strcpy(filename, "/ssd");
  395
+		strcpy(filename, SIMPLE_PATCHES_FOLDER);
395 396
 	notecode = midistr(note);
396 397
 	if(notecode < 0) {
397 398
 		messagebox("Auto build failed", "Invalid starting note");
2  src/performance.c
@@ -144,8 +144,6 @@ static void add_osc_patches()
144 144
 	}
145 145
 }
146 146
 
147  
-#define SIMPLE_PATCHES_FOLDER "/ssd/patches/"
148  
-
149 147
 static void add_simple_patches()
150 148
 {
151 149
 	DIR *d;
2  src/performance.h
@@ -18,6 +18,8 @@
18 18
 #ifndef __PERFORMANCE_H
19 19
 #define __PERFORMANCE_H
20 20
 
  21
+#define SIMPLE_PATCHES_FOLDER "/ssd/patches/"
  22
+
21 23
 void init_performance();
22 24
 void start_performance(bool simple);
23 25
 

0 notes on commit 2552650

Please sign in to comment.
Something went wrong with that request. Please try again.