MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / FindSplashPngPath

Function FindSplashPngPath

Rtxpt/SampleCommon/SplashScreen.cpp:116–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116static std::wstring FindSplashPngPath(const std::wstring& pngName)
117{
118 const std::wstring exeDir = GetExeDirectory();
119 if (exeDir.empty())
120 {
121 return L"";
122 }
123
124 std::wstring p1 = exeDir + L"\\" + pngName;
125 if (FileExists(p1))
126 {
127 return p1;
128 }
129
130 std::wstring p2 = exeDir + L"\\Assets\\" + pngName;
131 if (FileExists(p2))
132 {
133 return p2;
134 }
135
136 std::wstring p3 = exeDir + L"\\..\\Assets\\" + pngName;
137 if (FileExists(p3))
138 {
139 return p3;
140 }
141
142 return L""; // not found
143}
144
145
146bool SplashScreen::Start(const std::wstring& pngName)

Callers 1

StartMethod · 0.85

Calls 3

GetExeDirectoryFunction · 0.85
FileExistsFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected