Browse Source
Merge pull request #2032 from bunnei/qt-graphics
Merge pull request #2032 from bunnei/qt-graphics
Qt graphics configure & V-Sync optionnce_cpp
committed by
GitHub
21 changed files with 251 additions and 82 deletions
-
1src/citra/config.cpp
-
4src/citra/default_ini.h
-
1src/citra/emu_window/emu_window_sdl2.cpp
-
3src/citra_qt/CMakeLists.txt
-
59src/citra_qt/bootmanager.cpp
-
2src/citra_qt/bootmanager.h
-
2src/citra_qt/config.cpp
-
27src/citra_qt/configure.ui
-
4src/citra_qt/configure_debug.cpp
-
4src/citra_qt/configure_debug.ui
-
1src/citra_qt/configure_dialog.cpp
-
14src/citra_qt/configure_general.cpp
-
38src/citra_qt/configure_general.ui
-
37src/citra_qt/configure_graphics.cpp
-
29src/citra_qt/configure_graphics.h
-
92src/citra_qt/configure_graphics.ui
-
2src/citra_qt/main.cpp
-
1src/core/settings.h
-
10src/core/system.cpp
-
1src/core/system.h
-
1src/video_core/video_core.cpp
@ -0,0 +1,37 @@ |
|||||
|
// 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"
|
||||
|
#include "core/system.h"
|
||||
|
|
||||
|
ConfigureGraphics::ConfigureGraphics(QWidget *parent) : |
||||
|
QWidget(parent), |
||||
|
ui(new Ui::ConfigureGraphics) |
||||
|
{ |
||||
|
ui->setupUi(this); |
||||
|
this->setConfiguration(); |
||||
|
|
||||
|
ui->toggle_vsync->setEnabled(!System::IsPoweredOn()); |
||||
|
} |
||||
|
|
||||
|
ConfigureGraphics::~ConfigureGraphics() { |
||||
|
} |
||||
|
|
||||
|
void ConfigureGraphics::setConfiguration() { |
||||
|
ui->toggle_hw_renderer->setChecked(Settings::values.use_hw_renderer); |
||||
|
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); |
||||
|
} |
||||
|
|
||||
|
void ConfigureGraphics::applyConfiguration() { |
||||
|
Settings::values.use_hw_renderer = ui->toggle_hw_renderer->isChecked(); |
||||
|
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::Apply(); |
||||
|
} |
||||
@ -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; |
||||
|
}; |
||||
@ -0,0 +1,92 @@ |
|||||
|
<?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="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> |
||||
|
<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>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> |
||||
|
</ui> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue