mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 09:58:19 -07:00
Remove nvidia debugging option if not an nvidia card
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
* Copyright 2017-2025 Fred N. van Kempen.
|
||||
* Copyright 2025 Jasmine Iwanek.
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <qt_gpudebug_visualnv.hpp>
|
||||
#include "ui_qt_gpudebug_visualnv.h"
|
||||
|
||||
/* NOTE: DO NOT REMOVE */
|
||||
#include <86box/nv/vid_nv3.h>
|
||||
|
||||
/* 86Box core includes */
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>421</width>
|
||||
<height>269</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -18,39 +18,22 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>421</width>
|
||||
<height>269</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>421</width>
|
||||
<height>269</height>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>VRAM Viewer</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignBottom|Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>VRAM</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="5" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -268,20 +268,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
this->setWindowTitle(QString("%1 - %2 %3").arg(vmname, EMU_NAME, EMU_VERSION_FULL));
|
||||
|
||||
connect(this, &MainWindow::hardResetCompleted, this, [this]() {
|
||||
ui->actionMCA_devices->setVisible(machine_has_bus(machine, MACHINE_BUS_MCA));
|
||||
num_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD));
|
||||
scroll_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD));
|
||||
caps_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD));
|
||||
/* TODO: Base this on keyboard type instead when that's done. */
|
||||
kana_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD) &&
|
||||
machine_has_flags(machine, MACHINE_AX));
|
||||
while (QApplication::overrideCursor())
|
||||
QApplication::restoreOverrideCursor();
|
||||
#ifdef USE_WACOM
|
||||
ui->menuTablet_tool->menuAction()->setVisible(mouse_input_mode >= 1);
|
||||
#else
|
||||
ui->menuTablet_tool->menuAction()->setVisible(false);
|
||||
#endif
|
||||
onHardResetCompleted();
|
||||
});
|
||||
|
||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection);
|
||||
@@ -798,6 +785,41 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
updateShortcuts();
|
||||
}
|
||||
|
||||
void MainWindow::onHardResetCompleted()
|
||||
{
|
||||
ui->actionMCA_devices->setVisible(machine_has_bus(machine, MACHINE_BUS_MCA));
|
||||
num_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD));
|
||||
scroll_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD));
|
||||
caps_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD));
|
||||
/* TODO: Base this on keyboard type instead when that's done. */
|
||||
kana_label->setVisible(machine_has_bus(machine, MACHINE_BUS_PS2_PORTS | MACHINE_BUS_AT_KBD) &&
|
||||
machine_has_flags(machine, MACHINE_AX));
|
||||
while (QApplication::overrideCursor())
|
||||
QApplication::restoreOverrideCursor();
|
||||
#ifdef USE_WACOM
|
||||
ui->menuTablet_tool->menuAction()->setVisible(mouse_input_mode >= 1);
|
||||
#else
|
||||
ui->menuTablet_tool->menuAction()->setVisible(false);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NV_LOG
|
||||
/*
|
||||
THIS CODE SUCKS AND THIS DESIGN IS TERRIBLE - EVERYTHING ABOUT IT IS BAD AND WRONG.
|
||||
ENTIRE DEVICE SUBSYSTEM IDEALLY WOULD BE DECOUPLED FROM UI BUT MEH
|
||||
*/
|
||||
|
||||
const device_t* vid_device = video_card_getdevice(gfxcard[0]);
|
||||
|
||||
bool is_nv3 = (vid_device == &nv3_device_agp
|
||||
|| vid_device == &nv3_device_pci
|
||||
|| vid_device == &nv3t_device_agp
|
||||
|| vid_device == &nv3t_device_pci);
|
||||
|
||||
ui->actionDebug_GPUDebug_VisualNv->setVisible(is_nv3);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
|
||||
@@ -70,6 +70,8 @@ signals:
|
||||
public slots:
|
||||
void showSettings();
|
||||
void hardReset();
|
||||
void onHardResetCompleted();
|
||||
|
||||
void togglePause();
|
||||
void initRendererMonitorSlot(int monitor_index);
|
||||
void destroyRendererMonitorSlot(int monitor_index);
|
||||
|
||||
Reference in New Issue
Block a user