From a7287e142d3f0a5a063a4716d2ca03373e1faf2d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 3 Jun 2018 11:27:26 -0700 Subject: [PATCH] Qt Debugger: Remove texture viewer. No longer worked anyway. Being replaced by WebSocket debugger. --- CMakeLists.txt | 7 -- Qt/Debugger/debugger_memorytex.cpp | 60 ---------- Qt/Debugger/debugger_memorytex.h | 27 ----- Qt/Debugger/debugger_memorytex.ui | 177 ----------------------------- Qt/mainwindow.cpp | 20 +--- Qt/mainwindow.h | 5 - Windows/PPSSPP.vcxproj | 8 -- Windows/PPSSPP.vcxproj.filters | 9 -- 8 files changed, 1 insertion(+), 312 deletions(-) delete mode 100644 Qt/Debugger/debugger_memorytex.cpp delete mode 100644 Qt/Debugger/debugger_memorytex.h delete mode 100644 Qt/Debugger/debugger_memorytex.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index 351d0e9381fa..f56b075c2b31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -756,20 +756,13 @@ elseif(USING_QT_UI) if(NOT SDL2_FOUND) find_package(Qt5 COMPONENTS Multimedia) endif(NOT SDL2_FOUND) - set(Qt_UI - Qt/Debugger/debugger_memorytex.ui - ) - qt5_wrap_ui(QT_UI_GEN ${Qt_UI}) list(APPEND NativeAppSource - ${QT_UI_GEN} Qt/QtMain.cpp Qt/QtMain.h Qt/QtHost.cpp Qt/QtHost.h Qt/mainwindow.cpp Qt/mainwindow.h - Qt/Debugger/debugger_memorytex.cpp - Qt/Debugger/debugger_memorytex.h ) add_definitions(-DUSING_QT_UI) include_directories(${CMAKE_CURRENT_BINARY_DIR} Qt Qt/Debugger) diff --git a/Qt/Debugger/debugger_memorytex.cpp b/Qt/Debugger/debugger_memorytex.cpp deleted file mode 100644 index 238c1371af0f..000000000000 --- a/Qt/Debugger/debugger_memorytex.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "debugger_memorytex.h" -#include "gfx/gl_common.h" -#include "ui_debugger_memorytex.h" -#include "Core/MemMap.h" -#include -#include -#include "Core/HLE/sceDisplay.h" -#include "GPU/GPUInterface.h" -#include "base/display.h" - -Debugger_MemoryTex::Debugger_MemoryTex(QWidget *parent) : - QDialog(parent), - ui(new Ui::Debugger_MemoryTex) -{ - ui->setupUi(this); -} - -Debugger_MemoryTex::~Debugger_MemoryTex() -{ - delete ui; -} - -void Debugger_MemoryTex::ShowTex(const GPUgstate &state) -{ - ui->texaddr->setText(QString("%1").arg(state.texaddr[0] & 0xFFFFFF,8,16,QChar('0'))); - ui->texbufwidth0->setText(QString("%1").arg(state.texbufwidth[0] & 0xFFFFFF,8,16,QChar('0'))); - ui->texformat->setText(QString("%1").arg(state.texformat & 0xFFFFFF,8,16,QChar('0'))); - ui->texsize->setText(QString("%1").arg(state.texsize[0] & 0xFFFFFF,8,16,QChar('0'))); - ui->texmode->setText(QString("%1").arg(state.texmode & 0xFFFFFF,8,16,QChar('0'))); - ui->clutformat->setText(QString("%1").arg(state.clutformat & 0xFFFFFF,8,16,QChar('0'))); - ui->clutaddr->setText(QString("%1").arg(state.clutaddr & 0xFFFFFF,8,16,QChar('0'))); - ui->clutaddrupper->setText(QString("%1").arg(state.clutaddrupper & 0xFFFFFF,8,16,QChar('0'))); - ui->loadclut->setText(QString("%1").arg(state.loadclut & 0xFFFFFF,8,16,QChar('0'))); - on_readBtn_clicked(); - - show(); -} - -void Debugger_MemoryTex::on_readBtn_clicked() -{ - GPUgstate state; - state.texaddr[0] = ui->texaddr->text().toUInt(0,16); - state.texbufwidth[0] = ui->texbufwidth0->text().toUInt(0,16); - state.texformat = ui->texformat->text().toUInt(0,16); - state.texsize[0] = ui->texsize->text().toUInt(0,16); - state.texmode = ui->texmode->text().toUInt(0,16); - state.clutformat = ui->clutformat->text().toUInt(0,16); - state.clutaddr = ui->clutaddr->text().toUInt(0,16); - state.clutaddrupper = ui->clutaddrupper->text().toUInt(0,16); - state.loadclut = ui->loadclut->text().toUInt(0,16); - int bufW = state.texbufwidth[0] & 0x3ff; - int w = 1 << (state.texsize[0] & 0xf); - int h = 1 << ((state.texsize[0]>>8) & 0xf); - w = std::max(bufW,w); - uchar* newData = new uchar[w*h*4]; - - // TODO: Use GPU_GetCurrentTexture(). Warning: blocks. - - delete[] newData; -} diff --git a/Qt/Debugger/debugger_memorytex.h b/Qt/Debugger/debugger_memorytex.h deleted file mode 100644 index a39d3ed53b1d..000000000000 --- a/Qt/Debugger/debugger_memorytex.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef DEBUGGER_MEMORYTEX_H -#define DEBUGGER_MEMORYTEX_H - -#include -#include "GPU/GPUState.h" - -namespace Ui { -class Debugger_MemoryTex; -} - -class Debugger_MemoryTex : public QDialog -{ - Q_OBJECT - -public: - explicit Debugger_MemoryTex(QWidget *parent = 0); - ~Debugger_MemoryTex(); - - void ShowTex(const GPUgstate& state); -private slots: - void on_readBtn_clicked(); - -private: - Ui::Debugger_MemoryTex *ui; -}; - -#endif // DEBUGGER_MEMORYTEX_H diff --git a/Qt/Debugger/debugger_memorytex.ui b/Qt/Debugger/debugger_memorytex.ui deleted file mode 100644 index b16301022215..000000000000 --- a/Qt/Debugger/debugger_memorytex.ui +++ /dev/null @@ -1,177 +0,0 @@ - - - Debugger_MemoryTex - - - - 0 - 0 - 768 - 546 - - - - Dialog - - - - - - Qt::Horizontal - - - - - - - - - TexAddr - - - - - - - TexBufWidth0 - - - - - - - TexFormat - - - - - - - TexSize - - - - - - - ClutFormat - - - - - - - ClutAddr - - - - - - - ClutAddrUpper - - - - - - - LoadClut - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TexMode - - - - - - - - - - - - - - Read - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - true - - - - - 0 - 0 - 76 - 526 - - - - - - - QFrame::Box - - - - - - - - - - - - - - - - diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 4fa8d9a6d22e..904edc60952d 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -20,8 +20,7 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) : QMainWindow(parent), currentLanguage("en"), nextState(CORE_POWERDOWN), - lastUIState(UISTATE_MENU), - memoryTexWindow(0) + lastUIState(UISTATE_MENU) { QDesktopWidget *desktop = QApplication::desktop(); int screenNum = QProcessEnvironment::systemEnvironment().value("SDL_VIDEO_FULLSCREEN_HEAD", "0").toInt(); @@ -139,8 +138,6 @@ void MainWindow::bootDone() if(g_Config.bFullScreen != isFullScreen()) fullscrAct(); - memoryTexWindow = new Debugger_MemoryTex(this); - if (nextState == CORE_RUNNING) runAct(); updateMenus(); @@ -162,9 +159,6 @@ void MainWindow::closeAct() { updateMenus(); - if(memoryTexWindow && memoryTexWindow->isVisible()) - memoryTexWindow->close(); - NativeMessageReceived("stop", ""); SetGameTitle(""); } @@ -244,9 +238,6 @@ void MainWindow::resetAct() { updateMenus(); - if(memoryTexWindow) - memoryTexWindow->close(); - NativeMessageReceived("reset", ""); } @@ -305,15 +296,8 @@ void MainWindow::consoleAct() LogManager::GetInstance()->GetConsoleListener()->Show(LogManager::GetInstance()->GetConsoleListener()->Hidden()); } -void MainWindow::memviewTexAct() -{ - if(memoryTexWindow) - memoryTexWindow->show(); -} - void MainWindow::raiseTopMost() { - setWindowState( (windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); raise(); activateWindow(); @@ -488,8 +472,6 @@ void MainWindow::createMenus() debugMenu->addSeparator(); debugMenu->add(new MenuAction(this, SLOT(consoleAct()), QT_TR_NOOP("Log Console"))) ->addDisableState(UISTATE_MENU); - debugMenu->add(new MenuAction(this, SLOT(memviewTexAct()),QT_TR_NOOP("Memory View Texture"))) - ->addDisableState(UISTATE_MENU); // Options MenuTree* optionsMenu = new MenuTree(this, menuBar(), QT_TR_NOOP("&Options")); diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h index 4b99975d52cf..57d24acce139 100644 --- a/Qt/mainwindow.h +++ b/Qt/mainwindow.h @@ -12,7 +12,6 @@ #include "Core/Core.h" #include "Core/Config.h" #include "Core/System.h" -#include "Debugger/debugger_memorytex.h" #include "Qt/QtMain.h" extern bool g_TakeScreenshot; @@ -34,7 +33,6 @@ class MainWindow : public QMainWindow explicit MainWindow(QWidget *parent = 0, bool fullscreen=false); ~MainWindow() { }; - Debugger_MemoryTex* GetDialogMemoryTex() { return memoryTexWindow; } CoreState GetNextState() { return nextState; } void updateMenus(); @@ -91,7 +89,6 @@ private slots: void dumpNextAct(); void takeScreen() { g_TakeScreenshot = true; } void consoleAct(); - void memviewTexAct(); // Options // Core @@ -156,8 +153,6 @@ private slots: CoreState nextState; GlobalUIState lastUIState; - Debugger_MemoryTex *memoryTexWindow; - QActionGroup *anisotropicGroup, *screenGroup, *displayLayoutGroup, *defaultLogGroup, *g3dLogGroup, *hleLogGroup; diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index 85113285de9d..7fa9fc452568 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -341,12 +341,6 @@ - - true - true - true - true - true true @@ -446,7 +440,6 @@ - @@ -506,7 +499,6 @@ - diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters index bf27441486a5..8cfb5cdbb31a 100644 --- a/Windows/PPSSPP.vcxproj.filters +++ b/Windows/PPSSPP.vcxproj.filters @@ -161,9 +161,6 @@ Other Platforms\Qt - - Other Platforms\Qt\Debugger - Windows\System @@ -317,9 +314,6 @@ Other Platforms\Qt\Debugger - - Other Platforms\Qt\Debugger - Windows\System @@ -423,9 +417,6 @@ Other Platforms\Qt - - Other Platforms\Qt\Debugger -