Hacky fix to get it to build on Windows.
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
#include <format>
|
||||
#include <ColorFormats.hpp>
|
||||
|
||||
#if !defined(WIN32)
|
||||
// For some reason this causes crash with exit code: -1073741819 on winblows.
|
||||
std::vector<Color4> list;
|
||||
|
||||
#endif
|
||||
|
||||
std::string toEscapeCode(Color4 c, bool bg){
|
||||
if (bg)
|
||||
@@ -13,11 +15,13 @@ std::string toEscapeCode(Color4 c, bool bg){
|
||||
}
|
||||
|
||||
void print_builtin_color_list() {
|
||||
#if !defined(WIN32)
|
||||
int i = 0;
|
||||
for (const Color4& color : list) {
|
||||
std::cout << toEscapeCode(color) << i << ": " << "Hello, world!" << std::endl;
|
||||
i++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Color4::Color4(const RGB &rgb, u8 alpha): Color4(rgb.r, rgb.g, rgb.b, alpha) {}
|
||||
@@ -77,7 +81,9 @@ Color4::Color4(const HSV &hsv, float alpha) {
|
||||
Color4::Color4(const Color3 &color3, u8 alpha) {r = color3.r; g = color3.g; b = color3.b; a = alpha;}
|
||||
|
||||
Color4::Color4(u8 red, u8 green, u8 blue, u8 alpha): r(red), g(green), b(blue), a(alpha) {
|
||||
#if !defined(WIN32)
|
||||
list.push_back(*this);
|
||||
#endif
|
||||
}
|
||||
|
||||
Color4 Color4::FromColor3(const Color3 &color3, u8 alpha) {return Color4(color3, alpha);}
|
||||
|
Reference in New Issue
Block a user