vulkan: fix love.window.setVsync

This commit is contained in:
niki
2022-12-22 01:27:05 +01:00
parent eec94ccc99
commit ccca355664
5 changed files with 51 additions and 41 deletions
+6 -2
View File
@@ -1101,7 +1101,8 @@ void Window::setVSync(int vsync)
#ifdef LOVE_GRAPHICS_VULKAN
// TODO: this doesn't update the swap-chain, but it should.
love::graphics::vulkan::Vulkan::setVsync(vsync);
auto vgfx = dynamic_cast<love::graphics::vulkan::Graphics*>(graphics.get());
vgfx->setVsync(vsync);
#endif
#if defined(LOVE_GRAPHICS_METAL) && defined(LOVE_MACOS)
@@ -1132,7 +1133,10 @@ int Window::getVSync() const
#ifdef LOVE_GRAPHICS_VULKAN
if (windowRenderer == love::graphics::RENDERER_VULKAN)
return love::graphics::vulkan::Vulkan::getVsync();
{
auto vgfx = dynamic_cast<love::graphics::vulkan::Graphics*>(graphics.get());
return vgfx->getVsync();
}
#endif
return 0;