SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
40
emulators/frodo/patches/patch-Src_main_cpp
Normal file
40
emulators/frodo/patches/patch-Src_main_cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
--- Src/main.cpp.orig Wed Jan 2 13:19:06 2002
|
||||
+++ Src/main.cpp Thu Jan 14 08:50:09 2010
|
||||
@@ -36,7 +36,7 @@ char AppDirPath[1024]; // Path of application director
|
||||
*/
|
||||
|
||||
#ifndef __PSXOS__
|
||||
-bool Frodo::load_rom_files(void)
|
||||
+bool Frodo::do_load_rom_files(void)
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
@@ -89,6 +89,28 @@ bool Frodo::load_rom_files(void)
|
||||
}
|
||||
|
||||
return true;
|
||||
+}
|
||||
+
|
||||
+bool Frodo::load_rom_files(void)
|
||||
+{
|
||||
+ int fd = open(".", O_RDONLY);
|
||||
+
|
||||
+ if (fd == -1) {
|
||||
+ ShowRequester("Can't lock current directory", "Quit");
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ char *d = getenv("FRODOLIBDIR");
|
||||
+ if (d == NULL)
|
||||
+ d = FRODOLIBDIR;
|
||||
+ if (chdir(d) != 0) {
|
||||
+ ShowRequester("Can't access Frodo Lib Directory", "Quit");
|
||||
+ return false;
|
||||
+ }
|
||||
+ bool result = do_load_rom_files();
|
||||
+ fchdir(fd);
|
||||
+ close(fd);
|
||||
+ return result;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue