mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	qt: Add a configuration tab for Graphics and move relevant fields.
This commit is contained in:
		
							parent
							
								
									3f515c01bc
								
							
						
					
					
						commit
						2267f98941
					
				@ -22,6 +22,7 @@ set(SRCS
 | 
			
		||||
            configure_debug.cpp
 | 
			
		||||
            configure_dialog.cpp
 | 
			
		||||
            configure_general.cpp
 | 
			
		||||
            configure_graphics.cpp
 | 
			
		||||
            configure_system.cpp
 | 
			
		||||
            configure_input.cpp
 | 
			
		||||
            game_list.cpp
 | 
			
		||||
@ -54,6 +55,7 @@ set(HEADERS
 | 
			
		||||
            configure_debug.h
 | 
			
		||||
            configure_dialog.h
 | 
			
		||||
            configure_general.h
 | 
			
		||||
            configure_graphics.h
 | 
			
		||||
            configure_system.h
 | 
			
		||||
            configure_input.h
 | 
			
		||||
            game_list.h
 | 
			
		||||
@ -73,6 +75,7 @@ set(UIS
 | 
			
		||||
            configure_audio.ui
 | 
			
		||||
            configure_debug.ui
 | 
			
		||||
            configure_general.ui
 | 
			
		||||
            configure_graphics.ui
 | 
			
		||||
            configure_system.ui
 | 
			
		||||
            configure_input.ui
 | 
			
		||||
            hotkeys.ui
 | 
			
		||||
 | 
			
		||||
@ -34,11 +34,16 @@
 | 
			
		||||
       <string>Input</string>
 | 
			
		||||
      </attribute>
 | 
			
		||||
     </widget>
 | 
			
		||||
      <widget class="ConfigureAudio" name="audioTab">
 | 
			
		||||
      <widget class="ConfigureGraphics" name="graphicsTab">
 | 
			
		||||
        <attribute name="title">
 | 
			
		||||
          <string>Audio</string>
 | 
			
		||||
          <string>Graphics</string>
 | 
			
		||||
        </attribute>
 | 
			
		||||
      </widget>
 | 
			
		||||
     <widget class="ConfigureAudio" name="audioTab">
 | 
			
		||||
       <attribute name="title">
 | 
			
		||||
         <string>Audio</string>
 | 
			
		||||
       </attribute>
 | 
			
		||||
     </widget>
 | 
			
		||||
     <widget class="ConfigureDebug" name="debugTab">
 | 
			
		||||
      <attribute name="title">
 | 
			
		||||
       <string>Debug</string>
 | 
			
		||||
@ -80,12 +85,18 @@
 | 
			
		||||
   <header>configure_debug.h</header>
 | 
			
		||||
   <container>1</container>
 | 
			
		||||
  </customwidget>
 | 
			
		||||
   <customwidget>
 | 
			
		||||
     <class>ConfigureInput</class>
 | 
			
		||||
     <extends>QWidget</extends>
 | 
			
		||||
     <header>configure_input.h</header>
 | 
			
		||||
     <container>1</container>
 | 
			
		||||
   </customwidget>
 | 
			
		||||
  <customwidget>
 | 
			
		||||
   <class>ConfigureInput</class>
 | 
			
		||||
   <extends>QWidget</extends>
 | 
			
		||||
   <header>configure_input.h</header>
 | 
			
		||||
   <container>1</container>
 | 
			
		||||
  </customwidget>
 | 
			
		||||
  <customwidget>
 | 
			
		||||
   <class>ConfigureGraphics</class>
 | 
			
		||||
   <extends>QWidget</extends>
 | 
			
		||||
   <header>configure_graphics.h</header>
 | 
			
		||||
   <container>1</container>
 | 
			
		||||
  </customwidget>
 | 
			
		||||
 </customwidgets>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections>
 | 
			
		||||
 | 
			
		||||
@ -31,6 +31,7 @@ void ConfigureDialog::applyConfiguration() {
 | 
			
		||||
    ui->generalTab->applyConfiguration();
 | 
			
		||||
    ui->systemTab->applyConfiguration();
 | 
			
		||||
    ui->inputTab->applyConfiguration();
 | 
			
		||||
    ui->graphicsTab->applyConfiguration();
 | 
			
		||||
    ui->audioTab->applyConfiguration();
 | 
			
		||||
    ui->debugTab->applyConfiguration();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -23,17 +23,11 @@ void ConfigureGeneral::setConfiguration() {
 | 
			
		||||
    ui->toogle_deepscan->setChecked(UISettings::values.gamedir_deepscan);
 | 
			
		||||
    ui->toogle_check_exit->setChecked(UISettings::values.confirm_before_closing);
 | 
			
		||||
    ui->region_combobox->setCurrentIndex(Settings::values.region_value);
 | 
			
		||||
    ui->toogle_hw_renderer->setChecked(Settings::values.use_hw_renderer);
 | 
			
		||||
    ui->toogle_shader_jit->setChecked(Settings::values.use_shader_jit);
 | 
			
		||||
    ui->toogle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ConfigureGeneral::applyConfiguration() {
 | 
			
		||||
    UISettings::values.gamedir_deepscan = ui->toogle_deepscan->isChecked();
 | 
			
		||||
    UISettings::values.confirm_before_closing = ui->toogle_check_exit->isChecked();
 | 
			
		||||
    Settings::values.region_value = ui->region_combobox->currentIndex();
 | 
			
		||||
    Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked();
 | 
			
		||||
    Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked();
 | 
			
		||||
    Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked();
 | 
			
		||||
    Settings::Apply();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -106,40 +106,6 @@
 | 
			
		||||
       </layout>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QGroupBox" name="groupBox_2">
 | 
			
		||||
       <property name="title">
 | 
			
		||||
        <string>Performance</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
        <item>
 | 
			
		||||
         <layout class="QVBoxLayout" name="verticalLayout_3">
 | 
			
		||||
          <item>
 | 
			
		||||
           <widget class="QCheckBox" name="toogle_hw_renderer">
 | 
			
		||||
            <property name="text">
 | 
			
		||||
             <string>Enable hardware renderer</string>
 | 
			
		||||
            </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
          </item>
 | 
			
		||||
          <item>
 | 
			
		||||
           <widget class="QCheckBox" name="toogle_shader_jit">
 | 
			
		||||
            <property name="text">
 | 
			
		||||
             <string>Enable shader JIT</string>
 | 
			
		||||
            </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
          </item>
 | 
			
		||||
          <item>
 | 
			
		||||
           <widget class="QCheckBox" name="toogle_scaled_resolution">
 | 
			
		||||
            <property name="text">
 | 
			
		||||
             <string>Enable scaled resolution</string>
 | 
			
		||||
            </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
          </item>
 | 
			
		||||
         </layout>
 | 
			
		||||
        </item>
 | 
			
		||||
       </layout>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QGroupBox" name="groupBox_3">
 | 
			
		||||
       <property name="title">
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										32
									
								
								src/citra_qt/configure_graphics.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								src/citra_qt/configure_graphics.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,32 @@
 | 
			
		||||
// Copyright 2016 Citra Emulator Project
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#include "citra_qt/configure_graphics.h"
 | 
			
		||||
#include "ui_configure_graphics.h"
 | 
			
		||||
 | 
			
		||||
#include "core/settings.h"
 | 
			
		||||
 | 
			
		||||
ConfigureGraphics::ConfigureGraphics(QWidget *parent) :
 | 
			
		||||
    QWidget(parent),
 | 
			
		||||
    ui(new Ui::ConfigureGraphics)
 | 
			
		||||
{
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
    this->setConfiguration();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ConfigureGraphics::~ConfigureGraphics() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ConfigureGraphics::setConfiguration() {
 | 
			
		||||
    ui->toogle_hw_renderer->setChecked(Settings::values.use_hw_renderer);
 | 
			
		||||
    ui->toogle_shader_jit->setChecked(Settings::values.use_shader_jit);
 | 
			
		||||
    ui->toogle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ConfigureGraphics::applyConfiguration() {
 | 
			
		||||
    Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked();
 | 
			
		||||
    Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked();
 | 
			
		||||
    Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked();
 | 
			
		||||
    Settings::Apply();
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										29
									
								
								src/citra_qt/configure_graphics.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								src/citra_qt/configure_graphics.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,29 @@
 | 
			
		||||
// Copyright 2016 Citra Emulator Project
 | 
			
		||||
// Licensed under GPLv2 or any later version
 | 
			
		||||
// Refer to the license.txt file included.
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
class ConfigureGraphics;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class ConfigureGraphics : public QWidget
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit ConfigureGraphics(QWidget *parent = nullptr);
 | 
			
		||||
    ~ConfigureGraphics();
 | 
			
		||||
 | 
			
		||||
    void applyConfiguration();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    void setConfiguration();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    std::unique_ptr<Ui::ConfigureGraphics> ui;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										85
									
								
								src/citra_qt/configure_graphics.ui
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								src/citra_qt/configure_graphics.ui
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,85 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>ConfigureGraphics</class>
 | 
			
		||||
 <widget class="QWidget" name="ConfigureGraphics">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>400</width>
 | 
			
		||||
    <height>300</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
   <item>
 | 
			
		||||
    <layout class="QVBoxLayout" name="verticalLayout_3">
 | 
			
		||||
     <item>
 | 
			
		||||
      <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
       <property name="title">
 | 
			
		||||
        <string>Graphics</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <layout class="QVBoxLayout" name="verticalLayout_2">
 | 
			
		||||
         <item>
 | 
			
		||||
           <widget class="QCheckBox" name="toogle_hw_renderer">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
               <string>Enable hardware renderer</string>
 | 
			
		||||
             </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
           <widget class="QCheckBox" name="toogle_shader_jit">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
               <string>Enable shader JIT</string>
 | 
			
		||||
             </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
           <widget class="QCheckBox" name="toogle_scaled_resolution">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
               <string>Enable scaled resolution</string>
 | 
			
		||||
             </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
       </layout>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </item>
 | 
			
		||||
    </layout>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item>
 | 
			
		||||
    <spacer name="verticalSpacer">
 | 
			
		||||
     <property name="orientation">
 | 
			
		||||
      <enum>Qt::Vertical</enum>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="sizeHint" stdset="0">
 | 
			
		||||
      <size>
 | 
			
		||||
       <width>20</width>
 | 
			
		||||
       <height>40</height>
 | 
			
		||||
      </size>
 | 
			
		||||
     </property>
 | 
			
		||||
    </spacer>
 | 
			
		||||
   </item>
 | 
			
		||||
  </layout>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections>
 | 
			
		||||
  <connection>
 | 
			
		||||
   <sender>toogle_gdbstub</sender>
 | 
			
		||||
   <signal>toggled(bool)</signal>
 | 
			
		||||
   <receiver>gdbport_spinbox</receiver>
 | 
			
		||||
   <slot>setEnabled(bool)</slot>
 | 
			
		||||
   <hints>
 | 
			
		||||
    <hint type="sourcelabel">
 | 
			
		||||
     <x>84</x>
 | 
			
		||||
     <y>157</y>
 | 
			
		||||
    </hint>
 | 
			
		||||
    <hint type="destinationlabel">
 | 
			
		||||
     <x>342</x>
 | 
			
		||||
     <y>158</y>
 | 
			
		||||
    </hint>
 | 
			
		||||
   </hints>
 | 
			
		||||
  </connection>
 | 
			
		||||
 </connections>
 | 
			
		||||
</ui>
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user