Merge pull request #4 from KyloRen97/master

Audio & GPU fixes
This commit is contained in:
ryzendew 2024-03-16 12:34:02 -03:00 committed by GitHub
commit 1571b55e45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -67,7 +67,7 @@ std::array<s16, 2> SourceFilters::SimpleFilter::ProcessSample(const std::array<s
std::array<s16, 2> y0; std::array<s16, 2> y0;
for (std::size_t i = 0; i < 2; i++) { for (std::size_t i = 0; i < 2; i++) {
const s32 tmp = (b0 * x0[i] + a1 * y1[i]) >> 15; const s32 tmp = (b0 * x0[i] + a1 * y1[i]) >> 15;
y0[i] = std::clamp(tmp, -32768, 32767); y0[i] = std::clamp(tmp, -32768, 32768);
} }
y1 = y0; y1 = y0;

View File

@ -362,7 +362,8 @@ void GSP_GPU::SignalInterruptForThread(InterruptId interrupt_id, u32 thread_id)
auto* info = GetFrameBufferInfo(thread_id, screen_id); auto* info = GetFrameBufferInfo(thread_id, screen_id);
if (info->is_dirty) { if (info->is_dirty) {
system.GPU().SetBufferSwap(screen_id, info->framebuffer_info[info->index]); system.GPU().SetBufferSwap(screen_id, info->framebuffer_info[info->index]);
info->is_dirty.Assign(false); // Decompiling the GSP module shows that the dirty bit is assigned 1 for top screen, 0 for bottom
info->is_dirty.Assign(screen_id == 0);
} }
} }