First post, by hakonrk
- Rank
- Newbie
Has anyone done any work on creating scaler functions where the width and height may be scaled by different (integer) factors?
Say you have an 16:9 LCD monitor with a resolution of 1920x1200, and you want to play a game that uses the standard 320x200 resolution. Since the game's pixels are not square, the perfect way to display this would be to multiply the width by 5 and the height by 6, allowing for a letterboxed 1600x1200 in the 1920x1200 display.
As for me, I have a 1680x1050 display, so I can't get the perfect 6/5 integer scaling, but having a centered 1280x1000 (5/4 scaling) picture in the 1680x1050 display is pretty close to the intended aspect ratio and, best of all, all pixels are the same size. This would (obviously) also be the optimal way to display a 320x200 picture in on a typical 1280x1000 monitor.
On the surface, this seemed like something that would be trivial to implement, so I dug into the code and looked for the scaling functions in the rendering code. Unfortunately, I found the code impossibly difficult to understand, so I'll probably not put any more time into this unless there's someone who has already started working on a similar idea, or someone that understands how the scaling stuff works that could help me get started.