(ui,)settings: Use explicit instantiation
Reduces compile times a tad on clang.
This commit is contained in:
parent
02265f19d9
commit
04d4b6ab80
10 changed files with 613 additions and 475 deletions
|
@ -7,10 +7,17 @@
|
|||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#endif
|
||||
#include <compare>
|
||||
#include <cstddef>
|
||||
#include <filesystem>
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
#include <fmt/core.h>
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/fs/fs_util.h"
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/settings.h"
|
||||
|
@ -18,6 +25,43 @@
|
|||
|
||||
namespace Settings {
|
||||
|
||||
#define SETTING(TYPE, RANGED) template class Setting<TYPE, RANGED>
|
||||
#define SWITCHABLE(TYPE, RANGED) template class SwitchableSetting<TYPE, RANGED>
|
||||
|
||||
SETTING(AudioEngine, false);
|
||||
SETTING(bool, false);
|
||||
SETTING(int, false);
|
||||
SETTING(std::string, false);
|
||||
SETTING(u16, false);
|
||||
SWITCHABLE(AnisotropyMode, true);
|
||||
SWITCHABLE(AntiAliasing, false);
|
||||
SWITCHABLE(AspectRatio, true);
|
||||
SWITCHABLE(AstcDecodeMode, true);
|
||||
SWITCHABLE(AstcRecompression, true);
|
||||
SWITCHABLE(AudioMode, true);
|
||||
SWITCHABLE(CpuAccuracy, true);
|
||||
SWITCHABLE(FullscreenMode, true);
|
||||
SWITCHABLE(GpuAccuracy, true);
|
||||
SWITCHABLE(Language, true);
|
||||
SWITCHABLE(NvdecEmulation, false);
|
||||
SWITCHABLE(Region, true);
|
||||
SWITCHABLE(RendererBackend, true);
|
||||
SWITCHABLE(ScalingFilter, false);
|
||||
SWITCHABLE(ShaderBackend, true);
|
||||
SWITCHABLE(TimeZone, true);
|
||||
SETTING(VSyncMode, true);
|
||||
SWITCHABLE(bool, false);
|
||||
SWITCHABLE(int, false);
|
||||
SWITCHABLE(int, true);
|
||||
SWITCHABLE(s64, false);
|
||||
SWITCHABLE(u16, true);
|
||||
SWITCHABLE(u32, false);
|
||||
SWITCHABLE(u8, false);
|
||||
SWITCHABLE(u8, true);
|
||||
|
||||
#undef SETTING
|
||||
#undef SWITCHABLE
|
||||
|
||||
Values values;
|
||||
static bool configuring_global = true;
|
||||
|
||||
|
@ -238,6 +282,14 @@ void UpdateRescalingInfo() {
|
|||
info.active = info.up_scale != 1 || info.down_shift != 0;
|
||||
}
|
||||
|
||||
std::string BasicSetting::ToStringGlobal() const {
|
||||
return {};
|
||||
}
|
||||
|
||||
bool BasicSetting::UsingGlobal() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void RestoreGlobalState(bool is_powered_on) {
|
||||
// If a game is running, DO NOT restore the global settings state
|
||||
if (is_powered_on) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue