Skip to content

Commit

Permalink
Add additional log message from WIN API if the engine fail to retriev…
Browse files Browse the repository at this point in the history
…e resolutions (ref #109)
  • Loading branch information
MadDeCoDeR committed Sep 28, 2023
1 parent 89ebc2a commit 7ae7a46
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion neo/sys/win32/win_glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,10 @@ bool R_GetModeListForDisplay( const unsigned requestedDisplayNum, idList<vidMode
}

}
enumDiplayFlag = !i ? EDD_GET_DEVICE_INTERFACE_NAME : 0;
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
Expand Down Expand Up @@ -1184,6 +1187,10 @@ bool R_GetRefreshListForDisplay(const unsigned requestedDisplayNum, idList<int>&
}

}
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
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 7ae7a46

Please sign in to comment.