mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-30 01:29:52 -06:00
jit: make everything configurable
This commit is contained in:
@ -57,10 +57,20 @@ void OnOk(uiButton* btn, void* blarg)
|
||||
{
|
||||
Config::DirectBoot = uiCheckboxChecked(cbDirectBoot);
|
||||
|
||||
Config::JIT_Enable = uiCheckboxChecked(cbJITEnabled);
|
||||
long blockSize = strtol(uiEntryText(enJITMaxBlockSize), NULL, 10);
|
||||
if (blockSize < 1)
|
||||
blockSize = 1;
|
||||
if (blockSize > 32)
|
||||
blockSize = 32;
|
||||
Config::JIT_MaxBlockSize = blockSize;
|
||||
|
||||
Config::Save();
|
||||
|
||||
uiControlDestroy(uiControl(win));
|
||||
opened = false;
|
||||
|
||||
ApplyNewSettings(4);
|
||||
}
|
||||
|
||||
void OnJITStateChanged(uiCheckbox* cb, void* blarg)
|
||||
@ -143,6 +153,12 @@ void Open()
|
||||
|
||||
uiCheckboxSetChecked(cbDirectBoot, Config::DirectBoot);
|
||||
|
||||
uiCheckboxSetChecked(cbJITEnabled, Config::JIT_Enable);
|
||||
{
|
||||
char maxBlockSizeStr[10];
|
||||
sprintf(maxBlockSizeStr, "%d", Config::JIT_MaxBlockSize);
|
||||
uiEntrySetText(enJITMaxBlockSize, maxBlockSizeStr);
|
||||
}
|
||||
OnJITStateChanged(cbJITEnabled, NULL);
|
||||
|
||||
uiControlShow(uiControl(win));
|
||||
|
@ -64,6 +64,7 @@ char MicWavPath[512];
|
||||
|
||||
char LastROMFolder[512];
|
||||
|
||||
bool EnableJIT;
|
||||
|
||||
ConfigEntry PlatformConfigFile[] =
|
||||
{
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "../Wifi.h"
|
||||
#include "../Platform.h"
|
||||
#include "../Config.h"
|
||||
#include "../ARMJIT.h"
|
||||
|
||||
#include "../Savestate.h"
|
||||
|
||||
@ -2408,19 +2409,11 @@ void ApplyNewSettings(int type)
|
||||
GPU3D::InitRenderer(Screen_UseGL);
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
|
||||
}
|
||||
/*else if (type == 4) // vsync
|
||||
else if (type == 4)
|
||||
{
|
||||
if (Screen_UseGL)
|
||||
{
|
||||
uiGLMakeContextCurrent(GLContext);
|
||||
uiGLSetVSync(Config::ScreenVSync);
|
||||
uiGLMakeContextCurrent(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO eventually: VSync for non-GL screen?
|
||||
}
|
||||
}*/
|
||||
if (Config::JIT_Enable)
|
||||
ARMJIT::InvalidateBlockCache();
|
||||
}
|
||||
|
||||
EmuRunning = prevstatus;
|
||||
}
|
||||
|
Reference in New Issue
Block a user