From 7ae7a46f94c0b276742b22d53528c89d228b458e Mon Sep 17 00:00:00 2001 From: MadDeCoDeR Date: Fri, 29 Sep 2023 00:21:53 +0300 Subject: [PATCH] Add additional log message from WIN API if the engine fail to retrieve resolutions (ref #109) --- neo/sys/win32/win_glimp.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/neo/sys/win32/win_glimp.cpp b/neo/sys/win32/win_glimp.cpp index adf52595..c1b2cb15 100644 --- a/neo/sys/win32/win_glimp.cpp +++ b/neo/sys/win32/win_glimp.cpp @@ -1057,7 +1057,10 @@ bool R_GetModeListForDisplay( const unsigned requestedDisplayNum, idListPrintf("Warning when retrieving Display Modes: %s", msgbuf); } return false; // Never gets here @@ -1184,6 +1187,10 @@ bool R_GetRefreshListForDisplay(const unsigned requestedDisplayNum, idList& } } + int error = GetLastError(); + char msgbuf[256]; + Sys_ParseError(error, msgbuf, 256); + common->Printf("Warning when retrieving Display Modes: %s", msgbuf); return false; // Never gets here } @@ -1228,6 +1235,10 @@ bool R_GetScreenResolution(const unsigned requestedDisplayNum, int& w, int& h, i } } + int error = GetLastError(); + char msgbuf[256]; + Sys_ParseError(error, msgbuf, 256); + common->Printf("Warning when retrieving Display Modes: %s", msgbuf); return false; }