MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / FixRelativePath

Function FixRelativePath

projects/WinDurango.KernelX/src/kernelx.cpp:702–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700EXTERN_C BOOL __stdcall XMemSetAllocationHysteresis()
701{
702 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
703 return FALSE;
704}
705
706EXTERN_C SIZE_T __stdcall XMemGetAllocationHysteresis()
707{
708 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
709 return MAXSIZE_T;
710}
711
712EXTERN_C BOOL __stdcall XMemPreallocateFreeSpace()
713{
714 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
715 return FALSE;
716}
717
718EXTERN_C BOOL __stdcall XMemGetAllocationStatistics()
719{
720 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
721 return FALSE;
722}
723
724EXTERN_C HANDLE __stdcall XMemGetAuxiliaryTitleMemory()
725{
726 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
727 return nullptr;
728}
729
730EXTERN_C void __stdcall XMemReleaseAuxiliaryTitleMemory(_In_opt_ HANDLE hHandle)
731{
732 UNREFERENCED_PARAMETER(hHandle);
733 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
734}
735
736
737void FixRelativePath(LPCWSTR &lpFileName)
738{
739 static std::wstring convert{};
740 std::wstring_view fileName(lpFileName);
741
742 if (fileName.size() == 0)
743 return;
744
745 if (wcsncmp(lpFileName, L"GAME:", 5) == 0)
746 {
747 static std::wstring trimPath{};
748 trimPath = fileName.substr(5);
749 fileName = trimPath.data();
750 convert = std::filesystem::current_path().c_str();
751 convert.append(fileName);
752 std::replace(convert.begin(), convert.end(), L'\\', L'/');
753 std::replace(convert.begin(), convert.end(), L'//', L'/');
754
755 lpFileName = convert.data();
756 return;
757 }
758 if (fileName[0] == '.' && fileName[1] == '\\')
759 {

Callers 9

EraCreateFileWFunction · 0.85
EraCreateFileAFunction · 0.85
EraCreateFile2Function · 0.85
EraCreateDirectoryAFunction · 0.85
EraGetFileAttributesWFunction · 0.85
EraGetFileAttributesExWFunction · 0.85
EraFindFirstFileWFunction · 0.85
EraDeleteFileWFunction · 0.85
EraLoadLibraryExWFunction · 0.85

Calls 2

dataMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected