blob: 8b666f8b28a65e4032b3152599ba4d2717162c51 (
plain) (
blame)
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
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <string>
#include "common/settings_common.h"
namespace Settings {
BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Category category_,
bool save_, bool runtime_modifiable_, u32 specialization_,
BasicSetting* other_setting_)
: label{name}, category{category_}, id{linkage.count}, save{save_},
runtime_modifiable{runtime_modifiable_}, specialization{specialization_},
other_setting{other_setting_} {
linkage.by_category[category].push_front(this);
linkage.count++;
}
BasicSetting::~BasicSetting() = default;
std::string BasicSetting::ToStringGlobal() const {
return this->ToString();
}
bool BasicSetting::UsingGlobal() const {
return true;
}
void BasicSetting::SetGlobal(bool global) {}
bool BasicSetting::Save() const {
return save;
}
bool BasicSetting::RuntimeModfiable() const {
return runtime_modifiable;
}
Category BasicSetting::GetCategory() const {
return category;
}
u32 BasicSetting::Specialization() const {
return specialization;
}
BasicSetting* BasicSetting::PairedSetting() const {
return other_setting;
}
const std::string& BasicSetting::GetLabel() const {
return label;
}
static bool configuring_global = true;
bool IsConfiguringGlobal() {
return configuring_global;
}
void SetConfiguringGlobal(bool is_global) {
configuring_global = is_global;
}
} // namespace Settings
|