mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
cellMusicSelectionContext: log playlist
This commit is contained in:
parent
143bd6cc80
commit
a5317d50a5
@ -109,14 +109,13 @@ error_code cell_music_select_contents()
|
|||||||
if (!music.func)
|
if (!music.func)
|
||||||
return CELL_MUSIC_ERROR_GENERIC;
|
return CELL_MUSIC_ERROR_GENERIC;
|
||||||
|
|
||||||
const std::string dir_path = "/dev_hdd0/music";
|
|
||||||
const std::string vfs_dir_path = vfs::get("/dev_hdd0/music");
|
const std::string vfs_dir_path = vfs::get("/dev_hdd0/music");
|
||||||
const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE);
|
const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE);
|
||||||
|
|
||||||
error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, vfs_dir_path, title,
|
error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, vfs_dir_path, title,
|
||||||
[&music, dir_path, vfs_dir_path](s32 status, utils::media_info info)
|
[&music](s32 status, utils::media_info info)
|
||||||
{
|
{
|
||||||
sysutil_register_cb([&music, dir_path, vfs_dir_path, info, status](ppu_thread& ppu) -> s32
|
sysutil_register_cb([&music, info, status](ppu_thread& ppu) -> s32
|
||||||
{
|
{
|
||||||
std::lock_guard lock(music.mtx);
|
std::lock_guard lock(music.mtx);
|
||||||
const u32 result = status >= 0 ? u32{CELL_OK} : u32{CELL_MUSIC_CANCELED};
|
const u32 result = status >= 0 ? u32{CELL_OK} : u32{CELL_MUSIC_CANCELED};
|
||||||
|
@ -134,14 +134,13 @@ error_code cell_music_decode_select_contents()
|
|||||||
if (!dec.func)
|
if (!dec.func)
|
||||||
return CELL_MUSIC_DECODE_ERROR_GENERIC;
|
return CELL_MUSIC_DECODE_ERROR_GENERIC;
|
||||||
|
|
||||||
const std::string dir_path = "/dev_hdd0/music";
|
|
||||||
const std::string vfs_dir_path = vfs::get("/dev_hdd0/music");
|
const std::string vfs_dir_path = vfs::get("/dev_hdd0/music");
|
||||||
const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE);
|
const std::string title = get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_TITLE);
|
||||||
|
|
||||||
error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, vfs_dir_path, title,
|
error_code error = rsx::overlays::show_media_list_dialog(rsx::overlays::media_list_dialog::media_type::audio, vfs_dir_path, title,
|
||||||
[&dec, dir_path, vfs_dir_path](s32 status, utils::media_info info)
|
[&dec](s32 status, utils::media_info info)
|
||||||
{
|
{
|
||||||
sysutil_register_cb([&dec, dir_path, vfs_dir_path, info, status](ppu_thread& ppu) -> s32
|
sysutil_register_cb([&dec, info, status](ppu_thread& ppu) -> s32
|
||||||
{
|
{
|
||||||
std::lock_guard lock(dec.mutex);
|
std::lock_guard lock(dec.mutex);
|
||||||
const u32 result = status >= 0 ? u32{CELL_OK} : u32{CELL_MUSIC_DECODE_CANCELED};
|
const u32 result = status >= 0 ? u32{CELL_OK} : u32{CELL_MUSIC_DECODE_CANCELED};
|
||||||
|
@ -42,8 +42,15 @@ CellMusicSelectionContext music_selection_context::get() const
|
|||||||
|
|
||||||
std::string music_selection_context::to_string() const
|
std::string music_selection_context::to_string() const
|
||||||
{
|
{
|
||||||
return fmt::format("{ .magic='%s', .content_type=%d, .repeat_mode=%d, .context_option=%d, .first_track=%d, .tracks=%d, .hash='%s' }",
|
std::string str = fmt::format(".magic='%s', .content_type=%d, .repeat_mode=%d, .context_option=%d, .first_track=%d, .tracks=%d, .hash='%s', .playlist:",
|
||||||
magic, static_cast<u32>(content_type), static_cast<u32>(repeat_mode), static_cast<u32>(context_option), first_track, playlist.size(), hash);
|
magic, static_cast<u32>(content_type), static_cast<u32>(repeat_mode), static_cast<u32>(context_option), first_track, playlist.size(), hash);
|
||||||
|
|
||||||
|
for (usz i = 0; i < playlist.size(); i++)
|
||||||
|
{
|
||||||
|
fmt::append(str, "\ - Track %d: %s", i, playlist.at(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string music_selection_context::get_next_hash()
|
std::string music_selection_context::get_next_hash()
|
||||||
|
Loading…
Reference in New Issue
Block a user