[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / settings / ServicesSettings.cpp
blob61940bb991eab065179ce20c425c91e595f34f90
1 /*
2 * Copyright (C) 2023 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #include "ServicesSettings.h"
11 #include "filesystem/IFileTypes.h"
12 #include "guilib/LocalizeStrings.h"
13 #include "utils/StringUtils.h"
15 using namespace XFILE;
17 void CServicesSettings::SettingOptionsChunkSizesFiller(const SettingConstPtr& setting,
18 std::vector<IntegerSettingOption>& list,
19 int& current,
20 void* data)
22 const auto& kb = g_localizeStrings.Get(37121);
23 const auto& mb = g_localizeStrings.Get(37122);
25 list.emplace_back(StringUtils::Format(kb, 16), 16);
26 list.emplace_back(StringUtils::Format(kb, 32), 32);
27 list.emplace_back(StringUtils::Format(kb, 64), 64);
28 list.emplace_back(StringUtils::Format(kb, 128), 128);
29 list.emplace_back(StringUtils::Format(kb, 256), 256);
30 list.emplace_back(StringUtils::Format(kb, 512), 512);
31 list.emplace_back(StringUtils::Format(mb, 1), 1024);
34 void CServicesSettings::SettingOptionsBufferModesFiller(const SettingConstPtr& setting,
35 std::vector<IntegerSettingOption>& list,
36 int& current,
37 void* data)
39 list.emplace_back(g_localizeStrings.Get(37110), CACHE_BUFFER_MODE_NONE);
40 list.emplace_back(g_localizeStrings.Get(37111), CACHE_BUFFER_MODE_TRUE_INTERNET);
41 list.emplace_back(g_localizeStrings.Get(37112), CACHE_BUFFER_MODE_INTERNET);
42 list.emplace_back(g_localizeStrings.Get(37113), CACHE_BUFFER_MODE_NETWORK);
43 list.emplace_back(g_localizeStrings.Get(37114), CACHE_BUFFER_MODE_ALL);
46 void CServicesSettings::SettingOptionsMemorySizesFiller(const SettingConstPtr& setting,
47 std::vector<IntegerSettingOption>& list,
48 int& current,
49 void* data)
51 const auto& mb = g_localizeStrings.Get(37122);
52 const auto& gb = g_localizeStrings.Get(37123);
54 list.emplace_back(StringUtils::Format(mb, 16), 16);
55 list.emplace_back(StringUtils::Format(mb, 20), 20);
56 list.emplace_back(StringUtils::Format(mb, 24), 24);
57 list.emplace_back(StringUtils::Format(mb, 32), 32);
58 list.emplace_back(StringUtils::Format(mb, 48), 48);
59 list.emplace_back(StringUtils::Format(mb, 64), 64);
60 list.emplace_back(StringUtils::Format(mb, 96), 96);
61 list.emplace_back(StringUtils::Format(mb, 128), 128);
62 list.emplace_back(StringUtils::Format(mb, 192), 192);
63 list.emplace_back(StringUtils::Format(mb, 256), 256);
64 list.emplace_back(StringUtils::Format(mb, 384), 384);
65 list.emplace_back(StringUtils::Format(mb, 512), 512);
66 list.emplace_back(StringUtils::Format(mb, 768), 768);
67 list.emplace_back(StringUtils::Format(gb, 1), 1024);
68 list.emplace_back(g_localizeStrings.Get(37115), 0);
71 void CServicesSettings::SettingOptionsReadFactorsFiller(const SettingConstPtr& setting,
72 std::vector<IntegerSettingOption>& list,
73 int& current,
74 void* data)
76 list.emplace_back(g_localizeStrings.Get(37116), 0);
77 list.emplace_back("1.1x", 110);
78 list.emplace_back("1.25x", 125);
79 list.emplace_back("1.5x", 150);
80 list.emplace_back("1.75x", 175);
81 list.emplace_back("2x", 200);
82 list.emplace_back("2.5x", 250);
83 list.emplace_back("3x", 300);
84 list.emplace_back("4x", 400);
85 list.emplace_back("5x", 500);
86 list.emplace_back("7x", 700);
87 list.emplace_back("10x", 1000);
88 list.emplace_back("15x", 1500);
89 list.emplace_back("20x", 2000);
90 list.emplace_back("30x", 3000);
91 list.emplace_back("50x", 5000);
94 void CServicesSettings::SettingOptionsCacheChunkSizesFiller(const SettingConstPtr& setting,
95 std::vector<IntegerSettingOption>& list,
96 int& current,
97 void* data)
99 const auto& byte = g_localizeStrings.Get(37120);
100 const auto& kb = g_localizeStrings.Get(37121);
101 const auto& mb = g_localizeStrings.Get(37122);
103 list.emplace_back(StringUtils::Format(byte, 256), 256);
104 list.emplace_back(StringUtils::Format(byte, 512), 512);
105 list.emplace_back(StringUtils::Format(kb, 1), 1024);
106 list.emplace_back(StringUtils::Format(kb, 2), 2 * 1024);
107 list.emplace_back(StringUtils::Format(kb, 4), 4 * 1024);
108 list.emplace_back(StringUtils::Format(kb, 8), 8 * 1024);
109 list.emplace_back(StringUtils::Format(kb, 16), 16 * 1024);
110 list.emplace_back(StringUtils::Format(kb, 32), 32 * 1024);
111 list.emplace_back(StringUtils::Format(kb, 64), 64 * 1024);
112 list.emplace_back(StringUtils::Format(kb, 128), 128 * 1024);
113 list.emplace_back(StringUtils::Format(kb, 256), 256 * 1024);
114 list.emplace_back(StringUtils::Format(kb, 512), 512 * 1024);
115 list.emplace_back(StringUtils::Format(mb, 1), 1024 * 1024);