Set Qt to build debug menus on non Linux platforms and fix some debugger crashes

This makes Common.pro and Native.pro use their own distinct object directories
to prevent the two fbo.cpp and sha1.c files repectively to clash into the same
*.obj file.

The registerlist had polled register values of -1 in some cases when resizing
the window. Making sure it doesn't poll values smaller than 0 fixes it.

The memoryview crashed if it was switched into symbol mode outside of the
symbol definition range. Also, under Windows the monospace font wasn't
used because there's not literal font called "monospace" so a font family
hint had to be used.

The UpdateDisassembly() function jumped to the current PC, which sounds
reasonable at first but the issue is that this function gets called when a
breakpoint get set, so if you set a breakpoint somewhere completely
different then you suddenly lose that position for no good reason.

Enable the desktop QT interface for all non ARM QT platforms

make sure the QtMain.cpp in the native submodule is also updated
This commit is contained in:
Peter Tissen 2013-11-03 19:16:14 +01:00
parent ebd3763c7e
commit b40278fff6
5 changed files with 16 additions and 9 deletions

View File

@ -38,8 +38,11 @@ win32|symbian: LIBS += $${FFMPEG_DIR}avformat.lib $${FFMPEG_DIR}avcodec.lib $${F
else: LIBS += $${FFMPEG_DIR}libavformat.a $${FFMPEG_DIR}libavcodec.a $${FFMPEG_DIR}libavutil.a $${FFMPEG_DIR}libswresample.a $${FFMPEG_DIR}libswscale.a
win32 {
#Use a fixed base-address under windows
QMAKE_LFLAGS += /FIXED /BASE:"0x00400000"
QMAKE_LFLAGS += /DYNAMICBASE:NO
LIBS += -lwinmm -lws2_32 -lShell32 -lAdvapi32
contains($$QMAKE_TARGET.arch, x86_64): LIBS += $$files(../dx9sdk/Lib/x64/*.lib)
contains(QMAKE_TARGET.arch, x86_64): LIBS += $$files(../dx9sdk/Lib/x64/*.lib)
else: LIBS += $$files(../dx9sdk/Lib/x86/*.lib)
}
linux {
@ -75,8 +78,8 @@ SOURCES += ../UI/*Screen.cpp \
HEADERS += ../UI/*.h
INCLUDEPATH += .. ../Common ../native
# Use forms UI for Linux desktop
linux:!mobile_platform {
# Use forms UI for desktop platforms
!mobile_platform {
SOURCES += *.cpp
HEADERS += *.h
FORMS += *.ui

View File

@ -80,7 +80,6 @@ void QtHost::UpdateDisassembly()
{
if(mainWindow->GetDialogDisasm())
{
mainWindow->GetDialogDisasm()->GotoPC();
mainWindow->GetDialogDisasm()->Update();
}
if(mainWindow->GetDialogDisplaylist())
@ -334,7 +333,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
g_gameInfoCache.Init();
#if defined(Q_OS_LINUX) && !defined(ARM)
#if !defined(ARM)
// Start Desktop UI
MainWindow* mainWindow = new MainWindow();
mainWindow->show();

View File

@ -82,6 +82,7 @@ void CtrlMemView::paintEvent(QPaintEvent *)
QFont normalFont("Arial", 10);
QFont alignedFont("Monospace", 10);
alignedFont.setStyleHint(QFont::Monospace);
painter.setFont(normalFont);
int i;
@ -162,12 +163,16 @@ void CtrlMemView::paintEvent(QPaintEvent *)
if (align==4)
{
u32 value = Memory::ReadUnchecked_U32(address);
sprintf(temp, "%08x [%s]", value, symbolMap.GetSymbolName(symbolMap.GetSymbolNum(value)));
int symbolnum = symbolMap.GetSymbolNum(value);
if(symbolnum>=0)
sprintf(temp, "%08x [%s]", value, symbolMap.GetSymbolName(symbolnum));
}
else if (align==2)
{
u16 value = Memory::ReadUnchecked_U16(address);
sprintf(temp, "%04x [%s]", value, symbolMap.GetSymbolName(symbolMap.GetSymbolNum(value)));
int symbolnum = symbolMap.GetSymbolNum(value);
if(symbolnum>=0)
sprintf(temp, "%04x [%s]", value, symbolMap.GetSymbolName(symbolnum));
}
painter.drawText(85,rowY1 - 2 + rowHeight, temp);

View File

@ -137,7 +137,7 @@ void CtrlRegisterList::paintEvent(QPaintEvent *)
int maxRowsDisplay =rect().bottom()/rowHeight - 1;
selection = std::min(std::max(selection,0),numRowsTotal);
curVertOffset = std::min(std::max(curVertOffset, 0),numRowsTotal - maxRowsDisplay);
curVertOffset = std::max(std::min(curVertOffset,numRowsTotal - maxRowsDisplay),0);
QScrollBar *bar = findChild<QScrollBar*>("RegListScroll");
if(bar)

2
native

@ -1 +1 @@
Subproject commit c2b558e8817d1e736686a6d70db997a060a5488e
Subproject commit f0e47c2cede7313a057df66a6e01ba173df1e001