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
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>
43using namespace std;48using 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 else484 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 extension497 // 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;

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