Compare commits

...

3 Commits

Author SHA1 Message Date
Megamouse 3a1e7d2793
Merge 8560f0705e into 66eae05e75 2024-09-19 01:06:24 +02:00
capriots 66eae05e75 cellAtracXdec: fix FFmpeg warning 2024-09-18 07:57:10 +02:00
Megamouse 8560f0705e cellGameGetParamString: some more "fixes"
needs hw tests.... too lazy
2024-03-28 09:52:55 +01:00
2 changed files with 3 additions and 2 deletions

View File

@ -121,6 +121,7 @@ void AtracXdecDecoder::alloc_avcodec()
// Allows FFmpeg to output directly into guest memory // Allows FFmpeg to output directly into guest memory
ctx->opaque = this; ctx->opaque = this;
ctx->thread_type = FF_THREAD_SLICE; // Silences a warning by FFmpeg about requesting frame threading with a custom get_buffer2(). Default is FF_THREAD_FRAME & FF_THREAD_SLICE
ctx->get_buffer2 = [](AVCodecContext* s, AVFrame* frame, int /*flags*/) -> int ctx->get_buffer2 = [](AVCodecContext* s, AVFrame* frame, int /*flags*/) -> int
{ {
for (s32 i = 0; i < frame->ch_layout.nb_channels; i++) for (s32 i = 0; i < frame->ch_layout.nb_channels; i++)

View File

@ -1447,14 +1447,14 @@ public:
switch (mode) switch (mode)
{ {
case content_permission::check_mode::game_data: case content_permission::check_mode::game_data:
case content_permission::check_mode::patch: // TODO: it's unclear if patch mode should also support these flags
{ {
return !!(flags & (is_setter ? strkey_flag::set_game_data : strkey_flag::get_game_data)); return !!(flags & (is_setter ? strkey_flag::set_game_data : strkey_flag::get_game_data));
} }
case content_permission::check_mode::patch:
case content_permission::check_mode::hdd_game: case content_permission::check_mode::hdd_game:
case content_permission::check_mode::disc_game: case content_permission::check_mode::disc_game:
{ {
return !is_setter && (flags & (strkey_flag::get_other)); return !is_setter && !!(flags & (strkey_flag::get_other)) || !!(flags & (strkey_flag::get_game_data)); // TODO: speculative
} }
case content_permission::check_mode::not_set: case content_permission::check_mode::not_set:
{ {