History

yet another batch of changes for #chunreal

Ge Wang committed 3 years ago

Commit 28685581 parent 9aac3a47 files · +137 −96Browse files

Showing the changes to src/core/util_string.cpp (1 of 7 files). Show all

Unified · Split

src/core/util_string.cpp+22−4
@@ -34,16 +34,22 @@ · 33 unmodified lines
3434 #include "chuck_errmsg.h"
3535
3636 #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__
3945
4046 #include <limits.h>
41−
4247 #include <stdio.h>
4348 using namespace std;
4449
4550
4651
52+
4753 //-----------------------------------------------------------------------------
4854 // name: itoa()
4955 // desc: ...
@@ -478,14 +484,26 @@ std::string get_full_path( const std::string & fp ) · 428 unmodified lines
478484 else
479485 return buf;
480486
481−#else //
487+#else // windows
482488
483489 char buf[MAX_PATH];
490+#ifndef __CHUNREAL_ENGINE__
484491 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
485496
486497 // try with .ck extension
487498 if(result == 0 && !str_endsin(fp.c_str(), ".ck"))
499+ {
500+#ifndef __CHUNREAL_ENGINE__
488501 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+ }
489507
490508 if(result == 0)
491509 return fp;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t