1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

Start separating out the SDL-related stuff in Widgets.

This commit is contained in:
Andreas Kling 2019-01-10 05:21:19 +01:00
parent 077f1007eb
commit 3e908abfca
9 changed files with 54 additions and 34 deletions

View file

@ -1,9 +1,13 @@
#include "Color.h"
#include "FrameBufferSDL.h"
#include "FrameBuffer.h"
Color::Color(byte r, byte g, byte b)
{
m_value = SDL_MapRGB(FrameBufferSDL::the().surface()->format, r, g, b);
#ifdef USE_SDL
m_value = SDL_MapRGB(FrameBuffer::the().surface()->format, r, g, b);
#else
#error FIXME: Implement
#endif
}
Color::Color(NamedColor named)
@ -26,6 +30,9 @@ Color::Color(NamedColor named)
default: ASSERT_NOT_REACHED(); break;
}
m_value = SDL_MapRGB(FrameBufferSDL::the().surface()->format, rgb.r, rgb.g, rgb.g);
#ifdef USE_SDL
m_value = SDL_MapRGB(FrameBuffer::the().surface()->format, rgb.r, rgb.g, rgb.g);
#else
#error FIXME: Implement
#endif
}