Make present mode info message print only on change

Styling fix
This commit is contained in:
Wiktor Kocielski 2023-02-12 14:01:01 +03:00
parent 1d0e7f0222
commit b66f3846b4

View file

@ -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). // Set the windows present mode if it is available, otherwise FIFO is used (guaranteed supported).
if (present_mode_available) { 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 { } else {
String present_mode_string; String present_mode_string;
switch (window->vsync_mode) { switch (window->vsync_mode) {
@ -1892,8 +1895,6 @@ Error VulkanContext::_update_swap_chain(Window *window) {
window->vsync_mode = DisplayServer::VSYNC_ENABLED; // Set to default. window->vsync_mode = DisplayServer::VSYNC_ENABLED; // Set to default.
} }
print_verbose("Using present mode: " + String(string_VkPresentModeKHR(window->presentMode)));
free(presentModes); free(presentModes);
// Determine the number of VkImages to use in the swap chain. // Determine the number of VkImages to use in the swap chain.