rakslice / macemu

Basilisk II and SheepShaver Macintosh emulators
0 stars 0 forks source link

Support for scaling in windowed mode in SDL2 #22

Closed rakslice closed 3 years ago

rakslice commented 4 years ago

My main PC laptop is a 13" laptop with a 4k screen, so the DPI is well into the 200s. I'm running Gnome 3 in Debian 10's default Wayland-based setup for it.

With DPI this high, a 1:1 pixel sized window is almost too small to see for a normally-sighted person and definitely not usable.

Since SDL 1.x doesn't present any kind of obvious built-in way to do pixel scaling, for previous B2/SS versions I just scripted automatically changing the Gnome resolution & DPI settings for the duration of the B2/SS run and then changing back when done (which was quite a time consuming thing to script given how littered Gnome is with dead monitor settings interfaces).

However with SDL2, pixel scaling is essentially automatic whenever the window is a different size than the bitmap graphics output, and so setting it up is just a matter of passing a different window size -- multiplying the window_width and window_height in video_sdl2.cpp is a code change I can make in literally 10 seconds any time I want it -- so I haven't gotten around to seriously suggesting a change anywhere

But also I don't know what end users want for a pixel scaling feature. Some possibilities:

rakslice commented 4 years ago

This is only for platforms where there isn't already a platform solutions for high DPI that works with SDL2 without the application having to do anything.

kanjitalk755 commented 4 years ago

A configurable setting in the graphics prefs you can change to what you want

I adopted this one (3861177).