From 01ec8f90fd9d408f82a3860388a4e92aa7055585 Mon Sep 17 00:00:00 2001 From: gerstrong Date: Sat, 25 Jul 2009 17:34:27 +0000 Subject: [PATCH] changes for Win32 git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@175 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/Debug.cpp | 12 +++++++----- src/Unicode.cpp | 5 +++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Debug.cpp b/src/Debug.cpp index 39a5ccddd..02928f89e 100644 --- a/src/Debug.cpp +++ b/src/Debug.cpp @@ -156,8 +156,8 @@ void *ReadGameStateForReport(char *buffer, size_t bufsize) void *ReadGameInfoForReport(char *buffer, size_t bufsize) { memset(buffer, 0, bufsize); - if (!tLXOptions || !tLX) - return buffer; + /*if (!tLXOptions || !tLX) + return buffer;*/ char tmp[32]; /*__try { @@ -278,6 +278,7 @@ void *ReadGameInfoForReport(char *buffer, size_t bufsize) return buffer; } +/* // This function also used in CrashHandler.cpp void OlxWriteCoreDump_Win32(const char* fileName, PEXCEPTION_POINTERS pExInfo ) { @@ -331,10 +332,11 @@ void OlxWriteCoreDump_Win32(const char* fileName, PEXCEPTION_POINTERS pExInfo ) // Close the file CloseHandle(hFile); } +*/ void OlxWriteCoreDump(const char* fileName) { - OlxWriteCoreDump_Win32(fileName, NULL); + //OlxWriteCoreDump_Win32(fileName, NULL); } #else @@ -441,7 +443,7 @@ void DumpCallstack(void (*PrintOutFct) (const std::string&)) { //#include "StackWalker.h" // Call Luke Stackwalker for help typedef void (*PrintOutFct) (const std::string&); - +/* // Override the default stackwalker with our own print functions class PrintStackWalker : public StackWalker { private: @@ -474,7 +476,7 @@ void DumpCallstack(void (*LineOutFct) (const std::string&)) { PrintStackWalker sw(LineOutFct); sw.ShowCallstack(); -} +}*/ #else diff --git a/src/Unicode.cpp b/src/Unicode.cpp index c0960f802..388edb306 100644 --- a/src/Unicode.cpp +++ b/src/Unicode.cpp @@ -1056,6 +1056,11 @@ UnicodeString Utf8ToUnicode(const std::string& str) #include +#ifndef WC_NO_BEST_FIT_CHARS +# define WC_NO_BEST_FIT_CHARS 0x00000400 +#endif + + ////////////////////////// // Convert a UTF-8 string to system native encoding std::string Utf8ToSystemNative(const std::string& utf8str)