| 842 | |
| 843 | #ifdef UNICODE |
| 844 | static void getExecutableInfo( StringTableEntry* path, StringTableEntry* exe ) |
| 845 | { |
| 846 | static StringTableEntry pathEntry = NULL; |
| 847 | static StringTableEntry exeEntry = NULL; |
| 848 | |
| 849 | if( !pathEntry ) |
| 850 | { |
| 851 | if (!Platform::getWebDeployment()) |
| 852 | { |
| 853 | WCHAR cen_buf[ 2048 ]; |
| 854 | GetModuleFileNameW( NULL, cen_buf, sizeof( cen_buf ) / sizeof( cen_buf[ 0 ] ) ); |
| 855 | forwardslash( cen_buf ); |
| 856 | |
| 857 | WCHAR* delimiter = dStrrchr( cen_buf, '/' ); |
| 858 | if( delimiter ) |
| 859 | *delimiter = '\0'; |
| 860 | |
| 861 | char* pathBuf = createUTF8string( cen_buf ); |
| 862 | char* exeBuf = createUTF8string( delimiter + 1 ); |
| 863 | |
| 864 | pathEntry = StringTable->insert( pathBuf ); |
| 865 | exeEntry = StringTable->insert( exeBuf ); |
| 866 | |
| 867 | SAFE_DELETE_ARRAY( pathBuf ); |
| 868 | SAFE_DELETE_ARRAY( exeBuf ); |
| 869 | } |
| 870 | else |
| 871 | { |
| 872 | char cdir[4096]; |
| 873 | GetCurrentDirectoryA(4096, cdir); |
| 874 | pathEntry = StringTable->insert(cdir); |
| 875 | exeEntry = StringTable->insert("WebGameCtrl.exe"); |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | if( path ) |
| 880 | *path = pathEntry; |
| 881 | if( exe ) |
| 882 | *exe = exeEntry; |
| 883 | } |
| 884 | #endif |
| 885 | |
| 886 | StringTableEntry Platform::getExecutableName() |
no test coverage detected