diff --git a/src/Client/Program.c b/src/Client/Program.c index 985a9e620..43e0666eb 100644 --- a/src/Client/Program.c +++ b/src/Client/Program.c @@ -12,9 +12,11 @@ int main(int argc, char* argv[]) { Window_Create(320, 320, 640, 480, &str, NULL); Window_SetVisible(true); Gfx_Init(); - Gfx_ClearColour(PackedCol_Red); + UInt8 RGB = 0; while (true) { + Gfx_ClearColour(PackedCol_Create3(RGB, RGB, RGB)); + RGB++; Window_ProcessEvents(); Platform_ThreadSleep(100); Gfx_BeginFrame(); diff --git a/src/Client/WinWindow.c b/src/Client/WinWindow.c index a10d4ac38..8f6227be9 100644 --- a/src/Client/WinWindow.c +++ b/src/Client/WinWindow.c @@ -440,7 +440,6 @@ void Window_Create(Int32 x, Int32 y, Int32 width, Int32 height, STRING_TRANSIENT if (atom == 0) { ErrorHandler_FailWithCode(GetLastError(), "Failed to register window class"); } - win_Handle = CreateWindowExA( win_StyleEx, atom, title->buffer, win_Style, rect.left, rect.top, RECT_WIDTH(rect), RECT_HEIGHT(rect), @@ -449,6 +448,10 @@ void Window_Create(Int32 x, Int32 y, Int32 width, Int32 height, STRING_TRANSIENT if (win_Handle == NULL) { ErrorHandler_FailWithCode(GetLastError(), "Failed to create window"); } + win_DC = GetDC(win_Handle); + if (win_DC == NULL) { + ErrorHandler_FailWithCode(GetLastError(), "Failed to get device context"); + } win_Exists = true; }