Skip to content

Commit

Permalink
Don't immediately change buffer width/height for melonDS video buffer…
Browse files Browse the repository at this point in the history
… reallocation

They'll get changed later anyways
  • Loading branch information
CasualPokePlayer committed Oct 15, 2024
1 parent 670eaf3 commit c703b5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ public NDS(CoreLoadParameters<NDSSettings, NDSSyncSettings> lp)
// update buffer width/height for scaling
if (_activeSyncSettings.GLScaleFactor > 1)
{
BufferWidth = (256 * _activeSyncSettings.GLScaleFactor) * 3 + ((128 * _activeSyncSettings.GLScaleFactor) * 4 / 3) + 1;
BufferHeight = (384 / 2 * _activeSyncSettings.GLScaleFactor) * 2 + (128 * _activeSyncSettings.GLScaleFactor);
_videoBuffer = new int[BufferWidth * BufferHeight];
var maxWidth = (256 * _activeSyncSettings.GLScaleFactor) * 3 + ((128 * _activeSyncSettings.GLScaleFactor) * 4 / 3) + 1;
var maxHeight = (384 / 2 * _activeSyncSettings.GLScaleFactor) * 2 + (128 * _activeSyncSettings.GLScaleFactor);
_videoBuffer = new int[maxWidth * maxHeight];
}
}
}
Expand Down

0 comments on commit c703b5f

Please sign in to comment.