1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Fix _cutHeight.

This commit is contained in:
Sergey Lipskiy 2016-01-26 23:03:44 +06:00
parent 8202638a7a
commit 52dac34b98

View File

@ -312,8 +312,8 @@ u32 _cutHeight(u32 _address, u32 _height, u32 _stride)
{
if (_address > RDRAMSize)
return 0;
if (_address + _stride * _height > RDRAMSize)
return (RDRAMSize - _address) / _stride;
if (_address + _stride * _height > (RDRAMSize + 1))
return (RDRAMSize + 1 - _address) / _stride;
return _height;
}