mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-16 19:25:45 -04:00
GameList: Reduce number of system calls when scanning
This commit is contained in:
@ -322,15 +322,6 @@ ConsoleRegion GetConsoleRegionForDiscRegion(DiscRegion region)
|
||||
}
|
||||
}
|
||||
|
||||
std::string_view GetTitleForPath(const char* path)
|
||||
{
|
||||
std::string_view path_view = path;
|
||||
std::size_t title_start = path_view.find_last_of("/\\");
|
||||
if (title_start != std::string_view::npos)
|
||||
path_view.remove_prefix(title_start + 1);
|
||||
return path_view.substr(0, path_view.find_last_of('.'));
|
||||
}
|
||||
|
||||
std::string GetGameCodeForPath(const char* image_path, bool fallback_to_hash)
|
||||
{
|
||||
std::unique_ptr<CDImage> cdi = CDImage::Open(image_path, nullptr);
|
||||
|
@ -81,7 +81,6 @@ DiscRegion GetRegionForImage(CDImage* cdi);
|
||||
DiscRegion GetRegionForExe(const char* path);
|
||||
DiscRegion GetRegionForPsf(const char* path);
|
||||
std::optional<DiscRegion> GetRegionForPath(const char* image_path);
|
||||
std::string_view GetTitleForPath(const char* path);
|
||||
|
||||
State GetState();
|
||||
void SetState(State new_state);
|
||||
|
Reference in New Issue
Block a user