summaryrefslogtreecommitdiff
path: root/pcr/bsnes/add-usr-share-fallback.patch
blob: 4d2b5cf3c607d17db9e4567d680b166d435a9a62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- target-ui/general/main-window.cpp	2012-02-03 23:33:00.000000000 +0100
+++ target-ui/general/main-window.cpp	2012-02-13 18:02:04.988109569 +0100
@@ -331,6 +331,10 @@
     path = { application->userpath, "filters/" };
     files = directory::files(path, "*.filter");
   }
+  if(files.size() == 0) {
+    path = { "/usr/share/bsnes/", "filters/" };
+    files = directory::files(path, "*.filter");
+  }
   array<RadioItem&> group;

   settingsVideoFilterList = new RadioItem[files.size()];
@@ -362,6 +366,10 @@
     path = { application->userpath, "shaders/" };
     files = directory::files(path, { "*.", config->video.driver, ".shader" });
   }
+  if(files.size() == 0) {
+    path = { "/usr/share/bsnes/", "shaders/" };
+    files = directory::files(path, { "*.", config->video.driver, ".shader" });
+  }
   array<RadioItem&> group;

   settingsVideoShaderList = new RadioItem[files.size()];