[nostalgia] Collapse NostalgiaCore down to a single library and cleanup impl data access
This commit is contained in:
@@ -16,18 +16,14 @@ namespace nostalgia::core {
|
||||
constexpr auto Scale = 5;
|
||||
|
||||
static void handleGlfwError(int err, const char *desc) noexcept {
|
||||
oxErrf("GLFW error ({}): {}\n", err, desc);
|
||||
}
|
||||
|
||||
void ImGui_Impl_NewFrame() noexcept {
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
oxErrf("GLFW error ({}): {}\n", err, desc);
|
||||
}
|
||||
|
||||
static void handleKeyPress(Context *ctx, int key) noexcept {
|
||||
switch (key) {
|
||||
case GLFW_KEY_ESCAPE:
|
||||
case GLFW_KEY_Q:
|
||||
shutdown(ctx);
|
||||
oxIgnoreError(shutdown(ctx));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -41,6 +37,10 @@ static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int
|
||||
}
|
||||
}
|
||||
|
||||
void ImGui_Impl_NewFrame() noexcept {
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
}
|
||||
|
||||
ox::Error initGfx(Context *ctx) noexcept {
|
||||
auto id = ctx->windowerData<GlfwImplData>();
|
||||
glfwSetErrorCallback(handleGlfwError);
|
||||
|
||||
Reference in New Issue
Block a user