mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Support additional screen layouts.
Allows users to choose a single screen layout or a large screen layout. Adds a configuration option to change the prominent screen.
This commit is contained in:
		
							parent
							
								
									1f70365faa
								
							
						
					
					
						commit
						2b1654ad9b
					
				
					 16 changed files with 522 additions and 132 deletions
				
			
		|  | @ -161,9 +161,7 @@ void GRenderWindow::OnFramebufferSizeChanged() { | |||
|     qreal pixelRatio = windowPixelRatio(); | ||||
|     unsigned width = child->QPaintDevice::width() * pixelRatio; | ||||
|     unsigned height = child->QPaintDevice::height() * pixelRatio; | ||||
| 
 | ||||
|     NotifyFramebufferLayoutChanged( | ||||
|         EmuWindow::FramebufferLayout::DefaultScreenLayout(width, height)); | ||||
|     UpdateCurrentFramebufferLayout(width, height); | ||||
| } | ||||
| 
 | ||||
| void GRenderWindow::BackupGeometry() { | ||||
|  |  | |||
|  | @ -54,6 +54,11 @@ void Config::ReadValues() { | |||
|     Settings::values.bg_blue = qt_config->value("bg_blue", 1.0).toFloat(); | ||||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Layout"); | ||||
|     Settings::values.layout_option = static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); | ||||
|     Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); | ||||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Audio"); | ||||
|     Settings::values.sink_id = qt_config->value("output_engine", "auto").toString().toStdString(); | ||||
|     Settings::values.enable_audio_stretching = | ||||
|  | @ -155,6 +160,11 @@ void Config::SaveValues() { | |||
|     qt_config->setValue("bg_blue", (double)Settings::values.bg_blue); | ||||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Layout"); | ||||
|     qt_config->setValue("layout_option", static_cast<int>(Settings::values.layout_option)); | ||||
|     qt_config->setValue("swap_screen", Settings::values.swap_screen); | ||||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Audio"); | ||||
|     qt_config->setValue("output_engine", QString::fromStdString(Settings::values.sink_id)); | ||||
|     qt_config->setValue("enable_audio_stretching", Settings::values.enable_audio_stretching); | ||||
|  |  | |||
|  | @ -23,4 +23,5 @@ void ConfigureDialog::applyConfiguration() { | |||
|     ui->graphicsTab->applyConfiguration(); | ||||
|     ui->audioTab->applyConfiguration(); | ||||
|     ui->debugTab->applyConfiguration(); | ||||
|     Settings::Apply(); | ||||
| } | ||||
|  |  | |||
|  | @ -23,6 +23,8 @@ void ConfigureGraphics::setConfiguration() { | |||
|     ui->toggle_shader_jit->setChecked(Settings::values.use_shader_jit); | ||||
|     ui->toggle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution); | ||||
|     ui->toggle_vsync->setChecked(Settings::values.use_vsync); | ||||
|     ui->layout_combobox->setCurrentIndex(static_cast<int>(Settings::values.layout_option)); | ||||
|     ui->swap_screen->setChecked(Settings::values.swap_screen); | ||||
| } | ||||
| 
 | ||||
