diff options
| author | Arisotura <thetotalworm@gmail.com> | 2020-01-28 21:37:36 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-28 21:37:36 +0100 | 
| commit | 2c51a495274106bc39b04f3ef99b217f5df21a21 (patch) | |
| tree | 11f98cf0e8c087964943acdbac00ed618a559824 /src/Platform.h | |
| parent | 8b9eef352c9ea00f1dc8fbe37ecab79cd8630b3c (diff) | |
| parent | c5623c4dcd122278e45a363b655be67d845ecf63 (diff) | |
Merge pull request #546 from nadiaholmquist/feature/unix-xdg
Make melonDS properly installable systemwide on UNIX systems
Diffstat (limited to 'src/Platform.h')
| -rw-r--r-- | src/Platform.h | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/src/Platform.h b/src/Platform.h index ca6971e..dfe83d0 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -32,15 +32,21 @@ void StopEmu();  //     can be optionally restricted to only opening a file that already exists.  // * OpenLocalFile():  //     opens files local to the emulator (melonDS.ini, BIOS, firmware, ...) -//     checks, by order of priority: +//     For Windows builds, or portable UNIX builds it checks, by order of priority:  //     * current working directory  //     * emulator directory (essentially where the melonDS executable is) if supported  //     * any platform-specific application data directories  //     in create mode, if the file doesn't exist, it will be created in the emulator  //     directory if supported, or in the current directory otherwise +//     For regular UNIX builds, the user's configuration directory is always used. +// * OpenDataFile(): +//     Opens a file that was installed alongside melonDS on UNIX systems in /usr/share, etc. +//     Looks in the user's data directory first, then the system's. +//     If on Windows or a portable UNIX build, this simply calls OpenLocalFile().  FILE* OpenFile(const char* path, const char* mode, bool mustexist=false);  FILE* OpenLocalFile(const char* path, const char* mode); +FILE* OpenDataFile(const char* path);  inline bool FileExists(const char* name)  { |