Aspect ratio (feature wish #654098)
|Reported by:||SF/cigaes||Owned by:|
This patch is a proof of concept for the aspect ratio
feature wish. It adds a ratio800 graphics mode that
make the 320×200 games run in 800×600 using a raw pixel
duplication algorithm. So it does a ×2.5 scaling
horizontally and a ×3 scaling vertically.
In order to make it work, I had to split _scaleFactor
into four parts: horizontal and vertical part, and
numerator and denominator. I had also to add the x and
y arguments to the scaling function, so it can know the
fraction part of the target pixel.
This patch only affects SDL backend. Since there is an
API change for the scalers, some others backends may be
affected, but the change is quite trivial. The only one
seems to be gp32, but since I do not have the required
environment, I do not want to touch it.
I will try to make a better scaling method, with offset
optimizations and antialiasing.
Ticket imported from: #670437. Ticket imported from: patches/264.