| 426 | } |
| 427 | |
| 428 | error_code cellMusicDecodeSetSelectionContext(vm::ptr<CellMusicSelectionContext> context) |
| 429 | { |
| 430 | cellMusicDecode.todo("cellMusicDecodeSetSelectionContext(context=*0x%x)", context); |
| 431 | |
| 432 | if (!context) |
| 433 | return CELL_MUSIC_DECODE_ERROR_PARAM; |
| 434 | |
| 435 | auto& dec = g_fxo->get<music_decode>(); |
| 436 | std::lock_guard lock(dec.mutex); |
| 437 | |
| 438 | if (!dec.func) |
| 439 | return CELL_MUSIC_DECODE_ERROR_GENERIC; |
| 440 | |
| 441 | const bool result = dec.current_selection_context.set(*context); |
| 442 | if (result) |
| 443 | cellMusicDecode.warning("cellMusicDecodeSetSelectionContext: new selection_context = %s", dec.current_selection_context.to_string()); |
| 444 | else |
| 445 | cellMusicDecode.error("cellMusicDecodeSetSelectionContext: failed. context = '%s'", music_selection_context::context_to_hex(*context)); |
| 446 | |
| 447 | sysutil_register_cb([&dec, result](ppu_thread& ppu) -> s32 |
| 448 | { |
| 449 | const u32 status = result ? u32{CELL_OK} : u32{CELL_MUSIC_DECODE_ERROR_INVALID_CONTEXT}; |
| 450 | dec.func(ppu, CELL_MUSIC_DECODE_EVENT_SET_SELECTION_CONTEXT_RESULT, vm::addr_t(status), dec.userData); |
| 451 | return CELL_OK; |
| 452 | }); |
| 453 | |
| 454 | return CELL_OK; |
| 455 | } |
| 456 | |
| 457 | error_code cellMusicDecodeGetContentsId(vm::ptr<CellSearchContentId> contents_id) |
| 458 | { |
nothing calls this directly
no test coverage detected