blob: 8900b28eb0c82c37cab166aaf6c62fdd79b804b2 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
diff --unified --recursive --text openglad-git/src/io.cpp openglad-git.new/src/io.cpp
--- openglad-git/src/io.cpp 2023-12-09 13:04:23.217310511 -0500
+++ openglad-git.new/src/io.cpp 2023-12-09 13:05:39.431303642 -0500
@@ -108,33 +108,7 @@
std::string get_asset_path()
{
-#ifdef ANDROID
- // RWops will look in the app's assets directory for this path
- return "";
-#elif defined(__IPHONEOS__)
- // Assuming the cwd is set to the program's installation directory
- return "";
-#elif defined(WIN32)
- // Assuming the cwd is set to the program's installation directory
- return "";
-#else
- // Assumes UNIX with /proc
- char path[512];
- int maxPathSize = 512;
- memset(path, 0, maxPathSize);
- readlink("/proc/self/exe", path, maxPathSize);
- path[maxPathSize-1] = '\0';
- std::string s = path;
- size_t slash = s.find_last_of('/');
- if(slash != std::string::npos)
- {
- s = s.substr(0, slash);
- }
- s += '/';
-
- printf("get_asset_path: %s\n", s.c_str());
- return s;
-#endif
+ return "/usr/share/openglad/";
}
SDL_RWops* open_read_file(const char* file, bool debug)
|