mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 00:35:46 -04:00
Implement RetroAchivements
This commit is contained in:
@ -1979,9 +1979,14 @@ u32 GetMediaPlaylistIndex()
|
||||
return std::numeric_limits<u32>::max();
|
||||
|
||||
const std::string& media_path = g_cdrom.GetMediaFileName();
|
||||
return GetMediaPlaylistIndexForPath(media_path);
|
||||
}
|
||||
|
||||
u32 GetMediaPlaylistIndexForPath(const std::string& path)
|
||||
{
|
||||
for (u32 i = 0; i < static_cast<u32>(s_media_playlist.size()); i++)
|
||||
{
|
||||
if (s_media_playlist[i] == media_path)
|
||||
if (s_media_playlist[i] == path)
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,9 @@ u32 GetMediaPlaylistCount();
|
||||
/// Returns the current image from the media/disc playlist.
|
||||
u32 GetMediaPlaylistIndex();
|
||||
|
||||
/// Returns the index of the specified path in the playlist, or UINT32_MAX if it does not exist.
|
||||
u32 GetMediaPlaylistIndexForPath(const std::string& path);
|
||||
|
||||
/// Returns the path to the specified playlist index.
|
||||
const std::string& GetMediaPlaylistPath(u32 index);
|
||||
|
||||
|
Reference in New Issue
Block a user