Qt Debugger: Remove texture viewer.

No longer worked anyway.  Being replaced by WebSocket debugger.
This commit is contained in:
Unknown W. Brackets 2018-06-03 11:27:26 -07:00
parent cf33e852ef
commit ec398cbb1f
8 changed files with 1 additions and 312 deletions

View file

@ -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)

View file

@ -1,60 +0,0 @@
#include "debugger_memorytex.h"
#include "gfx/gl_common.h"
#include "ui_debugger_memorytex.h"
#include "Core/MemMap.h"
#include <QImage>
#include <QTimer>
#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;
}

View file

@ -1,27 +0,0 @@
#ifndef DEBUGGER_MEMORYTEX_H
#define DEBUGGER_MEMORYTEX_H
#include <QDialog>
#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

View file

@ -1,177 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Debugger_MemoryTex</class>
<widget class="QDialog" name="Debugger_MemoryTex">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>768</width>
<height>546</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>TexAddr</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>TexBufWidth0</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>TexFormat</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>TexSize</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>ClutFormat</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>ClutAddr</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>ClutAddrUpper</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>LoadClut</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="texaddr"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="texbufwidth0"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="texformat"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="texsize"/>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="clutformat"/>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="clutaddr"/>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="clutaddrupper"/>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="loadclut"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>TexMode</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="texmode"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="readBtn">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QScrollArea" name="texture">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>76</width>
<height>526</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="textureImg">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -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"));

View file

@ -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 @@ public:
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:
CoreState nextState;
GlobalUIState lastUIState;
Debugger_MemoryTex *memoryTexWindow;
QActionGroup *anisotropicGroup, *screenGroup, *displayLayoutGroup,
*defaultLogGroup, *g3dLogGroup, *hleLogGroup;

View file

@ -341,12 +341,6 @@
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\debugger_memorytex.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\Qt\mainwindow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -446,7 +440,6 @@
</ClInclude>
<ClInclude Include="..\android\jni\TestRunner.h" />
<ClInclude Include="..\ios\ViewController.h" />
<ClInclude Include="..\Qt\Debugger\debugger_memorytex.h" />
<ClInclude Include="..\Qt\mainwindow.h" />
<ClInclude Include="GPU\D3D11Context.h" />
<ClInclude Include="GPU\D3D9Context.h" />
@ -506,7 +499,6 @@
<None Include="..\Qt\assets.qrc" />
<None Include="..\Qt\Common.pro" />
<None Include="..\Qt\Core.pro" />
<None Include="..\Qt\Debugger\debugger_memorytex.ui" />
<None Include="..\Qt\GPU.pro" />
<None Include="..\Qt\Native.pro" />
<None Include="..\Qt\PPSSPP.pro" />

View file

@ -161,9 +161,6 @@
<ClCompile Include="..\Qt\mainwindow.cpp">
<Filter>Other Platforms\Qt</Filter>
</ClCompile>
<ClCompile Include="..\Qt\Debugger\debugger_memorytex.cpp">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClCompile>
<ClCompile Include="GPU\D3D11Context.cpp">
<Filter>Windows\System</Filter>
</ClCompile>
@ -317,9 +314,6 @@
<ClInclude Include="..\Qt\Debugger\ctrlvfpuview.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Qt\Debugger\debugger_memorytex.h">
<Filter>Other Platforms\Qt\Debugger</Filter>
</ClInclude>
<ClInclude Include="GPU\D3D11Context.h">
<Filter>Windows\System</Filter>
</ClInclude>
@ -423,9 +417,6 @@
<None Include="..\Qt\assets.qrc">
<Filter>Other Platforms\Qt</Filter>
</None>
<None Include="..\Qt\Debugger\debugger_memorytex.ui">
<Filter>Other Platforms\Qt\Debugger</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ppsspp.rc">