output rom size in hex longlong format
This commit is contained in:
@@ -34,6 +34,10 @@ std::string UppercaseHexLong(uint32_t dword) {
|
|||||||
std::string result = absl::StrFormat("0x%06X", dword);
|
std::string result = absl::StrFormat("0x%06X", dword);
|
||||||
return result;
|
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,
|
bool StringReplace(std::string& str, const std::string& from,
|
||||||
const std::string& to) {
|
const std::string& to) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace core {
|
|||||||
std::string UppercaseHexByte(uint8_t byte, bool leading = false);
|
std::string UppercaseHexByte(uint8_t byte, bool leading = false);
|
||||||
std::string UppercaseHexWord(uint16_t word);
|
std::string UppercaseHexWord(uint16_t word);
|
||||||
std::string UppercaseHexLong(uint32_t dword);
|
std::string UppercaseHexLong(uint32_t dword);
|
||||||
|
std::string UppercaseHexLongLong(uint64_t qword);
|
||||||
|
|
||||||
bool StringReplace(std::string& str, const std::string& from,
|
bool StringReplace(std::string& str, const std::string& from,
|
||||||
const std::string& to);
|
const std::string& to);
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ void EditorManager::DrawInfoPopup() {
|
|||||||
if (BeginPopupModal("ROM Information", nullptr,
|
if (BeginPopupModal("ROM Information", nullptr,
|
||||||
ImGuiWindowFlags_AlwaysAutoResize)) {
|
ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||||
Text("Title: %s", rom()->title().c_str());
|
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) ||
|
if (Button("Close", gui::kDefaultModalSize) ||
|
||||||
IsKeyPressed(GetKeyIndex(ImGuiKey_Space))) {
|
IsKeyPressed(GetKeyIndex(ImGuiKey_Space))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user