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 | 34 | #include "chuck_errmsg.h" |
| 35 | 35 | |
| 36 | 36 | #ifdef __PLATFORM_WIN32__ |
| 37 | −#include <Windows.h> | |
| 38 | −#endif // __PLATFORM_WIN32__ | |
| 37 | +#ifndef __CHUNREAL_ENGINE__ | |
| 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 | 46 | #include <limits.h> |
| 41 | − | |
| 42 | 47 | #include <stdio.h> |
| 43 | 48 | using namespace std; |
| 44 | 49 | |
| 45 | 50 | |
| 46 | 51 | |
| 52 | + | |
| 47 | 53 | //----------------------------------------------------------------------------- |
| 48 | 54 | // name: itoa() |
| 49 | 55 | // desc: ... |
| @@ -478,14 +484,26 @@ std::string get_full_path( const std::string & fp ) · 428 unmodified lines | ||
| 478 | 484 | else |
| 479 | 485 | return buf; |
| 480 | 486 | |
| 481 | −#else // | |
| 487 | +#else // windows | |
| 482 | 488 | |
| 483 | 489 | char buf[MAX_PATH]; |
| 490 | +#ifndef __CHUNREAL_ENGINE__ | |
| 484 | 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 | 497 | // try with .ck extension |
| 487 | 498 | if(result == 0 && !str_endsin(fp.c_str(), ".ck")) |
| 499 | + { | |
| 500 | +#ifndef __CHUNREAL_ENGINE__ | |
| 488 | 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 | 508 | if(result == 0) |
| 491 | 509 | return fp; |