Showing the changes to src/core/util_string.cpp (1 of 7 files). Show all
Unified · Split
| @@ -34,16 +34,22 @@ · 33 unmodified lines | |||
| 34 | #include "chuck_errmsg.h" | 34 | #include "chuck_errmsg.h" |
| 35 | 35 | ||
| 36 | #ifdef __PLATFORM_WIN32__ | 36 | #ifdef __PLATFORM_WIN32__ |
| 37 | #include <Windows.h> | 37 | #ifndef __CHUNREAL_ENGINE__ |
| 38 | #endif // __PLATFORM_WIN32__ | 38 | #include <windows.h> |
| 39 | #else | ||
| 40 | // 1.5.0.0 (ge) | #chunreal | ||
| 41 | // unreal engine on windows disallows including windows.h | ||
| 42 | #include "Windows/MinWindows.h" | ||
| 43 | #endif // #ifndef __CHUNREAL_ENGINE__ | ||
| 44 | #endif // #ifdef __PLATFORM_WIN32__ | ||
| 39 | 45 | ||
| 40 | #include <limits.h> | 46 | #include <limits.h> |
| 41 | |||
| 42 | #include <stdio.h> | 47 | #include <stdio.h> |
| 43 | using namespace std; | 48 | using namespace std; |
| 44 | 49 | ||
| 45 | 50 | ||
| 46 | 51 | ||
| 52 | |||
| 47 | //----------------------------------------------------------------------------- | 53 | //----------------------------------------------------------------------------- |
| 48 | // name: itoa() | 54 | // name: itoa() |
| 49 | // desc: ... | 55 | // desc: ... |
| @@ -478,14 +484,26 @@ std::string get_full_path( const std::string & fp ) · 428 unmodified lines | |||
| 478 | else | 484 | else |
| 479 | return buf; | 485 | return buf; |
| 480 | 486 | ||
| 481 | #else // | 487 | #else // windows |
| 482 | 488 | ||
| 483 | char buf[MAX_PATH]; | 489 | char buf[MAX_PATH]; |
| 490 | #ifndef __CHUNREAL_ENGINE__ | ||
| 484 | DWORD result = GetFullPathName(fp.c_str(), MAX_PATH, buf, NULL); | 491 | DWORD result = GetFullPathName(fp.c_str(), MAX_PATH, buf, NULL); |
| 492 | #else | ||
| 493 | // #chunreal explicitly use ASCII version | ||
| 494 | DWORD result = GetFullPathNameA(fp.c_str(), MAX_PATH, buf, NULL); | ||
| 495 | #endif | ||
| 485 | 496 | ||
| 486 | // try with .ck extension | 497 | // try with .ck extension |
| 487 | if(result == 0 && !str_endsin(fp.c_str(), ".ck")) | 498 | if(result == 0 && !str_endsin(fp.c_str(), ".ck")) |
| 499 | { | ||
| 500 | #ifndef __CHUNREAL_ENGINE__ | ||
| 488 | result = GetFullPathName((fp + ".ck").c_str(), MAX_PATH, buf, NULL); | 501 | result = GetFullPathName((fp + ".ck").c_str(), MAX_PATH, buf, NULL); |
| 502 | #else | ||
| 503 | // #chunreal explicitly use ASCII version | ||
| 504 | result = GetFullPathNameA((fp + ".ck").c_str(), MAX_PATH, buf, NULL); | ||
| 505 | #endif | ||
| 506 | } | ||
| 489 | 507 | ||
| 490 | if(result == 0) | 508 | if(result == 0) |
| 491 | return fp; | 509 | return fp; |