examples - bug fix in window.h
All checks were successful
Build / Build (push) Successful in 2m58s

This commit is contained in:
2026-04-12 23:47:37 -04:00
parent 14b4e60d3a
commit aa39f81bb1

View File

@@ -6,16 +6,16 @@
namespace OatmealUtils { namespace OatmealUtils {
inline GLFWwindow *initWindow(const char *title, uint32_t width, uint32_t height) { inline GLFWwindow *initWindow(const char *title, uint32_t width, uint32_t height) {
OatmealUtils::createLogger("window", nullptr); OatmealUtils::createLogger("window", nullptr);
OatmealUtils::get("window")->debug("Initializing window backend"); OatmealUtils::getLogger("window")->debug("Initializing window backend");
glfwInit(); glfwInit();
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
OatmealUtils::get("window")->debug("Creating window"); OatmealUtils::getLogger("window")->debug("Creating window");
GLFWwindow *window = glfwCreateWindow(width, height, title, nullptr, nullptr); GLFWwindow *window = glfwCreateWindow(width, height, title, nullptr, nullptr);
if (window == nullptr) { if (window == nullptr) {
const char *desc; const char *desc;
uint32_t code = glfwGetError(&desc); uint32_t code = glfwGetError(&desc);
OatmealUtils::get("window")->critical("Failed to create window: ({}) {}", code, desc); OatmealUtils::getLogger("window")->critical("Failed to create window: ({}) {}", code, desc);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }