Permalink
Browse files

Qt: Use HostRead for float and double

  • Loading branch information...
container1234 committed Apr 22, 2018
1 parent 1b63810 commit 32f6d3f62bcc62f5b15a3179af05132ece5f3373
@@ -390,9 +390,9 @@ bool CheatsManager::MatchesSearch(u32 addr) const
case DataType::Int:
return Compare(PowerPC::HostRead_U32(addr), text.toUInt(nullptr, base), op);
case DataType::Float:
return Compare(PowerPC::Read_F32(addr), text.toFloat(), op);
return Compare(PowerPC::HostRead_F32(addr), text.toFloat(), op);
case DataType::Double:
return Compare(PowerPC::Read_F64(addr), text.toDouble(), op);
return Compare(PowerPC::HostRead_F64(addr), text.toDouble(), op);
case DataType::String:
{
bool is_equal = std::equal(text.toUtf8().cbegin(), text.toUtf8().cend(),
@@ -516,10 +516,10 @@ void CheatsManager::Update()
16, QLatin1Char('0')));
break;
case DataType::Float:
value_item->setText(QString::number(PowerPC::Read_F32(m_results[i].address)));
value_item->setText(QString::number(PowerPC::HostRead_F32(m_results[i].address)));
break;
case DataType::Double:
value_item->setText(QString::number(PowerPC::Read_F64(m_results[i].address)));
value_item->setText(QString::number(PowerPC::HostRead_F64(m_results[i].address)));
break;
case DataType::String:
value_item->setText(tr("String Match"));
@@ -575,10 +575,10 @@ void CheatsManager::Update()
16, QLatin1Char('0')));
break;
case DataType::Float:
value_item->setText(QString::number(PowerPC::Read_F32(m_watch[i].address)));
value_item->setText(QString::number(PowerPC::HostRead_F32(m_watch[i].address)));
break;
case DataType::Double:
value_item->setText(QString::number(PowerPC::Read_F64(m_watch[i].address)));
value_item->setText(QString::number(PowerPC::HostRead_F64(m_watch[i].address)));
break;
case DataType::String:
value_item->setText(tr("String Match"));
@@ -170,7 +170,7 @@ void MemoryViewWidget::Update()
});
break;
case Type::Float32:
update_values([](u32 address) { return QString::number(PowerPC::Read_F32(address)); });
update_values([](u32 address) { return QString::number(PowerPC::HostRead_F32(address)); });
break;
}
}

0 comments on commit 32f6d3f

Please sign in to comment.