some optimizations. apply current transform to native window instead of defaulting to Identity

This commit is contained in:
Emmanuel Hansen 2023-08-08 16:06:35 +00:00
parent 8d2c355ced
commit 613759199b
12 changed files with 473 additions and 35 deletions

View file

@ -185,7 +185,22 @@ namespace LibRyujinx
while (device.ConsumeFrameAvailable())
{
device.PresentFrame(() => _swapBuffersCallback?.Invoke());
device.PresentFrame(() =>
{
VulkanRenderer? vk = device.Gpu.Renderer as VulkanRenderer;
if(vk == null)
{
vk = (device.Gpu.Renderer as ThreadedRenderer)?.BaseRenderer as VulkanRenderer;
}
if(vk != null)
{
var transform = vk.CurrentTransform;
setCurrentTransform(_window, (int)transform);
}
_swapBuffersCallback?.Invoke();
});
}
}