mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Qt: Clean up messy code.
This commit is contained in:
parent
7adb819a41
commit
47f3e700c4
@ -1,15 +0,0 @@
|
||||
#include "EmuThread.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
void EmuThread_LockDraw(bool value)
|
||||
{
|
||||
// left there just to avoid compilation problems, this is called a lot
|
||||
// in debuggers
|
||||
}
|
||||
|
||||
QString GetCurrentFilename()
|
||||
{
|
||||
return QString::fromStdString(PSP_CoreParameter().fileToStart);
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
void EmuThread_LockDraw(bool value);
|
||||
QString GetCurrentFilename();
|
@ -20,7 +20,6 @@
|
||||
#include "ui/ui_context.h"
|
||||
#include "gfx_es2/draw_text.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "EmuThread.h"
|
||||
|
||||
static UI::Theme ui_theme;
|
||||
|
||||
@ -121,9 +120,9 @@ void QtHost::BootDone()
|
||||
}
|
||||
|
||||
|
||||
static QString SymbolMapFilename(QString currentFilename)
|
||||
static const char* SymbolMapFilename(std::string currentFilename)
|
||||
{
|
||||
std::string result = currentFilename.toStdString();
|
||||
std::string result = currentFilename;
|
||||
size_t dot = result.rfind('.');
|
||||
if (dot == result.npos)
|
||||
return (result + ".map").c_str();
|
||||
@ -134,12 +133,12 @@ static QString SymbolMapFilename(QString currentFilename)
|
||||
|
||||
bool QtHost::AttemptLoadSymbolMap()
|
||||
{
|
||||
return symbolMap.LoadSymbolMap(SymbolMapFilename(GetCurrentFilename()).toStdString().c_str());
|
||||
return symbolMap.LoadSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart));
|
||||
}
|
||||
|
||||
void QtHost::PrepareShutdown()
|
||||
{
|
||||
symbolMap.SaveSymbolMap(SymbolMapFilename(GetCurrentFilename()).toStdString().c_str());
|
||||
symbolMap.SaveSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart));
|
||||
}
|
||||
|
||||
void QtHost::AddSymbol(std::string name, u32 addr, u32 size, int type=0)
|
||||
@ -179,7 +178,6 @@ void QtHost::GPUNotifyCommand(u32 pc)
|
||||
|
||||
void QtHost::SendCoreWait(bool isWaiting)
|
||||
{
|
||||
mainWindow->CoreEmitWait(isWaiting);
|
||||
}
|
||||
|
||||
bool QtHost::GpuStep()
|
||||
@ -189,20 +187,14 @@ bool QtHost::GpuStep()
|
||||
|
||||
void QtHost::SendGPUStart()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
if(m_GPUFlag == -1)
|
||||
{
|
||||
m_GPUFlag = 0;
|
||||
}
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
}
|
||||
|
||||
void QtHost::SendGPUWait(u32 cmd, u32 addr, void *data)
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
if((m_GPUFlag == 1 && (cmd == GE_CMD_PRIM || cmd == GE_CMD_BEZIER || cmd == GE_CMD_SPLINE)))
|
||||
{
|
||||
// Break after the draw
|
||||
@ -231,8 +223,6 @@ void QtHost::SendGPUWait(u32 cmd, u32 addr, void *data)
|
||||
m_hGPUStepEvent.wait(m_hGPUStepMutex);
|
||||
}
|
||||
}
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
}
|
||||
|
||||
void QtHost::SetGPUStep(bool value, int flag, u32 data)
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "controls.h"
|
||||
#include "ui_controls.h"
|
||||
#include "Core/Config.h"
|
||||
#include "EmuThread.h"
|
||||
#include <QTimer>
|
||||
|
||||
Controls_ controllist[] = {
|
||||
@ -45,11 +44,6 @@ Controls::~Controls()
|
||||
|
||||
void Controls::showEvent(QShowEvent*)
|
||||
{
|
||||
#ifdef Q_WS_X11
|
||||
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
|
||||
EmuThread_LockDraw(true);
|
||||
QTimer::singleShot(100, this, SLOT(releaseLock()));
|
||||
#endif
|
||||
/*
|
||||
for(int i = 0; i < controllistCount; i++)
|
||||
{
|
||||
@ -79,11 +73,6 @@ void Controls::changeEvent(QEvent *event)
|
||||
QDialog::changeEvent(event);
|
||||
}
|
||||
|
||||
void Controls::releaseLock()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void Controls::on_buttonBox_accepted()
|
||||
{
|
||||
/*
|
||||
|
@ -33,7 +33,6 @@ public:
|
||||
void showEvent(QShowEvent *);
|
||||
void changeEvent(QEvent *);
|
||||
private slots:
|
||||
void releaseLock();
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
private:
|
||||
|
@ -62,9 +62,7 @@ void CtrlDisAsmView::mousePressEvent(QMouseEvent *e)
|
||||
}
|
||||
else
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
debugger->toggleBreakpoint(yToAddress(y));
|
||||
EmuThread_LockDraw(false);
|
||||
parentWindow->Update();
|
||||
redraw();
|
||||
}
|
||||
@ -156,40 +154,30 @@ void CtrlDisAsmView::CopyAddress()
|
||||
|
||||
void CtrlDisAsmView::CopyInstrDisAsm()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
QApplication::clipboard()->setText(debugger->disasm(selection,align));
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void CtrlDisAsmView::CopyInstrHex()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
QApplication::clipboard()->setText(QString("%1").arg(debugger->readMemory(selection),8,16,QChar('0')));
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void CtrlDisAsmView::SetNextStatement()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
debugger->setPC(selection);
|
||||
EmuThread_LockDraw(false);
|
||||
redraw();
|
||||
}
|
||||
|
||||
void CtrlDisAsmView::ToggleBreakpoint()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
debugger->toggleBreakpoint(selection);
|
||||
EmuThread_LockDraw(false);
|
||||
parentWindow->Update();
|
||||
redraw();
|
||||
}
|
||||
|
||||
void CtrlDisAsmView::FollowBranch()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
const char *temp = debugger->disasm(selection,align);
|
||||
EmuThread_LockDraw(false);
|
||||
const char *temp = debugger->disasm(selection,align);;
|
||||
const char *mojs=strstr(temp,"->$");
|
||||
if (mojs)
|
||||
{
|
||||
@ -205,10 +193,8 @@ void CtrlDisAsmView::FollowBranch()
|
||||
|
||||
void CtrlDisAsmView::RunToHere()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
debugger->setBreakpoint(selection);
|
||||
debugger->runToBreakpoint();
|
||||
EmuThread_LockDraw(false);
|
||||
redraw();
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include "Core/Debugger/DebugInterface.h"
|
||||
#include "EmuThread.h"
|
||||
|
||||
class Debugger_Disasm;
|
||||
|
||||
@ -26,11 +25,9 @@ public:
|
||||
|
||||
void setDebugger(DebugInterface *deb)
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
debugger=deb;
|
||||
curAddress=debugger->getPC();
|
||||
align=debugger->getInstructionSize(0);
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
DebugInterface *getDebugger()
|
||||
{
|
||||
@ -43,9 +40,7 @@ public:
|
||||
}
|
||||
void gotoPC()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
curAddress=debugger->getPC()&(~(align-1));
|
||||
EmuThread_LockDraw(false);
|
||||
redraw();
|
||||
}
|
||||
unsigned int getSelection()
|
||||
@ -60,9 +55,7 @@ public:
|
||||
|
||||
void toggleBreakpoint()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
debugger->toggleBreakpoint(curAddress);
|
||||
EmuThread_LockDraw(false);
|
||||
redraw();
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include "math.h"
|
||||
|
||||
#include "EmuThread.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
|
||||
@ -123,14 +122,12 @@ void CtrlMemView::paintEvent(QPaintEvent *)
|
||||
const char *m = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
if (Memory::IsValidAddress(address))
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
u32 memory[4] = {
|
||||
debugger->readMemory(address),
|
||||
debugger->readMemory(address+4),
|
||||
debugger->readMemory(address+8),
|
||||
debugger->readMemory(address+12)
|
||||
};
|
||||
EmuThread_LockDraw(false);
|
||||
m = (const char*)memory;
|
||||
sprintf(temp, "%08x %08x %08x %08x ................",
|
||||
memory[0],memory[1],memory[2],memory[3]);
|
||||
@ -228,9 +225,7 @@ void CtrlMemView::contextMenu(const QPoint &pos)
|
||||
|
||||
void CtrlMemView::CopyValue()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
QApplication::clipboard()->setText(QString("%1").arg(Memory::ReadUnchecked_U32(selection),8,16,QChar('0')));
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void CtrlMemView::Dump()
|
||||
@ -241,9 +236,7 @@ void CtrlMemView::Dump()
|
||||
|
||||
void CtrlMemView::Change()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
QString curVal = QString("%1").arg(Memory::ReadUnchecked_U32(selection),8,16,QChar('0'));
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
bool ok;
|
||||
QString text = QInputDialog::getText(this, tr("Set new value"),
|
||||
@ -251,9 +244,7 @@ void CtrlMemView::Change()
|
||||
curVal, &ok);
|
||||
if (ok && !text.isEmpty())
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
Memory::WriteUnchecked_U32(text.toUInt(0,16),selection);
|
||||
EmuThread_LockDraw(false);
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QInputDialog>
|
||||
#include "EmuThread.h"
|
||||
#include "debugger_disasm.h"
|
||||
|
||||
CtrlRegisterList::CtrlRegisterList(QWidget *parent) :
|
||||
@ -286,9 +285,7 @@ void CtrlRegisterList::GotoMemory()
|
||||
if (selection >= cpu->GetNumRegsInCategory(cat))
|
||||
return;
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
u32 val = cpu->GetRegValue(cat,reg);
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
parentWindow->ShowMemory(val);
|
||||
}
|
||||
@ -300,9 +297,7 @@ void CtrlRegisterList::GotoDisAsm()
|
||||
if (selection >= cpu->GetNumRegsInCategory(cat))
|
||||
return;
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
u32 val = cpu->GetRegValue(cat,reg);
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
emit GotoDisasm(val);
|
||||
}
|
||||
@ -314,9 +309,7 @@ void CtrlRegisterList::CopyValue()
|
||||
if (selection >= cpu->GetNumRegsInCategory(cat))
|
||||
return;
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
u32 val = cpu->GetRegValue(cat,reg);
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
QApplication::clipboard()->setText(QString("%1").arg(val,8,16,QChar('0')));
|
||||
}
|
||||
@ -328,9 +321,7 @@ void CtrlRegisterList::Change()
|
||||
if (selection >= cpu->GetNumRegsInCategory(cat))
|
||||
return;
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
u32 val = cpu->GetRegValue(cat,reg);
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
bool ok;
|
||||
QString text = QInputDialog::getText(this, tr("Set new value"),
|
||||
@ -338,9 +329,7 @@ void CtrlRegisterList::Change()
|
||||
QString::number(val), &ok);
|
||||
if (ok && !text.isEmpty())
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
cpu->SetRegValue(cat,reg,text.toInt());
|
||||
EmuThread_LockDraw(false);
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "GPU/GeDisasm.h"
|
||||
#include "GPU/Common/GPUDebugInterface.h"
|
||||
#include "EmuThread.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
Debugger_Disasm::Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
|
||||
@ -54,27 +53,6 @@ Debugger_Disasm::Debugger_Disasm(DebugInterface *_cpu, MainWindow* mainWindow_,
|
||||
|
||||
}
|
||||
|
||||
void Debugger_Disasm::showEvent(QShowEvent *)
|
||||
{
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
|
||||
EmuThread_LockDraw(true);
|
||||
QTimer::singleShot(100, this, SLOT(releaseLock()));
|
||||
#endif
|
||||
|
||||
if(Core_IsStepping())
|
||||
SetDebugMode(true);
|
||||
else
|
||||
SetDebugMode(false);
|
||||
}
|
||||
|
||||
void Debugger_Disasm::releaseLock()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
|
||||
Debugger_Disasm::~Debugger_Disasm()
|
||||
{
|
||||
delete ui;
|
||||
@ -88,47 +66,39 @@ void Debugger_Disasm::ShowVFPU()
|
||||
void Debugger_Disasm::Update()
|
||||
{
|
||||
ui->RegList->redraw();
|
||||
mainWindow->UpdateMenus();
|
||||
mainWindow->updateMenus();
|
||||
UpdateDialog();
|
||||
}
|
||||
|
||||
void Debugger_Disasm::Go()
|
||||
{
|
||||
SetDebugMode(false);
|
||||
EmuThread_LockDraw(true);
|
||||
Core_EnableStepping(false);
|
||||
EmuThread_LockDraw(false);
|
||||
mainWindow->UpdateMenus();
|
||||
mainWindow->updateMenus();
|
||||
}
|
||||
|
||||
void Debugger_Disasm::Step()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
Core_DoSingleStep();
|
||||
EmuThread_LockDraw(false);
|
||||
_dbg_update_();
|
||||
}
|
||||
|
||||
void Debugger_Disasm::StepOver()
|
||||
{
|
||||
SetDebugMode(false);
|
||||
EmuThread_LockDraw(true);
|
||||
CBreakPoints::AddBreakPoint(cpu->GetPC()+cpu->getInstructionSize(0),true);
|
||||
_dbg_update_();
|
||||
Core_EnableStepping(false);
|
||||
EmuThread_LockDraw(false);
|
||||
mainWindow->UpdateMenus();
|
||||
mainWindow->updateMenus();
|
||||
}
|
||||
|
||||
void Debugger_Disasm::StepHLE()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
hleDebugBreak();
|
||||
SetDebugMode(false);
|
||||
_dbg_update_();
|
||||
Core_EnableStepping(false);
|
||||
EmuThread_LockDraw(false);
|
||||
mainWindow->UpdateMenus();
|
||||
mainWindow->updateMenus();
|
||||
}
|
||||
|
||||
void Debugger_Disasm::UpdateDialog()
|
||||
@ -178,11 +148,9 @@ void Debugger_Disasm::UpdateDialog()
|
||||
void Debugger_Disasm::Stop()
|
||||
{
|
||||
SetDebugMode(true);
|
||||
EmuThread_LockDraw(true);
|
||||
Core_EnableStepping(true);
|
||||
EmuThread_LockDraw(false);
|
||||
_dbg_update_();
|
||||
mainWindow->UpdateMenus();
|
||||
mainWindow->updateMenus();
|
||||
UpdateDialog();
|
||||
}
|
||||
|
||||
@ -190,9 +158,7 @@ void Debugger_Disasm::Skip()
|
||||
{
|
||||
CtrlDisAsmView *ptr = ui->DisasmView;
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
cpu->SetPC(cpu->GetPC() + cpu->getInstructionSize(0));
|
||||
EmuThread_LockDraw(false);
|
||||
ptr->gotoPC();
|
||||
UpdateDialog();
|
||||
}
|
||||
@ -368,7 +334,6 @@ void Debugger_Disasm::UpdateBreakpointsGUI()
|
||||
|
||||
ui->breakpointsList->clear();
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
auto breakpoints = CBreakPoints::GetBreakpoints();
|
||||
for(size_t i = 0; i < breakpoints.size(); i++)
|
||||
{
|
||||
@ -383,7 +348,6 @@ void Debugger_Disasm::UpdateBreakpointsGUI()
|
||||
ui->breakpointsList->setCurrentItem(item);
|
||||
}
|
||||
}
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void Debugger_Disasm::on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column)
|
||||
@ -429,9 +393,7 @@ void Debugger_Disasm::UpdateThreadGUI()
|
||||
{
|
||||
ui->threadList->clear();
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
std::vector<DebugThreadInfo> threads = GetThreadsInfo();
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
for(size_t i = 0; i < threads.size(); i++)
|
||||
{
|
||||
@ -508,9 +470,7 @@ void Debugger_Disasm::GotoThreadEntryPoint()
|
||||
|
||||
void Debugger_Disasm::SetThreadStatus(ThreadStatus status)
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
__KernelChangeThreadState(threadRowSelected->data(0,Qt::UserRole).toInt(), status);
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
UpdateThread();
|
||||
}
|
||||
@ -544,7 +504,6 @@ void Debugger_Disasm::UpdateDisplayListGUI()
|
||||
|
||||
ui->displayList->clear();
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
const std::list<int>& dlQueue = gpu->GetDisplayLists();
|
||||
|
||||
DisplayList dlist;
|
||||
@ -605,7 +564,6 @@ void Debugger_Disasm::UpdateDisplayListGUI()
|
||||
}
|
||||
for(int i = 0; i < ui->displayList->columnCount(); i++)
|
||||
ui->displayList->resizeColumnToContents(i);
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void Debugger_Disasm::on_displayList_customContextMenuRequested(const QPoint &pos)
|
||||
|
@ -39,8 +39,6 @@ public:
|
||||
void UpdateBreakpoints();
|
||||
void UpdateThread();
|
||||
void UpdateDisplayList();
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
|
||||
signals:
|
||||
void updateDisplayList_();
|
||||
@ -82,7 +80,6 @@ private slots:
|
||||
void SetThreadStatusWait();
|
||||
void SetThreadStatusSuspend();
|
||||
void on_displayList_customContextMenuRequested(const QPoint &pos);
|
||||
void releaseLock();
|
||||
|
||||
private:
|
||||
void SetThreadStatus(ThreadStatus status);
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "ui_debugger_displaylist.h"
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "GPU/GeDisasm.h"
|
||||
#include "EmuThread.h"
|
||||
#include "Core/Host.h"
|
||||
#include "base/display.h"
|
||||
#include "mainwindow.h"
|
||||
@ -41,24 +40,6 @@ Debugger_DisplayList::~Debugger_DisplayList()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void Debugger_DisplayList::showEvent(QShowEvent *)
|
||||
{
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
|
||||
EmuThread_LockDraw(true);
|
||||
QTimer::singleShot(100, this, SLOT(releaseLock()));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void Debugger_DisplayList::releaseLock()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
|
||||
void Debugger_DisplayList::UpdateDisplayList()
|
||||
{
|
||||
emit updateDisplayList_();
|
||||
@ -76,7 +57,6 @@ void Debugger_DisplayList::UpdateDisplayListGUI()
|
||||
ui->displayList->clear();
|
||||
ui->displayListData->clear();
|
||||
|
||||
EmuThread_LockDraw(true);
|
||||
const std::list<int>& dlQueue = gpu->GetDisplayLists();
|
||||
|
||||
for(auto listIdIt = dlQueue.begin(); listIdIt != dlQueue.end(); ++listIdIt)
|
||||
@ -115,8 +95,6 @@ void Debugger_DisplayList::UpdateDisplayListGUI()
|
||||
displayListRowSelected = ui->displayList->topLevelItem(0);
|
||||
ShowDLCode();
|
||||
}
|
||||
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
|
||||
@ -1486,8 +1464,6 @@ void Debugger_DisplayList::UpdateRenderBuffer()
|
||||
|
||||
void Debugger_DisplayList::UpdateRenderBufferGUI()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
|
||||
//gpu->Flush();
|
||||
|
||||
int FRAME_WIDTH;
|
||||
@ -1534,8 +1510,6 @@ void Debugger_DisplayList::UpdateRenderBufferGUI()
|
||||
ui->fboImg->setMaximumHeight(pixmap.height() * fboZoomFactor);
|
||||
|
||||
delete[] data;
|
||||
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void Debugger_DisplayList::on_nextDrawBtn_clicked()
|
||||
|
@ -48,8 +48,6 @@ public:
|
||||
void UpdateRenderBufferList();
|
||||
void UpdateVertexInfo();
|
||||
void UpdateIndexInfo();
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
|
||||
signals:
|
||||
void updateDisplayList_();
|
||||
@ -60,7 +58,6 @@ private slots:
|
||||
void UpdateDisplayListGUI();
|
||||
void UpdateRenderBufferListGUI();
|
||||
void UpdateRenderBufferGUI();
|
||||
void releaseLock();
|
||||
|
||||
void on_displayList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
void on_stepBtn_clicked();
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "debugger_memory.h"
|
||||
#include "ui_debugger_memory.h"
|
||||
#include "EmuThread.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include <QTimer>
|
||||
|
||||
@ -22,22 +21,6 @@ Debugger_Memory::~Debugger_Memory()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void Debugger_Memory::showEvent(QShowEvent *)
|
||||
{
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
|
||||
EmuThread_LockDraw(true);
|
||||
QTimer::singleShot(100, this, SLOT(releaseLock()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Debugger_Memory::releaseLock()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void Debugger_Memory::Update()
|
||||
{
|
||||
ui->memView->redraw();
|
||||
|
@ -22,10 +22,6 @@ public:
|
||||
void Goto(u32 addr);
|
||||
|
||||
void NotifyMapLoaded();
|
||||
public slots:
|
||||
void releaseLock();
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
private slots:
|
||||
void on_editAddress_textChanged(const QString &arg1);
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <QTimer>
|
||||
#include "Core/HLE/sceDisplay.h"
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "EmuThread.h"
|
||||
#include "base/display.h"
|
||||
|
||||
Debugger_MemoryTex::Debugger_MemoryTex(QWidget *parent) :
|
||||
@ -23,23 +22,6 @@ Debugger_MemoryTex::~Debugger_MemoryTex()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void Debugger_MemoryTex::showEvent(QShowEvent *)
|
||||
{
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
|
||||
EmuThread_LockDraw(true);
|
||||
QTimer::singleShot(100, this, SLOT(releaseLock()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Debugger_MemoryTex::releaseLock()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
|
||||
void Debugger_MemoryTex::ShowTex(const GPUgstate &state)
|
||||
{
|
||||
ui->texaddr->setText(QString("%1").arg(state.texaddr[0] & 0xFFFFFF,8,16,QChar('0')));
|
||||
@ -58,8 +40,6 @@ void Debugger_MemoryTex::ShowTex(const GPUgstate &state)
|
||||
|
||||
void Debugger_MemoryTex::on_readBtn_clicked()
|
||||
{
|
||||
EmuThread_LockDraw(true);
|
||||
|
||||
GPUgstate state;
|
||||
state.texaddr[0] = ui->texaddr->text().toUInt(0,16);
|
||||
state.texbufwidth[0] = ui->texbufwidth0->text().toUInt(0,16);
|
||||
@ -89,7 +69,4 @@ void Debugger_MemoryTex::on_readBtn_clicked()
|
||||
}
|
||||
|
||||
delete[] newData;
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,10 +17,7 @@ public:
|
||||
~Debugger_MemoryTex();
|
||||
|
||||
void ShowTex(const GPUgstate& state);
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
private slots:
|
||||
void releaseLock();
|
||||
void on_readBtn_clicked();
|
||||
|
||||
private:
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "debugger_vfpu.h"
|
||||
#include "ui_debugger_vfpu.h"
|
||||
#include "EmuThread.h"
|
||||
#include "mainwindow.h"
|
||||
#include <QTimer>
|
||||
|
||||
@ -22,22 +21,6 @@ Debugger_VFPU::~Debugger_VFPU()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void Debugger_VFPU::showEvent(QShowEvent *)
|
||||
{
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
// Hack to remove the X11 crash with threaded opengl when opening the first dialog
|
||||
EmuThread_LockDraw(true);
|
||||
QTimer::singleShot(100, this, SLOT(releaseLock()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Debugger_VFPU::releaseLock()
|
||||
{
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
void Debugger_VFPU::Update()
|
||||
{
|
||||
ui->vfpu->redraw();
|
||||
|
@ -19,10 +19,6 @@ public:
|
||||
|
||||
void Update();
|
||||
void Goto(u32 addr);
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
public slots:
|
||||
void releaseLock();
|
||||
private slots:
|
||||
void on_comboBox_currentIndexChanged(int index);
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
#include "QtHost.h"
|
||||
#include "qtemugl.h"
|
||||
#include "EmuThread.h"
|
||||
|
||||
// TODO: Make this class thread-aware. Can't send events to a different thread. Currently only works on X11.
|
||||
// Needs to use QueuedConnection for signals/slots.
|
||||
@ -202,12 +201,6 @@ void MainWindow::Boot()
|
||||
updateMenus();
|
||||
}
|
||||
|
||||
void MainWindow::CoreEmitWait(bool isWaiting)
|
||||
{
|
||||
// Unlock mutex while core is waiting;
|
||||
EmuThread_LockDraw(!isWaiting);
|
||||
}
|
||||
|
||||
void MainWindow::openAct_triggered()
|
||||
{
|
||||
QString filename = QFileDialog::getOpenFileName(NULL, "Load File", g_Config.currentDirectory.c_str(), "PSP ROMs (*.pbp *.elf *.iso *.cso *.prx)");
|
||||
@ -618,33 +611,33 @@ void MainWindow::createMenus()
|
||||
}
|
||||
|
||||
// File
|
||||
fileMenu = menuBar()->addMenu("");
|
||||
fileMenu = menuBar()->addMenu("");
|
||||
NEW_ACTION_KEY(fileMenu, openAct, QKeySequence::Open);
|
||||
NEW_ACTION_KEY(fileMenu, closeAct, QKeySequence::Close);
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addSeparator();
|
||||
NEW_ACTION_KEY(fileMenu, qlstateAct, Qt::Key_F4);
|
||||
NEW_ACTION_KEY(fileMenu, qsstateAct,Qt::Key_F2);
|
||||
NEW_ACTION(fileMenu, lstateAct);
|
||||
NEW_ACTION(fileMenu, sstateAct);
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addSeparator();
|
||||
NEW_ACTION(fileMenu, exitAct);
|
||||
|
||||
// Emulation
|
||||
emuMenu = menuBar()->addMenu("");
|
||||
emuMenu = menuBar()->addMenu("");
|
||||
NEW_ACTION_KEY(emuMenu, runAct, Qt::Key_F7);
|
||||
NEW_ACTION_KEY(emuMenu, pauseAct, Qt::Key_F8);
|
||||
NEW_ACTION(emuMenu, resetAct);
|
||||
emuMenu->addSeparator();
|
||||
emuMenu->addSeparator();
|
||||
NEW_ACTION_CHK(emuMenu, runonloadAct);
|
||||
|
||||
// Debug
|
||||
debugMenu = menuBar()->addMenu("");
|
||||
debugMenu = menuBar()->addMenu("");
|
||||
NEW_ACTION(debugMenu, lmapAct);
|
||||
NEW_ACTION(debugMenu, smapAct);
|
||||
NEW_ACTION(debugMenu, resetTableAct);
|
||||
debugMenu->addSeparator();
|
||||
debugMenu->addSeparator();
|
||||
NEW_ACTION(debugMenu, dumpNextAct);
|
||||
debugMenu->addSeparator();
|
||||
debugMenu->addSeparator();
|
||||
NEW_ACTION_KEY(debugMenu, disasmAct, Qt::CTRL + Qt::Key_D);
|
||||
NEW_ACTION(debugMenu, dpyListAct);
|
||||
NEW_ACTION(debugMenu, consoleAct);
|
||||
@ -652,7 +645,7 @@ void MainWindow::createMenus()
|
||||
NEW_ACTION(debugMenu, memviewTexAct);
|
||||
|
||||
// Options
|
||||
optionsMenu = menuBar()->addMenu("");
|
||||
optionsMenu = menuBar()->addMenu("");
|
||||
// - Core
|
||||
coreMenu = optionsMenu->addMenu("");
|
||||
NEW_ACTION_CHK(coreMenu, dynarecAct);
|
||||
@ -739,7 +732,7 @@ void MainWindow::createMenus()
|
||||
langMenu->addActions(langGroup->actions());
|
||||
|
||||
// Help
|
||||
helpMenu = menuBar()->addMenu("");
|
||||
helpMenu = menuBar()->addMenu("");
|
||||
NEW_ACTION(helpMenu, websiteAct);
|
||||
NEW_ACTION(helpMenu, aboutAct);
|
||||
|
||||
|
@ -17,10 +17,10 @@ class QtEmuGL;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow() { };
|
||||
|
||||
Debugger_Disasm* GetDialogDisasm() { return dialogDisasm; }
|
||||
@ -40,7 +40,6 @@ protected:
|
||||
|
||||
public slots:
|
||||
void Boot();
|
||||
void CoreEmitWait(bool);
|
||||
|
||||
private slots:
|
||||
// File
|
||||
|
Loading…
Reference in New Issue
Block a user