summaryrefslogtreecommitdiff
path: root/platform/windows/vulkan_context_win.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-10 01:02:23 +0200
committerGitHub <noreply@github.com>2021-07-10 01:02:23 +0200
commita2d5f191d8d91f241a09233586da0f7e9deb8a76 (patch)
tree0ecf6d68975c6816d1cee621fc6e56d34b110467 /platform/windows/vulkan_context_win.cpp
parent0ee235822d97a4b2a1586b5fd1c092e9f53d2fff (diff)
parent043ae9156086a2fc9fdb520539411123256b3aeb (diff)
Merge pull request #48622 from Geometror/reimplement-disableable-vsync
Diffstat (limited to 'platform/windows/vulkan_context_win.cpp')
-rw-r--r--platform/windows/vulkan_context_win.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/windows/vulkan_context_win.cpp b/platform/windows/vulkan_context_win.cpp
index e5e176ab93..191792b329 100644
--- a/platform/windows/vulkan_context_win.cpp
+++ b/platform/windows/vulkan_context_win.cpp
@@ -35,18 +35,17 @@ const char *VulkanContextWindows::_get_platform_surface_extension() const {
return VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
}
-int VulkanContextWindows::window_create(DisplayServer::WindowID p_window_id, HWND p_window, HINSTANCE p_instance, int p_width, int p_height) {
+int VulkanContextWindows::window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, HWND p_window, HINSTANCE p_instance, int p_width, int p_height) {
VkWin32SurfaceCreateInfoKHR createInfo;
createInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
createInfo.pNext = nullptr;
createInfo.flags = 0;
createInfo.hinstance = p_instance;
createInfo.hwnd = p_window;
-
VkSurfaceKHR surface;
VkResult err = vkCreateWin32SurfaceKHR(_get_instance(), &createInfo, nullptr, &surface);
ERR_FAIL_COND_V(err, -1);
- return _window_create(p_window_id, surface, p_width, p_height);
+ return _window_create(p_window_id, p_vsync_mode, surface, p_width, p_height);
}
VulkanContextWindows::VulkanContextWindows() {