caprice32 icon indicating copy to clipboard operation
caprice32 copied to clipboard

Software nearest neighbour scaling (2x, 3x, 4x)

Open AndyHOvine opened this issue 4 years ago • 5 comments

I have a laptop with a higher DPI screen. The F1 menu comes out quite small and is difficult to use. Is it possible to add a scale option (eg: 2x) to increase the size?

image

The width of the above menu is about an inch wide, and the text is tiny. It would be about the right size if doubled. Here is the Windows calculator application for scale: image

AndyHOvine avatar Aug 05 '20 20:08 AndyHOvine

Which video output are you using (scr_style in cap32.cfg or visible in options in the UI)?

The default is already 2x so I suspect that's what you use. You can try scr_style=11 (OpenGL) and set scr_width and scr_height to the value you want.

Providing a 4x would make sense nowadays ...

ColinPitrat avatar Aug 06 '20 06:08 ColinPitrat

Ah yes, I had tried the doubles options (and the default double hw one) and the above is how the F1 menu appears. I've tried some of the other options now and they increase the size of the F1 menu. My favourite is TV 2x and as you can see the menu is much bigger now (perfect).

image

So all good.

AndyHOvine avatar Aug 06 '20 13:08 AndyHOvine

Ah yes, the interesting peculiarity with the "double" video outputs is that they work at the rendering level (in src/crtc.cpp), doubling every pixel from the CPC so they don't affect the UI. The other video outputs scale the surface after rendering so they scale the UI too.

OpenGL is a bit hybrid as it uses the double rendering but also scale after that.

ColinPitrat avatar Aug 06 '20 13:08 ColinPitrat

Actually, we could provide a "Software nearest neighbour 2x" that would do same as double but impacting the UI too. It should then be easy to also provide 3x, 4x ...

ColinPitrat avatar Aug 06 '20 13:08 ColinPitrat

Good news, SDL2 (#185) will make this much more convenient to support cleanly.

ColinPitrat avatar Mar 26 '21 10:03 ColinPitrat

Done. In video tab, you know have a list of scale factors available on top of the video plugin.

ColinPitrat avatar Oct 09 '22 13:10 ColinPitrat