blob: 0c99320bb9b984beee3116848f8efa7c76497887 (
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
|
#include "../include/Theme.hpp"
#include "../include/GsrInfo.hpp"
#include <assert.h>
namespace gsr {
static Theme *theme = nullptr;
void init_theme(const gsr::GsrInfo &gsr_info) {
assert(!theme);
theme = new Theme();
switch(gsr_info.gpu_info.vendor) {
case gsr::GpuVendor::UNKNOWN: {
break;
}
case gsr::GpuVendor::AMD: {
theme->tint_color = mgl::Color(221, 0, 49);
break;
}
case gsr::GpuVendor::INTEL: {
theme->tint_color = mgl::Color(8, 109, 183);
break;
}
case gsr::GpuVendor::NVIDIA: {
theme->tint_color = mgl::Color(118, 185, 0);
break;
}
}
}
void deinit_theme() {
assert(theme);
delete theme;
theme = nullptr;
}
const Theme& get_theme() {
assert(theme);
return *theme;
}
}
|