Fix KtSettings JNI usage

* Use a global ref for NativeSettings JNI instance
* Always use the JNI env from the JNI call to ensure it's safe to use in the current thread
This commit is contained in:
lynxnb
2023-02-06 19:41:57 +01:00
committed by Billy Laws
parent 5b0a397165
commit fc9b34846c
4 changed files with 16 additions and 12 deletions

View File

@ -33,7 +33,7 @@ namespace skyline::gpu {
auto desc{presentationTrack.Serialize()};
desc.set_name("Presentation");
perfetto::TrackEvent::SetTrackDescriptor(presentationTrack, desc);
state.settings->disableFrameThrottling.AddCallback(std::bind(&PresentationEngine::OnDisableFrameThrottlingChanged, this, std::placeholders::_1));
state.settings->disableFrameThrottling.AddCallback([this](auto && value) { OnDisableFrameThrottlingChanged(value); });
}
PresentationEngine::~PresentationEngine() {