-
Notifications
You must be signed in to change notification settings - Fork 0
/
QRetroDirectories.h
58 lines (45 loc) · 1.48 KB
/
QRetroDirectories.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef QRETRO_DIRECTORIES_H
#define QRETRO_DIRECTORIES_H
#include <string>
#include <QString>
/**
* Sets the path used for a RETRO_ENVIRONMENT_GET_X_DIRECTORY environment
* callback.
* It is recommended to handle this before calling "loadCore", as many
* cores call this once in "retro_init" and store a copy.
* Returns FALSE if "type" is invalid, or if "path" does not exist, otherwise
* TRUE.
**/
class QRetroDirectories
{
public:
enum Type
{
/// Returned when the core uses environment callback
/// RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY (31).
Save = 0,
/// Returned when the core uses environment callback
/// RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY (9).
System,
/// Returned when the core uses environment callback
/// RETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORY (30).
CoreAssets,
/// Alias of Directory_CoreAssets.
Content = CoreAssets,
/* The following are internal, unrelated to libretro callbacks.
State,
CoreInfo,
ContentMeta,
...but they're also completely unused right now. */
/// Size of Directory enum.
Type_Size
};
QRetroDirectories();
const char* get(QRetroDirectories::Type);
bool set(QRetroDirectories::Type type, const char *path, bool force = false);
bool set(QRetroDirectories::Type type, const std::string &path, bool force = false);
bool set(QRetroDirectories::Type type, const QString &path, bool force = false);
private:
QByteArray m_Directories[QRetroDirectories::Type_Size];
};
#endif