Remove the need for a meminfo file by just creating
Sat Feb 21 09:37:57 CET 2009 Alan Swanson
* Remove the need for a meminfo file by just creating
one at /tmp/meminfo-mythe
hunk ./README 11
-
-* Adjust the path in fopenRedirect.c:38 to match the supplied meminfo file.
hunk ./fopenRedirect.c 32
+/* Old meminfo emulating 256Mb */
+char const *str = "root: total: used: free: shared: buffers: cached:\n"
+ "Mem: 268435456 0 268435456 0 0 0\n"
+ "Swap: 268435456 0 268435456\n";
+
hunk ./fopenRedirect.c 40
+ FILE* fp;
hunk ./fopenRedirect.c 43
- printf("meminfo fix\n");
- return _fopen("/usr/local/games/myth2/meminfo", modes); //change this path
+ printf("Compatibility meminfo fix for OpenGL and cutscenes by Tobias Rautenkranz\n");
+
+ fp = fopen("/tmp/meminfo-myth2", "w");
+ if (fp != NULL) {
+ fwrite(str, strlen(str), 1, fp);
+ fclose(fp);
+ }
+
+ return _fopen("/tmp/meminfo-myth2", modes);
hunk ./meminfo 1
-root: total: used: free: shared: buffers: cached:
-Mem: 1000000000 0 1000000000 0 0 0
-Swap: 1000000000 0 1000000000 [_$_]
rmfile ./meminfo