summaryrefslogtreecommitdiff
path: root/drivers/vulkan/vulkan_context.cpp
diff options
context:
space:
mode:
authorWiktor Kocielski <withaust@gmail.com>2023-02-12 14:01:01 +0300
committerWiktor Kocielski <withaust@gmail.com>2023-02-12 16:08:11 +0300
commitb66f3846b429292242bc928545207e125bff8f31 (patch)
tree0bbdfde53cf7ad3d524d5a95fca901f45e2b221c /drivers/vulkan/vulkan_context.cpp
parent1d0e7f0222e2f6da16bea959a4170ac754110d56 (diff)
Make present mode info message print only on change
Styling fix
Diffstat (limited to 'drivers/vulkan/vulkan_context.cpp')
-rw-r--r--drivers/vulkan/vulkan_context.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index 179de8227a..b8cea7136d 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -1871,7 +1871,10 @@ Error VulkanContext::_update_swap_chain(Window *window) {
// Set the windows present mode if it is available, otherwise FIFO is used (guaranteed supported).
if (present_mode_available) {
- window->presentMode = requested_present_mode;
+ if (window->presentMode != requested_present_mode) {
+ window->presentMode = requested_present_mode;
+ print_verbose("Using present mode: " + String(string_VkPresentModeKHR(window->presentMode)));
+ }
} else {
String present_mode_string;
switch (window->vsync_mode) {
@@ -1892,8 +1895,6 @@ Error VulkanContext::_update_swap_chain(Window *window) {
window->vsync_mode = DisplayServer::VSYNC_ENABLED; // Set to default.
}
- print_verbose("Using present mode: " + String(string_VkPresentModeKHR(window->presentMode)));
-
free(presentModes);
// Determine the number of VkImages to use in the swap chain.