SDL: Fix Qt debugger on Mac OS X [Balrog]

This commit is contained in:
R. Belmont 2013-01-26 21:24:14 +00:00
parent e1ed935007
commit 7d0a910431

View File

@ -32,7 +32,7 @@ void DebuggerView::paintEvent(QPaintEvent* event)
{
// Tell the MAME debug view how much real estate is available
QFontMetrics actualFont = fontMetrics();
const int fontWidth = MAX(1, actualFont.maxWidth());
const int fontWidth = MAX(1, actualFont.width('_'));
const int fontHeight = MAX(1, actualFont.height());
m_view->set_visible_size(debug_view_xy(width()/fontWidth, height()/fontHeight));
@ -206,7 +206,7 @@ void DebuggerView::mousePressEvent(QMouseEvent* event)
if (event->button() == Qt::LeftButton)
{
QFontMetrics actualFont = fontMetrics();
const int fontWidth = MAX(1, actualFont.maxWidth());
const int fontWidth = MAX(1, actualFont.width('_'));
const int fontHeight = MAX(1, actualFont.height());
debug_view_xy topLeft = m_view->visible_position();