mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-02-05 05:50:29 +03:00
Ignore new layer creations instead of replacing previous ones while waiting for proper multiple layers support.
This commit is contained in:
parent
2855d12f31
commit
cb62e15748
@ -117,13 +117,13 @@ namespace skyline::service::hosbinder {
|
|||||||
u64 IHOSBinderDriver::CreateLayer(DisplayId pDisplayId) {
|
u64 IHOSBinderDriver::CreateLayer(DisplayId pDisplayId) {
|
||||||
if (pDisplayId != displayId)
|
if (pDisplayId != displayId)
|
||||||
throw exception("Creating layer on unopened display: '{}'", ToString(pDisplayId));
|
throw exception("Creating layer on unopened display: '{}'", ToString(pDisplayId));
|
||||||
else if (layer) // Fallback to replacing previous layer
|
else if (!layer) {
|
||||||
Logger::Warn("Creation of multiple layers is not supported");
|
layerStrongReferenceCount = InitialStrongReferenceCount;
|
||||||
|
layerWeakReferenceCount = 0;
|
||||||
|
layer = std::make_shared<GraphicBufferProducer>(state, nvMap);
|
||||||
layerStrongReferenceCount = InitialStrongReferenceCount;
|
}
|
||||||
layerWeakReferenceCount = 0;
|
else // Ignore new layer creations if one already exists
|
||||||
layer = std::make_shared<GraphicBufferProducer>(state, nvMap);
|
Logger::Warn("Creation of multiple layers is not supported. Ignoring creation of new layers.");
|
||||||
|
|
||||||
return DefaultLayerId;
|
return DefaultLayerId;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user