* remove more Config dependencies from the core

* also use less shitty strings
This commit is contained in:
Arisotura
2021-11-17 20:42:11 +01:00
parent 69715043ca
commit 5bb8f4c922
10 changed files with 102 additions and 64 deletions

View File

@ -36,11 +36,24 @@ void StopEmu();
enum ConfigEntry
{
#ifdef JIT_ENABLED
JIT_Enable,
JIT_MaxBlockSize,
JIT_LiteralOptimizations,
JIT_BranchOptimizations,
JIT_FastMemory,
#endif
ExternalBIOSEnable,
BIOS9Path,
BIOS7Path,
FirmwarePath,
DSi_BIOS9Path,
DSi_BIOS7Path,
DSi_FirmwarePath,
DSi_NANDPath,
DLDI_Enable,
DLDI_ImagePath,
@ -79,11 +92,11 @@ std::string GetConfigString(ConfigEntry entry);
// 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);
FILE* OpenFile(std::string path, std::string mode, bool mustexist=false);
FILE* OpenLocalFile(std::string path, std::string mode);
FILE* OpenDataFile(std::string path);
inline bool FileExists(const char* name)
inline bool FileExists(std::string name)
{
FILE* f = OpenFile(name, "rb");
if (!f) return false;
@ -91,7 +104,7 @@ inline bool FileExists(const char* name)
return true;
}
inline bool LocalFileExists(const char* name)
inline bool LocalFileExists(std::string name)
{
FILE* f = OpenLocalFile(name, "rb");
if (!f) return false;