mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
GPU: Adjust 4-pixel boundary alignment formula
Fixes missing edge in Tenchi wo Kurau II: Sekiheki no Tatakai.
This commit is contained in:
parent
000a51298a
commit
e42d5fed75
|
@ -612,7 +612,8 @@ void GPU::UpdateCRTCDisplayParameters()
|
|||
}
|
||||
|
||||
// align to 4-pixel boundary
|
||||
cs.display_vram_width = ((horizontal_active_ticks / cs.dot_clock_divider) + 2u) & ~3u;
|
||||
cs.display_vram_width =
|
||||
(static_cast<u16>(std::round(horizontal_active_ticks / static_cast<float>(cs.dot_clock_divider))) + 2u) & ~3u;
|
||||
|
||||
// apply the crop from the start (usually overscan)
|
||||
cs.display_vram_width -= std::min(cs.display_vram_width, horizontal_skip_pixels);
|
||||
|
|
Loading…
Reference in a new issue