changes for Win32
git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@175 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
@@ -156,8 +156,8 @@ void *ReadGameStateForReport(char *buffer, size_t bufsize)
|
|||||||
void *ReadGameInfoForReport(char *buffer, size_t bufsize)
|
void *ReadGameInfoForReport(char *buffer, size_t bufsize)
|
||||||
{
|
{
|
||||||
memset(buffer, 0, bufsize);
|
memset(buffer, 0, bufsize);
|
||||||
if (!tLXOptions || !tLX)
|
/*if (!tLXOptions || !tLX)
|
||||||
return buffer;
|
return buffer;*/
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
/*__try {
|
/*__try {
|
||||||
|
|
||||||
@@ -278,6 +278,7 @@ void *ReadGameInfoForReport(char *buffer, size_t bufsize)
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// This function also used in CrashHandler.cpp
|
// This function also used in CrashHandler.cpp
|
||||||
void OlxWriteCoreDump_Win32(const char* fileName, PEXCEPTION_POINTERS pExInfo )
|
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
|
// Close the file
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void OlxWriteCoreDump(const char* fileName)
|
void OlxWriteCoreDump(const char* fileName)
|
||||||
{
|
{
|
||||||
OlxWriteCoreDump_Win32(fileName, NULL);
|
//OlxWriteCoreDump_Win32(fileName, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -441,7 +443,7 @@ void DumpCallstack(void (*PrintOutFct) (const std::string&)) {
|
|||||||
//#include "StackWalker.h" // Call Luke Stackwalker for help
|
//#include "StackWalker.h" // Call Luke Stackwalker for help
|
||||||
|
|
||||||
typedef void (*PrintOutFct) (const std::string&);
|
typedef void (*PrintOutFct) (const std::string&);
|
||||||
|
/*
|
||||||
// Override the default stackwalker with our own print functions
|
// Override the default stackwalker with our own print functions
|
||||||
class PrintStackWalker : public StackWalker {
|
class PrintStackWalker : public StackWalker {
|
||||||
private:
|
private:
|
||||||
@@ -474,7 +476,7 @@ void DumpCallstack(void (*LineOutFct) (const std::string&))
|
|||||||
{
|
{
|
||||||
PrintStackWalker sw(LineOutFct);
|
PrintStackWalker sw(LineOutFct);
|
||||||
sw.ShowCallstack();
|
sw.ShowCallstack();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
@@ -1056,6 +1056,11 @@ UnicodeString Utf8ToUnicode(const std::string& str)
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#ifndef WC_NO_BEST_FIT_CHARS
|
||||||
|
# define WC_NO_BEST_FIT_CHARS 0x00000400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
// Convert a UTF-8 string to system native encoding
|
// Convert a UTF-8 string to system native encoding
|
||||||
std::string Utf8ToSystemNative(const std::string& utf8str)
|
std::string Utf8ToSystemNative(const std::string& utf8str)
|
||||||
|
|||||||
Reference in New Issue
Block a user