mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
dolphinwx and debuggerwx can now be compiled with unicode
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3906 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -115,16 +115,17 @@
|
||||
// Shorts - dirs
|
||||
// User dirs
|
||||
#define FULL_USERDATA_DIR ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP
|
||||
#define T_FULLUSERDATA_DIR _T(ROOT_DIR) _T(DIR_SEP) _T(USERDATA_DIR) _T(DIR_SEP)
|
||||
|
||||
#define FULL_GC_USER_DIR FULL_USERDATA_DIR GC_USER_DIR DIR_SEP
|
||||
//#define GC_USER_EUR_DIR FULL_GC_USER_DIR EUR_DIR
|
||||
//#define GC_USER_USA_DIR FULL_GC_USER_DIR USA_DIR
|
||||
//#define GC_USER_JAP_DIR FULL_GC_USER_DIR JAP_DIR
|
||||
#define T_FULL_GC_USER_DIR T_FULLUSERDATA_DIR _T(GC_USER_DIR) _T(DIR_SEP)
|
||||
|
||||
#define FULL_WII_USER_DIR FULL_USERDATA_DIR WII_USER_DIR DIR_SEP
|
||||
#define FULL_WII_ROOT_DIR FULL_USERDATA_DIR WII_USER_DIR // This is the "root" for Wii fs, so that it may be used with created devices
|
||||
|
||||
#define FULL_GAMECONFIG_DIR FULL_USERDATA_DIR GAMECONFIG_DIR DIR_SEP
|
||||
#define T_FULL_GAMECONFIG_DIR T_FULLUSERDATA_DIR _T(GAMECONFIG_DIR) _T(DIR_SEP)
|
||||
|
||||
#define FULL_CONFIG_DIR FULL_USERDATA_DIR CONFIG_DIR DIR_SEP
|
||||
#define FULL_CACHE_DIR FULL_USERDATA_DIR CACHE_DIR DIR_SEP
|
||||
#define FULL_STATESAVES_DIR FULL_USERDATA_DIR STATESAVES_DIR DIR_SEP
|
||||
|
@ -351,6 +351,18 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file )
|
||||
ResumeThread( hThread );
|
||||
}
|
||||
|
||||
void StackTrace( HANDLE hThread, wchar_t const*lpszMessage, FILE *file, DWORD eip, DWORD esp, DWORD ebp )
|
||||
{
|
||||
// TODO: remove when Common builds as unicode
|
||||
size_t origsize = wcslen(lpszMessage) + 1;
|
||||
const size_t newsize = 100;
|
||||
size_t convertedChars = 0;
|
||||
char nstring[newsize];
|
||||
wcstombs_s(&convertedChars, nstring, origsize, lpszMessage, _TRUNCATE);
|
||||
|
||||
StackTrace(hThread, nstring, file, eip, esp, ebp );
|
||||
}
|
||||
|
||||
void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file, DWORD eip, DWORD esp, DWORD ebp )
|
||||
{
|
||||
STACKFRAME callStack;
|
||||
|
@ -34,6 +34,7 @@ BOOL InitSymInfo( PCSTR );
|
||||
BOOL UninitSymInfo();
|
||||
void StackTrace( HANDLE, LPCTSTR, FILE *file);
|
||||
void StackTrace( HANDLE, LPCTSTR, FILE *file, DWORD eip, DWORD esp, DWORD ebp);
|
||||
void StackTrace( HANDLE hThread, wchar_t const* lpszMessage, FILE *file, DWORD eip, DWORD esp, DWORD ebp);
|
||||
|
||||
// functions by Masken
|
||||
void etfprintf(FILE *file, const char *format, ...);
|
||||
|
@ -488,7 +488,7 @@ bool DeleteDirRecursively(const char *directory)
|
||||
}
|
||||
|
||||
// Returns the current directory, caller should free
|
||||
const char *GetCurrentDirectory()
|
||||
const char *GetCurrentDir()
|
||||
{
|
||||
const char *dir;
|
||||
// Get the current working directory (getcwd uses malloc)
|
||||
@ -502,7 +502,7 @@ const char *GetCurrentDirectory()
|
||||
}
|
||||
|
||||
// Sets the current directory to the given directory
|
||||
bool SetCurrentDirectory(const char *_rDirectory)
|
||||
bool SetCurrentDir(const char *_rDirectory)
|
||||
{
|
||||
return __chdir(_rDirectory) == 0;
|
||||
}
|
||||
|
@ -76,10 +76,10 @@ u32 ScanDirectoryTree(const char *directory, FSTEntry& parentEntry);
|
||||
bool DeleteDirRecursively(const char *directory);
|
||||
|
||||
// Returns the current directory, caller should free
|
||||
const char *GetCurrentDirectory();
|
||||
const char *GetCurrentDir();
|
||||
|
||||
// Set the current directory to given directory
|
||||
bool SetCurrentDirectory(const char *directory);
|
||||
bool SetCurrentDir(const char *directory);
|
||||
|
||||
|
||||
// Returns a pointer to a string with a Dolphin data dir in the user's home
|
||||
|
Reference in New Issue
Block a user