|Re: [hatari-devel] SDL2 and Videl mode handing issue
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 11/13/2016 10:06 AM, Thomas Huth wrote:
Am Mon, 7 Nov 2016 01:34:09 +0200
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
When you added SDL2 support, you ifdeffed out
the Videl resolution scaling code for SDL2.
Yes, scaling is done by SDL2 in a much better way, so that part should
not be used anymore.
As result, I get "Failed to create 5120x516@32
texture" error and Hatari exit when Mahabharata
Could you look at it at some point?
It does not abort for me here,
Texture size limits differ between GPUs and their driver versions.
but I can see that the demo temporarily
switches to such a huge resolution, which does not make sense.
The problem is here that we calculate the Videl resolution via the
FF8210 register and the current BPP value. I think this is wrong and
should be fixed one day, likely via HDB and HDE instead, but I don't
have a clue how these Videl registers work, and currently lack the time
to get into this...
So I now added a work-around that does some sanity check on the width
and limits the resolution if it is bigger than 1200 pixels (IIRC the
Videl width could hardly be bigger than 1024 pixels, so 1200 should be
a fair limit here).
There's a demo that uses 1600x600@16 mode:
So, I increased the max width to 2048:
I also updated the compatibility list.
Same check would be good also for height, with some
debug output about need for scaling (i.e. potential
issue in Hatari emulation).