Swordfish90 / LibretroDroid

GNU General Public License v3.0
75 stars 17 forks source link

GLRetroView RenderLifecycleObserver not being called #69

Closed tytydraco closed 3 years ago

tytydraco commented 3 years ago

Hey!

Looks like these OnResume and OnPause events are never being called when I am debugging. I saw that yes, the lifecycle observer is added, but never called.

https://github.com/Swordfish90/LibretroDroid/blob/5b355c327bf5e28a068e860da2471f981c6140e9/libretrodroid/src/main/java/com/swordfish/libretrodroid/GLRetroView.kt#L244

I made sure this wasn't a lifecycle issue by making sure that, yes, the lifecycle observer for the RetroView and RenderLifecycle are registered, and I was able to catch OnResumes on my main activity just fine.

The result is that the input variable in libretrodroid.cpp is never assigned and input doesn't work.

This could possibly be an issue of a more recent lifecycle version. Perhaps we need to forward lifecycle events to the GLRetroView?

tytydraco commented 3 years ago

Likely fixed by https://github.com/Swordfish90/LibretroDroid/commit/42267ddf80dae87be0cb832add91f7c04b915f7c