This fixes the 1.9" display, which was off by 1 pixel for the offset and the 1.69" display, which had a bad offset when rotation was set to 2 or 3. Most of the displays are actually centered within a 320x240 internal buffer, with the 240x240 and 240x135 really only being the odd ones out, so I simplified the code.
This was tested on 1.69", 1.47", and 1.9" displays at various rotations.
This fixes the 1.9" display, which was off by 1 pixel for the offset and the 1.69" display, which had a bad offset when rotation was set to 2 or 3. Most of the displays are actually centered within a 320x240 internal buffer, with the 240x240 and 240x135 really only being the odd ones out, so I simplified the code.
This was tested on 1.69", 1.47", and 1.9" displays at various rotations.