diff --git a/src/nostalgia/core/color.hpp b/src/nostalgia/core/color.hpp index 3e003120..7e28a8f2 100644 --- a/src/nostalgia/core/color.hpp +++ b/src/nostalgia/core/color.hpp @@ -26,10 +26,10 @@ using Color32 = uint32_t; [[nodiscard]] constexpr Color32 toColor32(Color16 nc) noexcept { - Color32 r = static_cast(((nc & 0b0000000000011111) >> 0) * 8); - Color32 g = static_cast(((nc & 0b0000001111100000) >> 5) * 8); - Color32 b = static_cast(((nc & 0b0111110000000000) >> 10) * 8); - Color32 a = 255; + const auto r = static_cast(((nc & 0b0000000000011111) >> 0) * 8); + const auto g = static_cast(((nc & 0b0000001111100000) >> 5) * 8); + const auto b = static_cast(((nc & 0b0111110000000000) >> 10) * 8); + const auto a = static_cast(255); return r | (g << 8) | (b << 16) | (a << 24); } diff --git a/src/nostalgia/core/glfw/gfx.cpp b/src/nostalgia/core/glfw/gfx.cpp index 27978cc4..68ec9f3e 100644 --- a/src/nostalgia/core/glfw/gfx.cpp +++ b/src/nostalgia/core/glfw/gfx.cpp @@ -39,6 +39,8 @@ ox::Error initGfx(Context *ctx) noexcept { glfwSetWindowUserPointer(id->window, ctx); glfwMakeContextCurrent(id->window); oxReturnError(renderer::init(ctx)); + oxReturnError(OxError(glfwInit() != 0)); + ImGui::CreateContext(); ImGui_ImplGlfw_InitForOpenGL(id->window, true); return OxError(0); } diff --git a/src/nostalgia/core/userland/gfx.cpp b/src/nostalgia/core/userland/gfx.cpp index dc81bb3c..240ba3e5 100644 --- a/src/nostalgia/core/userland/gfx.cpp +++ b/src/nostalgia/core/userland/gfx.cpp @@ -8,7 +8,6 @@ #include #include -#include #include "gfx.hpp"