MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GetELFNameForHash

Method GetELFNameForHash

pcsx2/Achievements.cpp:291–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291std::string_view Achievements::GetELFNameForHash(const std::string& elf_path)
292{
293 std::string::size_type start = elf_path.rfind('\\');
294 if (start == std::string::npos)
295 start = 0;
296 else
297 start++; // skip backslash
298
299 std::string::size_type end = elf_path.rfind(';');
300 if (end == std::string::npos)
301 end = elf_path.size();
302
303 if (end < start)
304 end = start;
305
306 return std::string_view(elf_path).substr(start, end - start);
307}
308
309std::string Achievements::GetGameHash(const std::string& elf_path)
310{

Callers

nothing calls this directly

Calls 3

rfindMethod · 0.80
substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected