High DPI Scaling

Discussions related specifically to the Windows, Linux (86), Mac OS-X and Raspberry Pi editions of BB4W and BBCSDL
Hated Moron

High DPI Scaling

Post by Hated Moron »

Both BBC BASIC for Windows and BBC BASIC for SDL 2.0 assume that High DPI Scaling is active, whereby the OS presents a 'virtual' 96-DPI (or thereabouts) display to the application, irrespective of the native resolution of the screen.

This is particularly valuable in the case of an application, like BBC BASIC, which creates relatively small windows for reasons of compatibility with legacy applications. For example a MODE 0 window is 640 pixels wide, because it was on the BBC Micro and always has been!

High DPI Scaling is the default behaviour in Windows and MacOS, but not in Linux where it has to be explicitly enabled (which is apparently quite fiddly). Therefore some Linux users, particularly, may prefer to run at the native display resolution.

Consequently I've added to the documentation details of how to configure SDLIDE (one of the IDEs supplied with BBCSDL) for a high DPI screen. Using that feature it should be possible to enlarge it to suit at least UHD-resolution (3840 x 2160).

Of course the standard BBC Micro screen modes aren't affected by this change, but in BBCSDL you can use the @zoom% system variable to scale them in your program. This is a major benefit over BB4W, which has no similar capability.