mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-03 22:37:10 +02:00
[vic] crash fix in Big Brain Academy due to non-destructive resizing of scratch buffers
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
770be31030
commit
fb42cf56ae
1 changed files with 2 additions and 2 deletions
|
|
@ -117,7 +117,7 @@ void Vic::Execute() noexcept {
|
||||||
|
|
||||||
auto output_width = config.output_surface_config.out_surface_width + 1;
|
auto output_width = config.output_surface_config.out_surface_width + 1;
|
||||||
auto output_height = config.output_surface_config.out_surface_height + 1;
|
auto output_height = config.output_surface_config.out_surface_height + 1;
|
||||||
output_surface.resize(output_width * output_height);
|
output_surface.resize_destructive(output_width * output_height);
|
||||||
|
|
||||||
if (Settings::values.nvdec_emulation.GetValue() != Settings::NvdecEmulation::Off) {
|
if (Settings::values.nvdec_emulation.GetValue() != Settings::NvdecEmulation::Off) {
|
||||||
for (size_t i = 0; i < config.slot_structs.size(); i++) {
|
for (size_t i = 0; i < config.slot_structs.size(); i++) {
|
||||||
|
|
@ -365,7 +365,7 @@ void Vic::ReadInterlacedY8__V8U8_N420(const SlotStruct& slot, std::span<const Pl
|
||||||
auto const out_luma_height{(slot.surface_config.slot_surface_height + 1) * 2};
|
auto const out_luma_height{(slot.surface_config.slot_surface_height + 1) * 2};
|
||||||
auto const out_luma_stride{out_luma_width};
|
auto const out_luma_stride{out_luma_width};
|
||||||
|
|
||||||
slot_surface.resize(out_luma_width * out_luma_height);
|
slot_surface.resize_destructive(out_luma_width * out_luma_height);
|
||||||
|
|
||||||
auto const in_luma_width = (std::min)(frame->GetWidth(), s32(out_luma_width));
|
auto const in_luma_width = (std::min)(frame->GetWidth(), s32(out_luma_width));
|
||||||
[[maybe_unused]] auto const in_luma_height = (std::min)(frame->GetHeight(), s32(out_luma_height));
|
[[maybe_unused]] auto const in_luma_height = (std::min)(frame->GetHeight(), s32(out_luma_height));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue