output rom size in hex longlong format

This commit is contained in:
scawful
2024-08-10 21:46:08 -04:00
parent 6dc90ead13
commit 52502dc568
3 changed files with 6 additions and 1 deletions

View File

@@ -34,6 +34,10 @@ std::string UppercaseHexLong(uint32_t dword) {
std::string result = absl::StrFormat("0x%06X", dword);
return result;
}
std::string UppercaseHexLongLong(uint64_t qword) {
std::string result = absl::StrFormat("0x%08X", qword);
return result;
}
bool StringReplace(std::string& str, const std::string& from,
const std::string& to) {

View File

@@ -20,6 +20,7 @@ namespace core {
std::string UppercaseHexByte(uint8_t byte, bool leading = false);
std::string UppercaseHexWord(uint16_t word);
std::string UppercaseHexLong(uint32_t dword);
std::string UppercaseHexLongLong(uint64_t qword);
bool StringReplace(std::string& str, const std::string& from,
const std::string& to);

View File

@@ -376,7 +376,7 @@ void EditorManager::DrawInfoPopup() {
if (BeginPopupModal("ROM Information", nullptr,
ImGuiWindowFlags_AlwaysAutoResize)) {
Text("Title: %s", rom()->title().c_str());
Text("ROM Size: %ld", rom()->size());
Text("ROM Size: %s", core::UppercaseHexLongLong(rom()->size()).c_str());
if (Button("Close", gui::kDefaultModalSize) ||
IsKeyPressed(GetKeyIndex(ImGuiKey_Space))) {