Compare commits

...

4 Commits

Author SHA1 Message Date
TheLastRar
4a04100207 [SAVEVERSION+] HostFS: Always write savestate tag 2024-11-28 15:47:52 -05:00
TheLastRar
93652a3115 SaveState: Bounds check FreezeMem loads 2024-11-28 15:47:52 -05:00
chaoticgd
4ad1355af3 Debugger: Make sure the colours of functions are consistent across runs 2024-11-28 12:59:24 -05:00
chaoticgd
2501d87840 Console: Fix newline logging regression 2024-11-28 12:53:42 -05:00
5 changed files with 20 additions and 15 deletions

View File

@@ -780,11 +780,16 @@ QColor DisassemblyWidget::GetAddressFunctionColor(u32 address)
};
}
ccc::FunctionHandle handle = m_cpu->GetSymbolGuardian().FunctionOverlappingAddress(address).handle;
if (!handle.valid())
// Use the address to pick the colour since the value of the handle may
// change from run to run.
ccc::Address function_address =
m_cpu->GetSymbolGuardian().FunctionOverlappingAddress(address).address;
if (!function_address.valid())
return palette().text().color();
return colors[handle.value % colors.size()];
// Chop off the first few bits of the address since functions will be
// aligned in memory.
return colors[(function_address.value >> 4) % colors.size()];
}
QString DisassemblyWidget::FetchSelectionInfo(SelectionInfo selInfo)

View File

@@ -103,10 +103,7 @@ public:
{
// Ignore control characters.
// Otherwise you get fun bells going off.
if (ch < 0x20)
continue;
if (ch != '\n')
if (ch >= 0x20)
m_buffer.push_back(ch);
if (ch == '\n' || m_buffer.size() >= 4096)

View File

@@ -1423,19 +1423,19 @@ namespace R3000A
bool SaveStateBase::handleFreeze()
{
if (!EmuConfig.HostFs) //if hostfs isn't enabled, skip loading/saving file handles
return IsOkay();
if (IsLoading())
R3000A::ioman::reset();
if (!FreezeTag("hostHandles"))
return false;
if (EmuConfig.HostFs && IsLoading())
R3000A::ioman::reset();
const int firstfd = R3000A::ioman::firstfd;
size_t handleCount = R3000A::handles.size();
size_t handleCount = EmuConfig.HostFs ? R3000A::handles.size() : 0;
Freeze(handleCount);
if (!EmuConfig.HostFs) //if hostfs isn't enabled, skip loading/saving file handles
return IsOkay();
for (size_t i = 0; i < handleCount; i++)
{
if (IsLoading())

View File

@@ -315,6 +315,9 @@ memLoadingState::memLoadingState(const VmStateBuffer& load_from)
// Loading of state data from a memory buffer...
void memLoadingState::FreezeMem( void* data, int size )
{
if (m_idx + size > m_memory.size())
m_error = true;
if (m_error)
{
std::memset(data, 0, size);

View File

@@ -25,7 +25,7 @@ enum class FreezeAction
// [SAVEVERSION+]
// This informs the auto updater that the users savestates will be invalidated.
static const u32 g_SaveVersion = (0x9A50 << 16) | 0x0000;
static const u32 g_SaveVersion = (0x9A51 << 16) | 0x0000;
// the freezing data between submodules and core