libretro / gambatte-libretro

Hard fork of Gambatte to the libretro API.
http://sourceforge.net/projects/gambatte/
GNU General Public License v2.0
103 stars 78 forks source link

Ensure frame blending configuration is correctly reset in retro_deinit() #181

Closed jdgleaver closed 3 years ago

jdgleaver commented 3 years ago

At present, the second time that content is loaded with the core on dynamic platforms, undefined behaviour can occur due to the fact that the interframe blending arrays are not correctly initialised. This is a previously hidden bug (which should never occur on dynamic platforms...), and it seems to be platform-dependent: the core has always functioned correctly in the past, and it still functions correctly on half my devices. It is likely that an OS (glibc) update has revealed the underlying issue...

This PR simply ensures that the interframe blending configuration is properly reset inside retro_deinit(). This 'forces' correct initialisation each time the core is loaded.