add vram viewer window

This commit is contained in:
starfrost013
2025-04-28 02:04:49 +01:00
parent ff96ce99b6
commit 44bf760861
5 changed files with 100 additions and 24 deletions

View File

@@ -1 +1,54 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* GPU Debugging Tools - VRAM Viewer implementation
*
*
*
* Authors: starfrost
*
* Copyright 2025 starfrost
*/
/* C++ includes */
#include <cstdbool>
#include <cstdint>
/* Qt includes*/
#include <QDebug>
#include <QComboBox>
#include <QPushButton>
#include <QFormLayout>
#include <QSpinBox>
#include <QCheckBox>
#include <QFrame>
#include <QLineEdit>
#include <QLabel>
#include <QDir>
#include <QSettings>
#include <qt_gpudebug_vram.hpp>
#include "ui_qt_gpudebug_vram.h"
/* 86Box core includes */
extern "C"
{
}
GPUDebugVRAMDialog::GPUDebugVRAMDialog(QWidget *parent)
: QDialog(parent)
, ui(new Ui::GPUDebugVRAMDialog)
{
ui->setupUi(this);
}
GPUDebugVRAMDialog::~GPUDebugVRAMDialog()
{
}

View File

@@ -1,3 +1,21 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* GPU Debugging Tools - VRAM Viewer headers
*
*
*
* Authors: starfrost
*
* Copyright 2025 starfrost
*/
#pragma once
#include <QDialog>
@@ -7,12 +25,16 @@ namespace Ui
class GPUDebugVRAMDialog;
}
class Ui::GPUDebugVRAMDialog : public QDialog
class GPUDebugVRAMDialog : public QDialog
{
Q_OBJECT
public:
void Init();
explicit GPUDebugVRAMDialog(QWidget *parent = nullptr);
~GPUDebugVRAMDialog();
protected:
private:
Ui::GPUDebugVRAMDialog* ui;
};

View File

@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GPUDebugVRAMDialog</class>
<widget class="QDialog" name="HarddiskDialog">
<widget class="QDialog" name="GPUDebugVRAMDialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -30,27 +29,16 @@
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>VRAM Viewer</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="9" column="0" colspan="6">
<widget class="QProgressBar" name="progressBar">
<property name="visible">
<bool>false</bool>
</property>
<property name="value">
<number>0</number>
</property>
<property name="textVisible">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Sectors:</string>
</property>
</widget>
<item row="1" column="1">
<widget class="QLabel" name="GPUDebugVRAMDialog_LabelHeader">
<property name="text">
<string>VRAM Viewer</string>
</property>
</widget>
</item>
</layout>
</widget>
</ui>

View File

@@ -23,6 +23,7 @@
#include <QDebug>
#include "qt_mainwindow.hpp"
#include "qt_gpudebug_vram.hpp"
#include "ui_qt_mainwindow.h"
#include "qt_specifydimensions.h"
@@ -100,6 +101,8 @@ extern bool cpu_thread_running;
#include "qt_mediamenu.hpp"
#include "qt_util.hpp"
#include "qt_gpudebug_vram.hpp"
#if defined __unix__ && !defined __HAIKU__
# ifndef Q_OS_MACOS
# include "evdev_keyboard.hpp"
@@ -2267,3 +2270,12 @@ void MainWindow::on_actionACPI_Shutdown_triggered()
{
acpi_pwrbut_pressed = 1;
}
void MainWindow::on_actionDebug_GPUDebug_VRAM_triggered()
{
GPUDebugVRAMDialog debugVramDialog(this);
debugVramDialog.setWindowFlag(Qt::CustomizeWindowHint, true);
debugVramDialog.setWindowFlag(Qt::WindowTitleHint, true);
debugVramDialog.setWindowFlag(Qt::WindowSystemMenuHint, false);
debugVramDialog.exec();
}

View File

@@ -125,6 +125,7 @@ private slots:
void on_actionPreferences_triggered();
void on_actionEnable_Discord_integration_triggered(bool checked);
void on_actionRenderer_options_triggered();
void on_actionDebug_GPUDebug_VRAM_triggered();
void refreshMediaMenu();
void showMessage_(int flags, const QString &header, const QString &message, bool richText, std::atomic_bool* done = nullptr);