mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
toggle DisableFrameThrottling setting by clicking on FPS display
s/jSurface/vkSurface
This commit is contained in:
committed by
Billy Laws
parent
3168e8efc0
commit
f850271e2d
@ -33,6 +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));
|
||||
}
|
||||
|
||||
PresentationEngine::~PresentationEngine() {
|
||||
@ -341,6 +342,13 @@ namespace skyline::gpu {
|
||||
swapchainImageCount = vkImages.size();
|
||||
}
|
||||
|
||||
void PresentationEngine::OnDisableFrameThrottlingChanged(const bool &value) {
|
||||
std::scoped_lock guard{mutex};
|
||||
|
||||
if (vkSurface && swapchainExtent && swapchainFormat)
|
||||
UpdateSwapchain(swapchainFormat, swapchainExtent);
|
||||
}
|
||||
|
||||
void PresentationEngine::UpdateSurface(jobject newSurface) {
|
||||
std::scoped_lock guard{mutex};
|
||||
|
||||
|
Reference in New Issue
Block a user