mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 21:32:23 +08:00
Add GLFW error handler to show error messages, hopefully gives more descriptive errors (hopefully helps #149)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
6d5c5b7825
commit
847cd56ddf
@ -4,9 +4,16 @@
|
|||||||
|
|
||||||
using namespace WallpaperEngine::Render::Drivers;
|
using namespace WallpaperEngine::Render::Drivers;
|
||||||
|
|
||||||
|
void CustomGLFWErrorHandler (int errorCode, const char* reason)
|
||||||
|
{
|
||||||
|
sLog.error ("GLFW error ", errorCode, ": ", reason);
|
||||||
|
}
|
||||||
|
|
||||||
COpenGLDriver::COpenGLDriver (const char* windowTitle) :
|
COpenGLDriver::COpenGLDriver (const char* windowTitle) :
|
||||||
m_frameCounter (0)
|
m_frameCounter (0)
|
||||||
{
|
{
|
||||||
|
glfwSetErrorCallback (CustomGLFWErrorHandler);
|
||||||
|
|
||||||
// initialize glfw
|
// initialize glfw
|
||||||
if (glfwInit () == GLFW_FALSE)
|
if (glfwInit () == GLFW_FALSE)
|
||||||
sLog.exception ("Failed to initialize glfw");
|
sLog.exception ("Failed to initialize glfw");
|
||||||
|
Loading…
Reference in New Issue
Block a user