mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 07:25:34 +00:00
Rename windows api variable
This commit is contained in:
parent
ae650cc142
commit
6597fe5e26
@ -102,13 +102,13 @@ void StartGame(std::string Dir) {
|
||||
std::string err = "";
|
||||
|
||||
DWORD dw = GetLastError();
|
||||
LPVOID lpMsgBuf;
|
||||
LPVOID lpErrorMsgBuffer;
|
||||
|
||||
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dw,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf, 0, nullptr) == 0) {
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpErrorMsgBuffer, 0, nullptr) == 0) {
|
||||
err = "Unknown error code: " + std::to_string(dw);
|
||||
} else {
|
||||
err = "Error " + std::to_string(dw) + ": " + (char*)lpMsgBuf;
|
||||
err = "Error " + std::to_string(dw) + ": " + (char*)lpErrorMsgBuffer;
|
||||
}
|
||||
|
||||
error("Failed to Launch the game! launcher closing soon. " + err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user