all repos — mgba @ abdf448f81da9f01a323ceef4cb00df9758d5002

mGBA Game Boy Advance Emulator

Qt: Fix memory editing overlay not displaying hex A-F properly
Jeffrey Pfau jeffrey@endrift.com
Sat, 04 Jul 2015 00:32:28 -0700
commit

abdf448f81da9f01a323ceef4cb00df9758d5002

parent

3c9433b74ca1203003481b4f142010b240599375

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/MemoryModel.cppsrc/platform/qt/MemoryModel.cpp

@@ -450,7 +450,11 @@ uint8_t b = m_buffer >> ((nybbles - 2) * 4);

painter.drawStaticText(o, m_staticNumbers[b]); } else { int b = m_buffer & 0xF; - painter.drawStaticText(o, m_staticAscii[b + '0']); + if (b < 10) { + painter.drawStaticText(o, m_staticAscii[b + '0']); + } else { + painter.drawStaticText(o, m_staticAscii[b - 10 + 'A']); + } } o += QPointF(m_letterWidth * 2, 0); }