| 613 | } |
| 614 | |
| 615 | error_code cellMusicDecodeSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context) |
| 616 | { |
| 617 | cellMusicDecode.todo("cellMusicDecodeSetSelectionContext2(context=*0x%x)", context); |
| 618 | |
| 619 | if (!context) |
| 620 | return CELL_MUSIC_DECODE_ERROR_PARAM; |
| 621 | |
| 622 | auto& dec = g_fxo->get<music_decode2>(); |
| 623 | std::lock_guard lock(dec.mutex); |
| 624 | |
| 625 | if (!dec.func) |
| 626 | return CELL_MUSIC_DECODE_ERROR_GENERIC; |
| 627 | |
| 628 | const bool result = dec.current_selection_context.set(*context); |
| 629 | if (result) |
| 630 | cellMusicDecode.warning("cellMusicDecodeSetSelectionContext2: new selection_context = %s", dec.current_selection_context.to_string()); |
| 631 | else |
| 632 | cellMusicDecode.error("cellMusicDecodeSetSelectionContext2: failed. context = '%s'", music_selection_context::context_to_hex(*context)); |
| 633 | |
| 634 | sysutil_register_cb([&dec, result](ppu_thread& ppu) -> s32 |
| 635 | { |
| 636 | const u32 status = result ? u32{CELL_OK} : u32{CELL_MUSIC_DECODE_ERROR_INVALID_CONTEXT}; |
| 637 | dec.func(ppu, CELL_MUSIC_DECODE_EVENT_SET_SELECTION_CONTEXT_RESULT, vm::addr_t(status), dec.userData); |
| 638 | return CELL_OK; |
| 639 | }); |
| 640 | |
| 641 | return CELL_OK; |
| 642 | } |
| 643 | |
| 644 | error_code cellMusicDecodeGetContentsId2(vm::ptr<CellSearchContentId> contents_id) |
| 645 | { |
nothing calls this directly
no test coverage detected