From b5f32340f1fa43e740db10739c58cd12b53b33b6 Mon Sep 17 00:00:00 2001
From: D-AIRY <admin@ds-servers.com>
Date: Sat, 27 Jun 2020 17:29:56 +0300
Subject: [PATCH] Error code report

---
 source/gcore/gcore_utils.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/gcore/gcore_utils.cpp b/source/gcore/gcore_utils.cpp
index e594b03b9..8b5a43b14 100644
--- a/source/gcore/gcore_utils.cpp
+++ b/source/gcore/gcore_utils.cpp
@@ -35,7 +35,7 @@ void InitDevice(SXWINDOW hWnd, int iWidth, int iHeight, bool isWindowed)
 	m_hLibGXAPI = LoadLibrary(szModuleName);
 	if(!m_hLibGXAPI)
 	{
-		LibReport(REPORT_MSG_LEVEL_FATAL, "%s - unable to load GX: %s\n", GEN_MSG_LOCATION, szModuleName);
+		LibReport(REPORT_MSG_LEVEL_FATAL, "%s - unable to load GX: %s; Error: %lu\n", GEN_MSG_LOCATION, szModuleName, GetLastError());
 		return;
 	}
 
@@ -43,7 +43,7 @@ void InitDevice(SXWINDOW hWnd, int iWidth, int iHeight, bool isWindowed)
 	libGXGetInstance = (IGXDevice*(*)())GetProcAddress(m_hLibGXAPI, "GetInstance");
 	if(!libGXGetInstance)
 	{
-		LibReport(REPORT_MSG_LEVEL_FATAL, "%s - %s: Not a GX module!\n", GEN_MSG_LOCATION, szModuleName);
+		LibReport(REPORT_MSG_LEVEL_FATAL, "%s - %s: Not a GX module!; Error: %lu\n", GEN_MSG_LOCATION, szModuleName, GetLastError());
 		return;
 	}
 
-- 
GitLab