duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

graphicssettingswidget.h (1798B)


      1 // SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
      2 // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
      3 
      4 #pragma once
      5 
      6 #include <QtWidgets/QWidget>
      7 
      8 #include "ui_graphicssettingswidget.h"
      9 
     10 #include "util/gpu_device.h"
     11 
     12 enum class GPURenderer : u8;
     13 
     14 class SettingsWindow;
     15 
     16 class GraphicsSettingsWidget : public QWidget
     17 {
     18   Q_OBJECT
     19 
     20 public:
     21   GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* parent);
     22   ~GraphicsSettingsWidget();
     23 
     24 public Q_SLOTS:
     25   void onShowDebugSettingsChanged(bool enabled);
     26 
     27 private Q_SLOTS:
     28   void updateRendererDependentOptions();
     29   void updatePGXPSettingsEnabled();
     30 
     31   void onAspectRatioChanged();
     32   void updateResolutionDependentOptions();
     33   void onTrueColorChanged();
     34   void onDownsampleModeChanged();
     35 
     36   void onMediaCaptureBackendChanged();
     37   void onMediaCaptureContainerChanged();
     38   void onMediaCaptureVideoEnabledChanged();
     39   void onMediaCaptureVideoAutoResolutionChanged();
     40   void onMediaCaptureAudioEnabledChanged();
     41 
     42   void onEnableAnyTextureReplacementsChanged();
     43   void onEnableVRAMWriteDumpingChanged();
     44 
     45 private:
     46   static constexpr int TAB_INDEX_RENDERING = 0;
     47   static constexpr int TAB_INDEX_ADVANCED = 1;
     48   static constexpr int TAB_INDEX_PGXP = 2;
     49   static constexpr int TAB_INDEX_OSD = 3;
     50   static constexpr int TAB_INDEX_CAPTURE = 4;
     51   static constexpr int TAB_INDEX_TEXTURE_REPLACEMENTS = 5;
     52   static constexpr int TAB_INDEX_DEBUGGING = 6;
     53 
     54   void setupAdditionalUi();
     55   void removePlatformSpecificUi();
     56 
     57   GPURenderer getEffectiveRenderer() const;
     58   bool effectiveRendererIsHardware() const;
     59 
     60   void populateGPUAdaptersAndResolutions(RenderAPI render_api);
     61 
     62   Ui::GraphicsSettingsWidget m_ui;
     63 
     64   SettingsWindow* m_dialog;
     65 
     66   GPUDevice::AdapterInfoList m_adapters;
     67   RenderAPI m_adapters_render_api = RenderAPI::None;
     68 };