| void ConfigureGraphics::applyConfiguration() { | ||||
|  | @ -30,5 +32,7 @@ void ConfigureGraphics::applyConfiguration() { | |||
|     Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked(); | ||||
|     Settings::values.use_scaled_resolution = ui->toggle_scaled_resolution->isChecked(); | ||||
|     Settings::values.use_vsync = ui->toggle_vsync->isChecked(); | ||||
|     Settings::values.layout_option = static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex()); | ||||
|     Settings::values.swap_screen = ui->swap_screen->isChecked(); | ||||
|     Settings::Apply(); | ||||
| } | ||||
|  |  | |||
|  | @ -22,39 +22,89 @@ | |||
|         <string>Graphics</string> | ||||
|        </property> | ||||
|        <layout class="QVBoxLayout" name="verticalLayout_2"> | ||||
|          <item> | ||||
|            <widget class="QCheckBox" name="toggle_hw_renderer"> | ||||
|              <property name="text"> | ||||
|                <string>Enable hardware renderer</string> | ||||
|              </property> | ||||
|            </widget> | ||||
|          </item> | ||||
|          <item> | ||||
|            <widget class="QCheckBox" name="toggle_shader_jit"> | ||||
|              <property name="text"> | ||||
|                <string>Enable shader JIT</string> | ||||
|              </property> | ||||
|            </widget> | ||||
|          </item> | ||||
|          <item> | ||||
|            <widget class="QCheckBox" name="toggle_scaled_resolution"> | ||||
|              <property name="text"> | ||||
|                <string>Enable scaled resolution</string> | ||||
|              </property> | ||||
|            </widget> | ||||
|          </item> | ||||
|          <item> | ||||
|            <widget class="QCheckBox" name="toggle_vsync"> | ||||
|              <property name="text"> | ||||
|                <string>Enable V-Sync</string> | ||||
|              </property> | ||||
|            </widget> | ||||
|          </item> | ||||
|         <item> | ||||
|          <widget class="QCheckBox" name="toggle_hw_renderer"> | ||||
|           <property name="text"> | ||||
|            <string>Enable hardware renderer</string> | ||||
|           </property> | ||||
|          </widget> | ||||
|         </item> | ||||
|         <item> | ||||
|          <widget class="QCheckBox" name="toggle_shader_jit"> | ||||
|           <property name="text"> | ||||
|            <string>Enable shader JIT</string> | ||||
|           </property> | ||||
|          </widget> | ||||
|         </item> | ||||
|         <item> | ||||
|          <widget class="QCheckBox" name="toggle_scaled_resolution"> | ||||
|           <property name="text"> | ||||
|            <string>Enable scaled resolution</string> | ||||
|           </property> | ||||
|          </widget> | ||||
|         </item> | ||||
|         <item> | ||||
|          <widget class="QCheckBox" name="toggle_vsync"> | ||||
|           <property name="text"> | ||||
|            <string>Enable V-Sync</string> | ||||
|           </property> | ||||
|          </widget> | ||||
|         </item> | ||||
|        </layout> | ||||
|       </widget> | ||||
|      </item> | ||||
|     </layout> | ||||
|    </item> | ||||
|    <item> | ||||
|     <widget class="QGroupBox" name="groupBox2"> | ||||
|      <property name="title"> | ||||
|       <string>Layout</string> | ||||
|      </property> | ||||
|      <layout class="QHBoxLayout" name="horizontalLayout_3"> | ||||
|       <item> | ||||
|        <layout class="QVBoxLayout" name="verticalLayout_2"> | ||||
|         <item> | ||||
|          <layout class="QHBoxLayout" name="horizontalLayout_3"> | ||||
|           <item> | ||||
|            <widget class="QLabel" name="label1"> | ||||
|             <property name="text"> | ||||
|              <string>Screen Layout:</string> | ||||
|             </property> | ||||
|            </widget> | ||||
|           </item> | ||||
|           <item> | ||||
|            <widget class="QComboBox" name="layout_combobox"> | ||||
|             <item> | ||||
|              <property name="text"> | ||||
|               <string notr="true">Default</string> | ||||
|              </property> | ||||
|             </item> | ||||
|             <item> | ||||
|              <property name="text"> | ||||
|               <string notr="true">Single Screen</string> | ||||
|              </property> | ||||
|             </item> | ||||
|             <item> | ||||
|              <property name="text"> | ||||
|               <string notr="true">Large Screen</string> | ||||
|              </property> | ||||
|             </item> | ||||
|            </widget> | ||||
|           </item> | ||||
|          </layout> | ||||
|         </item> | ||||
|         <item> | ||||
|          <widget class="QCheckBox" name="swap_screen"> | ||||
|           <property name="text"> | ||||
|            <string>Swap Screens</string> | ||||
|           </property> | ||||
|          </widget> | ||||
|         </item> | ||||
|        </layout> | ||||
|       </item> | ||||
|      </layout> | ||||
|     </widget> | ||||
|    </item> | ||||
|    <item> | ||||
|     <spacer name="verticalSpacer"> | ||||
|      <property name="orientation"> | ||||
|  | @ -71,22 +121,5 @@ | |||
|   </layout> | ||||
|  </widget> | ||||
|  <resources/> | ||||
|  <connections> | ||||
|   <connection> | ||||
|    <sender>toggle_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> | ||||
|  <connections/> | ||||
| </ui> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue