libretro / QuickNES_Core

The QuickNES core library, originally by Shay Green, heavily modified
GNU General Public License v2.0
22 stars 35 forks source link

(av_info) Set correct maximum framebuffer dimensions #54

Closed jdgleaver closed 5 years ago

jdgleaver commented 5 years ago

At present, the core causes RetroArch to segfault if the 'show overscan' options are toggled from off to on while using a CPU filter. This is because the maximum framebuffer dimensions are always set to the current screen size, and when the current screen size increases (i.e. show overscan) we only get a call to RETRO_ENVIRONMENT_SET_GEOMETRY, not RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO. The CPU filter video buffer therefore ends up being too small, and we get an access violation. (To be fair, this looks like a simple typo... and ironically, I just noticed I made a typo in the commit message...)

This pull request sets the max width/height correctly, and fixes the issue.