mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Add mechanism to "graduate" DisableHLE flags to be permanently on. Will be used soon.
This commit is contained in:
1 parent
2307db6df4
commit
a31d7dc0b3
3 files changed
+27
-10
No files matched your search
+17
-6
@@ -187,18 +187,26 @@ const HLEModuleMeta *GetHLEModuleMetaByImport(std::string_view importModuleName)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DisableHLEFlags AlwaysDisableHLEFlags() {
|
||||
// Once a module seems stable to load properly, we'll graduate it here.
|
||||
// This will hide the checkbox, too.
|
||||
// return DisableHLEFlags::scePsmf | DisableHLEFlags::scePsmfPlayer;
|
||||
return (DisableHLEFlags)0;
|
||||
}
|
||||
|
||||
// Process compat flags.
|
||||
static DisableHLEFlags GetDisableHLEFlags() {
|
||||
DisableHLEFlags flags = (DisableHLEFlags)g_Config.iDisableHLE;
|
||||
DisableHLEFlags flags = (DisableHLEFlags)g_Config.iDisableHLE | AlwaysDisableHLEFlags();
|
||||
if (PSP_CoreParameter().compat.flags().DisableHLESceFont) {
|
||||
flags |= DisableHLEFlags::sceFont;
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
// Note: name is the modname from prx, not the export module name!
|
||||
bool ShouldHLEModule(std::string_view modname, bool *wasDisabled) {
|
||||
if (wasDisabled) {
|
||||
*wasDisabled = false;
|
||||
bool ShouldHLEModule(std::string_view modname, bool *wasDisabledManually) {
|
||||
if (wasDisabledManually) {
|
||||
*wasDisabledManually = false;
|
||||
}
|
||||
const HLEModuleMeta *meta = GetHLEModuleMeta(modname);
|
||||
if (!meta) {
|
||||
@@ -207,8 +215,11 @@ bool ShouldHLEModule(std::string_view modname, bool *wasDisabled) {
|
||||
|
||||
bool disabled = meta->disableFlag & GetDisableHLEFlags();
|
||||
if (disabled) {
|
||||
if (wasDisabled) {
|
||||
*wasDisabled = true;
|
||||
if (wasDisabledManually) {
|
||||
// We don't show notifications if a flag has "graduated".
|
||||
if (!(meta->disableFlag & AlwaysDisableHLEFlags())) {
|
||||
*wasDisabledManually = true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-1
@@ -107,7 +107,7 @@ struct HLEModuleMeta {
|
||||
|
||||
const HLEModuleMeta *GetHLEModuleMetaByFlag(DisableHLEFlags flag);
|
||||
const HLEModuleMeta *GetHLEModuleMeta(std::string_view modname);
|
||||
bool ShouldHLEModule(std::string_view modname, bool *wasDisabled = nullptr);
|
||||
bool ShouldHLEModule(std::string_view modname, bool *wasDisabledManually = nullptr);
|
||||
bool ShouldHLEModuleByImportName(std::string_view importModuleName);
|
||||
|
||||
const char *GetHLEFuncName(std::string_view module, u32 nib);
|
||||
@@ -121,6 +121,7 @@ u32 GetNibByName(std::string_view module, std::string_view function);
|
||||
void RegisterHLEModule(std::string_view name, int numFunctions, const HLEFunction *funcTable);
|
||||
int GetNumRegisteredHLEModules();
|
||||
const HLEModule *GetHLEModuleByIndex(int index);
|
||||
DisableHLEFlags AlwaysDisableHLEFlags();
|
||||
|
||||
// Run the current thread's callbacks after the syscall finishes.
|
||||
void hleCheckCurrentCallbacks();
|
||||
|
||||
@@ -1996,11 +1996,16 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::Atrac3, dev->T("Atrac3/3+")));
|
||||
|
||||
list->Add(new ItemHeader("Disable HLE (experimental! Not expected to work yet)"));
|
||||
|
||||
for (int i = 0; i < (int)DisableHLEFlags::Count; i++) {
|
||||
DisableHLEFlags flag = (DisableHLEFlags)(1 << i);
|
||||
const HLEModuleMeta *meta = GetHLEModuleMetaByFlag(flag);
|
||||
if (meta) {
|
||||
list->Add(new BitCheckBox(&g_Config.iDisableHLE, (int)flag, meta->modname));
|
||||
|
||||
// Show a checkbox, unless the setting has graduated to always on.
|
||||
if (!(flag & AlwaysDisableHLEFlags())) {
|
||||
const HLEModuleMeta *meta = GetHLEModuleMetaByFlag(flag);
|
||||
if (meta) {
|
||||
list->Add(new BitCheckBox(&g_Config.iDisableHLE, (int)flag, meta->modname));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user