if(load_config()) {
return 1;
}
-
+
MainWindow *window = WindowCreate(display);
toplevel_window = window->window;
- // random numbers only used for creating tmp dirs
+ // random numbers used for creating tmp dirs and for random playback
srand(time(NULL));
WindowShow(window);
#include "playlist.h"
+#include <stdlib.h>
+
#include "player.h"
#include "utils.h"
if(force) {
current++;
}
+ } else if(win->playlist.random) {
+ current = random() % len;
} else if(current < len) {
current++;
} else if(win->playlist.autoplayFolder) {