all repos — mgba @ 0065b62633ab133442538a96155fbead02eed130

mGBA Game Boy Advance Emulator

include/mgba/core/directories.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef DIRECTORIES_H
 7#define DIRECTORIES_H
 8
 9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
14struct VDir;
15
16struct mDirectorySet {
17	char baseName[PATH_MAX];
18	struct VDir* base;
19	struct VDir* archive;
20	struct VDir* save;
21	struct VDir* patch;
22	struct VDir* state;
23	struct VDir* screenshot;
24	struct VDir* cheats;
25};
26
27void mDirectorySetInit(struct mDirectorySet* dirs);
28void mDirectorySetDeinit(struct mDirectorySet* dirs);
29
30void mDirectorySetAttachBase(struct mDirectorySet* dirs, struct VDir* base);
31void mDirectorySetDetachBase(struct mDirectorySet* dirs);
32
33struct VFile* mDirectorySetOpenPath(struct mDirectorySet* dirs, const char* path, bool (*filter)(struct VFile*));
34struct VFile* mDirectorySetOpenSuffix(struct mDirectorySet* dirs, struct VDir* dir, const char* suffix, int mode);
35
36struct mCoreOptions;
37void mDirectorySetMapOptions(struct mDirectorySet* dirs, const struct mCoreOptions* opts);
38#endif
39
40CXX_GUARD_END
41
42#endif