VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

Is there a way to remove the call to SDL(2)_gfx's zoomSurface(..., SMOOTHING_ON) without losing quality? I don't suppose I can simply copy the code from SDL_gfx and just paste it in my project(copyrighted etc.)? It's the only function my emulator actually uses (to resize emulated output to the screen, depending on the settings). What does Dosbox do to handle resizing?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 1, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've copied the _zoomSurfaceRGBA function from SDL_gfx's source code and optimized it by only regenerating the horizontal and vertical lookup tables when required (during a display resolution change). This increases the speed of rendering unchanged source resolution a lot. I also added a copy of the comments saying to leave it(that comment) in place for all copies of the file. Is it OK to distribute it within my application this way, with my adjustments for the drastic speed increase?

This also removes the requirement of having to compile and add the SDL_gfx.dll to the package. Is that allowed?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io