#ifdef __cplusplus
extern "C" {
#endif
#include "SDL_internal.h"
#ifdef __cplusplus
}
#endif
#include <e32base.h>
#include <e32std.h>
#include <f32file.h>
#include <utf.h>
#ifdef __cplusplus
extern "C" {
#endif
void NGAGE_GetAppPath(char *path)
{
TBuf<512> aPath;
TFileName fullExePath = RProcess().FileName();
TParsePtrC parser(fullExePath);
aPath.Copy(parser.DriveAndPath());
TBuf8<512> utf8Path; CnvUtfConverter::ConvertFromUnicodeToUtf8(utf8Path, aPath);
strncpy(path, (const char *)utf8Path.Ptr(), utf8Path.Length());
path[utf8Path.Length()] = '\0';
for (int i = 0; i < utf8Path.Length(); i++)
{
if (path[i] == '\\')
{
path[i] = '/';
}
}
}
#ifdef __cplusplus
}
#endif