HD Packs: Only use HD ppu when tile replacement rules exist
This commit is contained in:
parent
a562c71094
commit
a376923757
5 changed files with 10 additions and 4 deletions
|
@ -97,7 +97,7 @@ bool Console::Initialize(VirtualFile &romFile, VirtualFile &patchFile)
|
|||
_memoryManager.reset(new MemoryManager(_mapper));
|
||||
_cpu.reset(new CPU(_memoryManager.get()));
|
||||
|
||||
if(_hdData) {
|
||||
if(_hdData && (!_hdData->Tiles.empty() || !_hdData->Backgrounds.empty())) {
|
||||
_ppu.reset(new HdPpu(_mapper.get(), _hdData->Version));
|
||||
} else if(NsfMapper::GetInstance()) {
|
||||
//Disable most of the PPU for NSFs
|
||||
|
@ -628,6 +628,11 @@ HdPackData* Console::GetHdData()
|
|||
return Instance->_hdData.get();
|
||||
}
|
||||
|
||||
bool Console::IsHdPpu()
|
||||
{
|
||||
return Instance->_hdData && std::dynamic_pointer_cast<HdPpu>(Instance->_ppu) != nullptr;
|
||||
}
|
||||
|
||||
void Console::LoadHdPack(VirtualFile &romFile, VirtualFile &patchFile)
|
||||
{
|
||||
_hdData.reset();
|
||||
|
|
|
@ -107,6 +107,7 @@ class Console
|
|||
static bool IsDebuggerAttached();
|
||||
|
||||
static HdPackData* GetHdData();
|
||||
static bool IsHdPpu();
|
||||
|
||||
static void StartRecordingHdPack(string saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize);
|
||||
static void StopRecordingHdPack();
|
||||
|
|
|
@ -612,7 +612,7 @@ namespace Mesen.GUI.Forms
|
|||
mnuEjectDisk.Enabled = autoInsertDisabled;
|
||||
mnuSwitchDiskSide.Enabled = autoInsertDisabled;
|
||||
|
||||
bool isHdPackLoader = InteropEmu.IsHdPackLoaded();
|
||||
bool isHdPackLoader = InteropEmu.IsHdPpu();
|
||||
mnuNtscFilter.Enabled = !isHdPackLoader;
|
||||
mnuNtscBisqwitQuarterFilter.Enabled = !isHdPackLoader;
|
||||
mnuNtscBisqwitHalfFilter.Enabled = !isHdPackLoader;
|
||||
|
|
|
@ -533,7 +533,7 @@ namespace Mesen.GUI
|
|||
yScroll = (int)(ppuScroll >> 16) & 0xFFFF;
|
||||
}
|
||||
|
||||
[DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool IsHdPackLoaded();
|
||||
[DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool IsHdPpu();
|
||||
|
||||
[DllImport(DLLPath)] public static extern void HdBuilderStartRecording(
|
||||
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string saveFolder,
|
||||
|
|
|
@ -475,7 +475,7 @@ namespace InteropEmu {
|
|||
}
|
||||
}
|
||||
|
||||
DllExport bool __stdcall IsHdPackLoaded() { return Console::GetHdData() != nullptr; }
|
||||
DllExport bool __stdcall IsHdPpu() { return Console::IsHdPpu(); }
|
||||
|
||||
DllExport void __stdcall HdBuilderStartRecording(char* saveFolder, ScaleFilterType filterType, uint32_t scale, uint32_t flags, uint32_t chrRamBankSize) { Console::StartRecordingHdPack(saveFolder, filterType, scale, flags, chrRamBankSize); }
|
||||
DllExport void __stdcall HdBuilderStopRecording() { Console::StopRecordingHdPack(); }
|
||||
|
|
Loading…
Add table
Reference in a new issue