Merge branch 'generic_jit' of https://github.com/Arisotura/melonDS into generic_jit

This commit is contained in:
RSDuck
2020-05-12 16:07:28 +02:00
committed by RSDuck
367 changed files with 28319 additions and 39850 deletions

View File

@ -28,11 +28,21 @@ namespace Config
const char* kConfigFile = "melonDS.ini";
int _3DRenderer;
int Threaded3D;
char BIOS9Path[1024];
char BIOS7Path[1024];
char FirmwarePath[1024];
int GL_ScaleFactor;
int GL_Antialias;
char DSiBIOS9Path[1024];
char DSiBIOS7Path[1024];
char DSiFirmwarePath[1024];
char DSiNANDPath[1024];
#ifdef JIT_ENABLED
int JIT_Enable = false;
int JIT_MaxBlockSize = 32;
int JIT_BrancheOptimisations = 2;
int JIT_LiteralOptimisations = true;
#endif
#ifdef JIT_ENABLED
int JIT_Enable = false;
@ -43,11 +53,21 @@ int JIT_LiteralOptimisations = true;
ConfigEntry ConfigFile[] =
{
{"3DRenderer", 0, &_3DRenderer, 1, NULL, 0},
{"Threaded3D", 0, &Threaded3D, 1, NULL, 0},
{"BIOS9Path", 1, BIOS9Path, 0, "", 1023},
{"BIOS7Path", 1, BIOS7Path, 0, "", 1023},
{"FirmwarePath", 1, FirmwarePath, 0, "", 1023},
{"GL_ScaleFactor", 0, &GL_ScaleFactor, 1, NULL, 0},
{"GL_Antialias", 0, &GL_Antialias, 0, NULL, 0},
{"DSiBIOS9Path", 1, DSiBIOS9Path, 0, "", 1023},
{"DSiBIOS7Path", 1, DSiBIOS7Path, 0, "", 1023},
{"DSiFirmwarePath", 1, DSiFirmwarePath, 0, "", 1023},
{"DSiNANDPath", 1, DSiNANDPath, 0, "", 1023},
#ifdef JIT_ENABLED
{"JIT_Enable", 0, &JIT_Enable, 0, NULL, 0},
{"JIT_MaxBlockSize", 0, &JIT_MaxBlockSize, 32, NULL, 0},
{"JIT_BranchOptimisations", 0, &JIT_BrancheOptimisations, 2, NULL, 0},
{"JIT_LiteralOptimisations", 0, &JIT_LiteralOptimisations, 1, NULL, 0},
#endif
#ifdef JIT_ENABLED
{"JIT_Enable", 0, &JIT_Enable, 0, NULL, 0},
@ -96,7 +116,8 @@ void Load()
while (!feof(f))
{
fgets(linebuf, 1024, f);
int ret = sscanf(linebuf, "%32[A-Za-z_0-9]=%[^\t\n]", entryname, entryval);
int ret = sscanf(linebuf, "%31[A-Za-z_0-9]=%[^\t\n]", entryname, entryval);
entryname[31] = '\0';
if (ret < 2) continue;
ConfigEntry* entry = &ConfigFile[0];