summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/GameConfigWidget.h
blob: 7ad4e64925baee8d537ead2747231be8e1dd71fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <string>

#include <QString>
#include <QWidget>

#include "Common/IniFile.h"

namespace UICommon
{
class GameFile;
}

class QCheckBox;
class QComboBox;
class QPushButton;
class QSlider;
class QSpinBox;
class QTabWidget;

class GameConfigWidget : public QWidget
{
  Q_OBJECT
public:
  explicit GameConfigWidget(const UICommon::GameFile& game);

private:
  void CreateWidgets();
  void ConnectWidgets();

  void LoadSettings();
  void SaveSettings();

  void SaveCheckBox(QCheckBox* checkbox, const std::string& section, const std::string& key,
                    bool reverse = false);
  void LoadCheckBox(QCheckBox* checkbox, const std::string& section, const std::string& key,
                    bool reverse = false);

  QString m_gameini_sys_path;
  QString m_gameini_local_path;

  QTabWidget* m_default_tab;
  QTabWidget* m_local_tab;

  QCheckBox* m_enable_dual_core;
  QCheckBox* m_enable_mmu;
  QCheckBox* m_enable_fprf;
  QCheckBox* m_sync_gpu;
  QCheckBox* m_emulate_disc_speed;
  QCheckBox* m_use_dsp_hle;
  QCheckBox* m_use_monoscopic_shadows;
  QCheckBox* m_manual_texture_sampling;

  QPushButton* m_refresh_config;

  QComboBox* m_deterministic_dual_core;

  QSlider* m_depth_slider;

  QSpinBox* m_convergence_spin;

  const UICommon::GameFile& m_game;
  std::string m_game_id;

  Common::IniFile m_gameini_local;
  Common::IniFile m_gameini_default;
};