[General]: Cleanup usage of outputdebugstring (#733)
This commit is contained in:
parent
bd7d2fe059
commit
024440a55e
@ -134,7 +134,9 @@ namespace Components
|
|||||||
if (!MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, static_cast<MINIDUMP_TYPE>(MiniDumpType), &ex, nullptr, nullptr))
|
if (!MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, static_cast<MINIDUMP_TYPE>(MiniDumpType), &ex, nullptr, nullptr))
|
||||||
{
|
{
|
||||||
MessageBoxA(nullptr, Utils::String::Format("There was an error creating the minidump ({})! Hit OK to close the program.", Utils::GetLastWindowsError()), "ERROR", MB_OK | MB_ICONERROR);
|
MessageBoxA(nullptr, Utils::String::Format("There was an error creating the minidump ({})! Hit OK to close the program.", Utils::GetLastWindowsError()), "ERROR", MB_OK | MB_ICONERROR);
|
||||||
|
#ifdef _DEBUG
|
||||||
OutputDebugStringA("Failed to create new minidump!");
|
OutputDebugStringA("Failed to create new minidump!");
|
||||||
|
#endif
|
||||||
Utils::OutputDebugLastError();
|
Utils::OutputDebugLastError();
|
||||||
TerminateProcess(GetCurrentProcess(), ExceptionInfo->ExceptionRecord->ExceptionCode);
|
TerminateProcess(GetCurrentProcess(), ExceptionInfo->ExceptionRecord->ExceptionCode);
|
||||||
}
|
}
|
||||||
|
@ -1979,11 +1979,6 @@ namespace Components
|
|||||||
//material->drawSurf[9] = material359.drawSurf[1];
|
//material->drawSurf[9] = material359.drawSurf[1];
|
||||||
//material->drawSurf[10] = material359.drawSurf[2];
|
//material->drawSurf[10] = material359.drawSurf[2];
|
||||||
//material->drawSurf[11] = material359.drawSurf[3];
|
//material->drawSurf[11] = material359.drawSurf[3];
|
||||||
|
|
||||||
if (material359.sGameFlags & 0x100)
|
|
||||||
{
|
|
||||||
//OutputDebugStringA("");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -16,7 +16,9 @@ namespace Steam
|
|||||||
|
|
||||||
int RemoteStorage::FileRead(const char *pchFile, void *pvData, int cubDataToRead)
|
int RemoteStorage::FileRead(const char *pchFile, void *pvData, int cubDataToRead)
|
||||||
{
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
OutputDebugStringA(pchFile);
|
OutputDebugStringA(pchFile);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,24 +156,30 @@ namespace Steam
|
|||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
T invoke(const std::string& methodName, Args... args)
|
T invoke(const std::string& methodName, Args... args)
|
||||||
{
|
{
|
||||||
if(!this->interfacePtr)
|
if (!this->interfacePtr)
|
||||||
{
|
{
|
||||||
OutputDebugStringA(::Utils::String::VA("Steam interface pointer is invalid (%s)!\n", methodName.data()));
|
#ifdef _DEBUG
|
||||||
|
OutputDebugStringA(::Utils::String::Format("Steam interface pointer is invalid '{}'!\n", methodName));
|
||||||
|
#endif
|
||||||
return T();
|
return T();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto method = this->getMethod(methodName);
|
auto method = this->getMethod(methodName);
|
||||||
if (!method.first)
|
if (!method.first)
|
||||||
{
|
{
|
||||||
OutputDebugStringA(::Utils::String::VA("Steam interface method %s not found!\n", methodName.data()));
|
#ifdef _DEBUG
|
||||||
|
OutputDebugStringA(::Utils::String::Format("Steam interface method '{}' not found!\n", methodName));
|
||||||
|
#endif
|
||||||
return T();
|
return T();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t argc = method.second;
|
std::size_t argc = method.second;
|
||||||
constexpr std::size_t passedArgc = Interface::AddSizes<sizeof(Args)...>::value;
|
constexpr std::size_t passedArgc = Interface::AddSizes<sizeof(Args)...>::value;
|
||||||
if(passedArgc != argc)
|
if (passedArgc != argc)
|
||||||
{
|
{
|
||||||
OutputDebugStringA(::Utils::String::VA("Steam interface arguments for method %s do not match (expected %d bytes, but got %d bytes)!\n", methodName.data(), argc, passedArgc));
|
#ifdef _DEBUG
|
||||||
|
OutputDebugStringA(::Utils::String::Format("Steam interface arguments for method '{}' do not match (expected {} bytes, but got {} bytes)!\n", methodName, argc, passedArgc));
|
||||||
|
#endif
|
||||||
return T();
|
return T();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,9 @@ namespace Steam
|
|||||||
|
|
||||||
if (!Proxy::Inititalize())
|
if (!Proxy::Inititalize())
|
||||||
{
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
OutputDebugStringA("Steam proxy not initialized properly");
|
OutputDebugStringA("Steam proxy not initialized properly");
|
||||||
|
#endif
|
||||||
Components::StartupMessages::AddMessage("Warning:\nUnable to connect to Steam. Steam features will be unavailable");
|
Components::StartupMessages::AddMessage("Warning:\nUnable to connect to Steam. Steam features will be unavailable");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user