Re: [hatari-devel] Hatari screen options (was: Hatari manual.html)

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

Your patch breaks max width limit.

With it "--max-width 660 --max-height 440" gives "672 x 440"
resolution and "--max-width 330 --max-height 240" gives "336 x 240"
resolution.


	- Eero

PS. it's easiest to test your fixed patch in windowed mode.

On keskiviikko 05 maaliskuu 2014, David Savinkoff wrote:
> Here is a patch that automatically makes the right border wider than
> the left border, depending on MaxWidth, to better utilize the available
> screen space. This patch adds functionality without loss of previous
> functionality.
> 
> Hatari previously would use borders as:
> 
> nBorderPixelsLeft = 0 or 16 or 32 or 48
> nBorderPixelsRight = nBorderPixelsLeft
> (four possibilities)
> 
> now:
> 
> nBorderPixelsLeft = 0 or 16 or 32 or 48
> nBorderPixelsRight = nBorderPixelsLeft + 0 or 16
> (more useful possibilities)
> 
> The algorithm for determining nBorderPixelsRight is:
> 
> nBorderPixelsRight = nBorderPixelsLeft + ( (leftX % 32 < 8) ? 0 : 16);
> 
> leftX is used because it is available and has enough information
> to make a determination of what to do ( leftX = (MaxW - Width)/zoom,
> where Width/zoom is dividable by 32, thus,
> leftX modulus 32 equals MaxW modulus 32). Note that zoom is 1 or 2.
> 
> Examining:
> ( (leftX % 32 < 8) ? 0 : 16)
> 
> Any (screen Width)/zoom that are evenly dividable by 32 may be
> centered and have equal borders:
> nBorderPixelsRight = nBorderPixelsLeft
> (same as before patch)
> 
> (screen Width)/zoom that have a remainder of 1 through 7 have
> equal borders, and may be offset from center
> (same as before patch)
> 
> (screen Width)/zoom that have a remainder of 8 through 31 have
> a wider right border, and are slightly offset from center
> (new)
> 
> The remainder 8 is to accommodate 360x200 with a wider right border.
> Other modes with a wider right border have a remainder of 16.
> 
> Sincerely,
> David Savinkoff




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/