From 85bce5f3df299b61f1a16af45c18db359fb2f710 Mon Sep 17 00:00:00 2001 From: NTAuthority Date: Sun, 27 Jul 2014 21:24:35 +0200 Subject: [PATCH 1/3] add boost root --- VCS PC/VCS PC.vcxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VCS PC/VCS PC.vcxproj b/VCS PC/VCS PC.vcxproj index a92f269..7513383 100644 --- a/VCS PC/VCS PC.vcxproj +++ b/VCS PC/VCS PC.vcxproj @@ -106,7 +106,7 @@ EditAndContinue true NotSet - $(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) + $(BOOST_ROOT);$(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) Sync @@ -160,7 +160,7 @@ popd EditAndContinue true NotSet - $(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) + $(BOOST_ROOT);$(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) Sync Disabled @@ -216,7 +216,7 @@ popd ProgramDatabase true NotSet - $(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) + $(BOOST_ROOT);$(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) _NDEBUG;NDEBUG;%(PreprocessorDefinitions) Sync @@ -271,7 +271,7 @@ popd true NotSet NDEBUG;COMPILE_RC;_INCLUDE_BETA_CODE;%(PreprocessorDefinitions) - $(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) + $(BOOST_ROOT);$(SolutionDir)dependencies\include;$(SolutionDir)dependencies\include\rwsdk;%(AdditionalIncludeDirectories) Sync From 1be4c761b8abe42816ef30b1b4df8e32a123f14d Mon Sep 17 00:00:00 2001 From: NTAuthority Date: Sun, 27 Jul 2014 21:25:06 +0200 Subject: [PATCH 2/3] OutputDebugString for debug info --- VCS PC/VCSPC.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VCS PC/VCSPC.cpp b/VCS PC/VCSPC.cpp index 6227b5d..ea3a89d 100644 --- a/VCS PC/VCSPC.cpp +++ b/VCS PC/VCSPC.cpp @@ -7413,5 +7413,8 @@ void LogToFile(const char* str, ...) fputc('\n', LogFile); fclose(LogFile); va_end(arguments); + + OutputDebugString(TempString); + OutputDebugString("\n"); } } \ No newline at end of file From e960299da497210d54d6d8930ce8936b73d94a0c Mon Sep 17 00:00:00 2001 From: NTAuthority Date: Sun, 27 Jul 2014 21:41:08 +0200 Subject: [PATCH 3/3] if current resolution is unknown (as with my personal window mode thing), don't crash --- VCS PC/Frontend.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/VCS PC/Frontend.cpp b/VCS PC/Frontend.cpp index ba7c44a..a834342 100644 --- a/VCS PC/Frontend.cpp +++ b/VCS PC/Frontend.cpp @@ -977,9 +977,18 @@ void CMenuManager::DrawStandardMenus(bool bDrawMenu) pTextToShow_RightColumn = TheText.Get(CVehicle::m_bEnableMouseFlying ? "FEM_ON" : "FEM_OFF"); break; case 56: - strncpy(cReservedSpace, ((const char**(*)())0x745AF0)()[m_dwResolution], sizeof(cReservedSpace)); + { + const char* pszResolution = ((const char**(*)())0x745AF0)()[m_dwResolution]; + + if (!pszResolution) + { + pszResolution = ""; + } + + strncpy(cReservedSpace, pszResolution, sizeof(cReservedSpace)); pTextToShow_RightColumn = cReservedSpace; break; + } case 44: if ( m_dwAntiAliasingLevel <= 1 ) pTextToShow_RightColumn = TheText.Get("FEM_OFF");