Fix unicode builds.

This commit is contained in:
castano 2012-02-03 16:23:52 +00:00
parent 5b927a5c22
commit 3f05c6361d
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ namespace
static bool writeMiniDump(EXCEPTION_POINTERS * pExceptionInfo) static bool writeMiniDump(EXCEPTION_POINTERS * pExceptionInfo)
{ {
// create the file // create the file
HANDLE hFile = CreateFile("crash.dmp", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); HANDLE hFile = CreateFileA("crash.dmp", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) { if (hFile == INVALID_HANDLE_VALUE) {
nvDebug("*** Failed to create dump file.\n"); nvDebug("*** Failed to create dump file.\n");
return false; return false;
@ -725,7 +725,7 @@ void debug::disableSigHandler()
bool debug::isDebuggerPresent() bool debug::isDebuggerPresent()
{ {
#if NV_OS_WIN32 #if NV_OS_WIN32
HINSTANCE kernel32 = GetModuleHandle("kernel32.dll"); HINSTANCE kernel32 = GetModuleHandleA("kernel32.dll");
if (kernel32) { if (kernel32) {
FARPROC IsDebuggerPresent = GetProcAddress(kernel32, "IsDebuggerPresent"); FARPROC IsDebuggerPresent = GetProcAddress(kernel32, "IsDebuggerPresent");
if (IsDebuggerPresent != NULL && IsDebuggerPresent()) { if (IsDebuggerPresent != NULL && IsDebuggerPresent()) {

View File

@ -42,7 +42,7 @@ bool FileSystem::exists(const char * path)
bool FileSystem::createDirectory(const char * path) bool FileSystem::createDirectory(const char * path)
{ {
#if NV_OS_WIN32 || NV_OS_XBOX #if NV_OS_WIN32 || NV_OS_XBOX
return CreateDirectory(path, NULL) != 0; return CreateDirectoryA(path, NULL) != 0;
#else #else
return mkdir(path, 0777) != -1; return mkdir(path, 0777) != -1;
#endif #endif