libretro / desmume

DeSmuME is a Nintendo DS emulator
http://desmume.org
GNU General Public License v2.0
35 stars 33 forks source link

Pressing R3 crashes the core now (with layout set at quick switch) #26

Closed inactive123 closed 6 years ago

inactive123 commented 6 years ago

As described in the subject, if I have the layout set to 'quick switch', and I then try to switch between the two layouts by pressing R3, it will cause a crash.

Testd on Windows 10 x64, using the GL renderer.

bearoso commented 6 years ago

I see what's going on. OpenGL is deferring the memory access, so the pointer goes invalid by the time it wants to copy the data. This happens in the frontend. I'm going to try some refactoring to get around this.

bearoso commented 6 years ago

This should be fixed in 77cf9a4. There was another bit of old code where it was trying to draw the non-selected screen to the buffer, but no longer got away with it because it wasn't a gigantic static buffer like before.