Add thread debugger
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "panda_qt/screen.hpp"
|
||||
#include "panda_qt/shader_editor.hpp"
|
||||
#include "panda_qt/text_editor.hpp"
|
||||
#include "panda_qt/thread_debugger.hpp"
|
||||
#include "services/hid.hpp"
|
||||
|
||||
struct CheatMessage {
|
||||
@@ -109,6 +110,7 @@ class MainWindow : public QMainWindow {
|
||||
TextEditorWindow* luaEditor;
|
||||
PatchWindow* patchWindow;
|
||||
ShaderEditorWindow* shaderEditor;
|
||||
ThreadDebugger* threadDebugger;
|
||||
|
||||
// We use SDL's game controller API since it's the sanest API that supports as many controllers as possible
|
||||
SDL_GameController* gameController = nullptr;
|
||||
@@ -157,4 +159,7 @@ class MainWindow : public QMainWindow {
|
||||
|
||||
void handleScreenResize(u32 width, u32 height);
|
||||
void handleTouchscreenPress(QMouseEvent* event);
|
||||
|
||||
signals:
|
||||
void emulatorPaused();
|
||||
};
|
||||
|
||||
28
include/panda_qt/thread_debugger.hpp
Normal file
28
include/panda_qt/thread_debugger.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QTableWidget>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
#include <QtWidgets>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include "emulator.hpp"
|
||||
|
||||
class ThreadDebugger : public QWidget {
|
||||
Q_OBJECT
|
||||
Emulator* emu;
|
||||
|
||||
QVBoxLayout* mainLayout;
|
||||
QTableWidget* threadTable;
|
||||
|
||||
public:
|
||||
ThreadDebugger(Emulator* emu, QWidget* parent = nullptr);
|
||||
void update();
|
||||
|
||||
private:
|
||||
void setListItem(int row, int column, const QString& str);
|
||||
void setListItem(int row, int column, const std::string& str);
|
||||
};
|
||||
Reference in New Issue
Block a user