Quellcode durchsuchen

Fixing compile errors on Windows

BearishSun vor 9 Jahren
Ursprung
Commit
eaa63d2886

+ 9 - 10
Source/BansheeUtility/Source/Win32/BsWin32CrashHandler.cpp

@@ -12,8 +12,7 @@
 #include "DbgHelp.h"
 #include "DbgHelp.h"
 #pragma warning(default : 4091)
 #pragma warning(default : 4091)
 
 
-static const String sMiniDumpName = "minidump.dmp";
-static const WString sMoreInfoMsg = ;
+static const char* sMiniDumpName = "minidump.dmp";
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
@@ -449,11 +448,11 @@ namespace BansheeEngine
 		Mutex mutex;
 		Mutex mutex;
 	};
 	};
 
 
-	void win32_popupErrorMessageBox()
+	void win32_popupErrorMessageBox(const WString& msg, const Path& folder)
 	{
 	{
-		WString simpleErrorMessage = toWString(sFatalErrorMsg)
+		WString simpleErrorMessage = msg
 			+ L"\n\nFor more information check the crash report located at:\n "
 			+ L"\n\nFor more information check the crash report located at:\n "
-			+ getCrashFolder().toWString();
+			+ folder.toWString();
 		MessageBoxW(nullptr, simpleErrorMessage.c_str(), L"Banshee fatal error!", MB_OK);
 		MessageBoxW(nullptr, simpleErrorMessage.c_str(), L"Banshee fatal error!", MB_OK);
 
 
 	}
 	}
@@ -469,8 +468,8 @@ namespace BansheeEngine
 		logErrorAndStackTrace(type, description, function, file, line);
 		logErrorAndStackTrace(type, description, function, file, line);
 		saveCrashLog();
 		saveCrashLog();
 
 
-		win32_writeMiniDump(getCrashFolder() + WString(sMiniDumpName), nullptr);
-		win32_popupErrorMessageBox();
+		win32_writeMiniDump(getCrashFolder() + String(sMiniDumpName), nullptr);
+		win32_popupErrorMessageBox(toWString(sFatalErrorMsg), getCrashFolder());
 
 
 		// Note: Potentially also log Windows Error Report and/or send crash data to server
 		// Note: Potentially also log Windows Error Report and/or send crash data to server
 	}
 	}
@@ -489,8 +488,8 @@ namespace BansheeEngine
 		                      win32_getStackTrace(*exceptionData->ContextRecord, 0));
 		                      win32_getStackTrace(*exceptionData->ContextRecord, 0));
 		saveCrashLog();
 		saveCrashLog();
 
 
-		win32_writeMiniDump(getCrashFolder() + WString(MiniDumpName), exceptionData);
-		win32_popupErrorMessageBox();
+		win32_writeMiniDump(getCrashFolder() + String(sMiniDumpName), exceptionData);
+		win32_popupErrorMessageBox(toWString(sFatalErrorMsg), getCrashFolder());
 
 
 		// Note: Potentially also log Windows Error Report and/or send crash data to server
 		// Note: Potentially also log Windows Error Report and/or send crash data to server
 
 
@@ -502,7 +501,7 @@ namespace BansheeEngine
 		SYSTEMTIME systemTime;
 		SYSTEMTIME systemTime;
 		GetLocalTime(&systemTime);
 		GetLocalTime(&systemTime);
 
 
-		String timeStamp = L"{0}{1}{2}_{3}{4}";
+		String timeStamp = "{0}{1}{2}_{3}{4}";
 		String strYear = toString(systemTime.wYear, 4, '0');
 		String strYear = toString(systemTime.wYear, 4, '0');
 		String strMonth = toString(systemTime.wMonth, 2, '0');
 		String strMonth = toString(systemTime.wMonth, 2, '0');
 		String strDay = toString(systemTime.wDay, 2, '0');
 		String strDay = toString(systemTime.wDay, 2, '0');

+ 0 - 18
Source/BansheeUtility/Source/Win32/BsWin32FileSystem.cpp

@@ -293,24 +293,6 @@ namespace BansheeEngine
 		return win32_getFileSize(fullPath.toWString());
 		return win32_getFileSize(fullPath.toWString());
 	}
 	}
 
 
-	void FileSystem::move(const Path& oldPath, const Path& newPath, bool overwriteExisting)
-	{
-		WString newPathStr = newPath.toWString();
-
-		if (win32_pathExists(newPathStr))
-		{
-			if (overwriteExisting)
-				FileSystem::removeFile(newPath);
-			else
-			{
-				LOGWRN("Move operation failed because another file already exists at the new path: \"" + toString(newPathStr) + "\"");
-				return;
-			}
-		}
-
-		moveFile(oldPath, newPath);
-	}
-
 	bool FileSystem::exists(const Path& fullPath)
 	bool FileSystem::exists(const Path& fullPath)
 	{
 	{
 		return win32_pathExists(fullPath.toWString());
 		return win32_pathExists(fullPath.toWString());