1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix viewport clipping issues with the OpenGL renderer (#6188)

This commit is contained in:
Dennis-Z
2017-08-16 23:11:43 +02:00
committed by Ted John
parent c3a5ffbe04
commit abf440d01c
2 changed files with 3 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
- Fix: [#6101] Rides remain in ride list window briefly after demolition.
- Fix: [#6115] Random title screen music not random on launch
- Fix: [#6133] Construction rights not shown after selecting buy mode.
- Fix: [#6188] Viewports not being clipped properly when zoomed out in OpenGL mode.
- Fix: Infinite loop when removing scenery elements with >127 base height.
- Improved: [#6186] Transparent menu items now draw properly in OpenGL mode.

View File

@@ -927,8 +927,8 @@ void OpenGLDrawingContext::SetDPI(rct_drawpixelinfo * dpi)
_clipLeft = (sint32)(bitsOffset % (screenDPI->width + screenDPI->pitch));
_clipTop = (sint32)(bitsOffset / (screenDPI->width + screenDPI->pitch));
_clipRight = _clipLeft + dpi->width;
_clipBottom = _clipTop + dpi->height;
_clipRight = _clipLeft + (dpi->width >> dpi->zoom_level);
_clipBottom = _clipTop + (dpi->height >> dpi->zoom_level);
_offsetX = _clipLeft - dpi->x;
_offsetY = _clipTop - dpi->y;