Update logging

This commit is contained in:
Georg Hagen
2024-07-11 00:10:48 +02:00
parent b1081bd26c
commit 22cb48be89

View File

@@ -253,7 +253,11 @@ namespace OpenVulkano::GLFW
vk::SurfaceKHR WindowGLFW::CreateSurface(const vk::Instance& instance, const vk::AllocationCallbacks* pAllocator) vk::SurfaceKHR WindowGLFW::CreateSurface(const vk::Instance& instance, const vk::AllocationCallbacks* pAllocator)
{ {
VkSurfaceKHR rawSurface; VkSurfaceKHR rawSurface;
const auto result = static_cast<vk::Result>(glfwCreateWindowSurface(static_cast<VkInstance>(instance), window, reinterpret_cast<const VkAllocationCallbacks*>(pAllocator), &rawSurface)); const vk::Result result = static_cast<vk::Result>(glfwCreateWindowSurface(static_cast<VkInstance>(instance), window, reinterpret_cast<const VkAllocationCallbacks*>(pAllocator), &rawSurface));
if (result != vk::Result::eSuccess) [[unlikely]]
{
Logger::WINDOW->error("Failed to create vulkan surface. Result: {}", vk::to_string(result));
}
return rawSurface;//createResultValue(result, rawSurface, "vk::CommandBuffer::begin"); return rawSurface;//createResultValue(result, rawSurface, "vk::CommandBuffer::begin");
} }
@@ -282,19 +286,19 @@ namespace OpenVulkano::GLFW
void WindowGLFW::OnFocusLost() void WindowGLFW::OnFocusLost()
{ {
Logger::WINDOW->debug("Window (id: {0}) focus lost", GetWindowId()); Logger::WINDOW->trace("Window (id: {0}) focus lost", GetWindowId());
handler->OnWindowFocusLost(this); handler->OnWindowFocusLost(this);
} }
void WindowGLFW::OnFocusGained() void WindowGLFW::OnFocusGained()
{ {
Logger::WINDOW->debug("Window (id: {0}) focus gained", GetWindowId()); Logger::WINDOW->trace("Window (id: {0}) focus gained", GetWindowId());
handler->OnWindowFocusGained(this); handler->OnWindowFocusGained(this);
} }
void WindowGLFW::OnMove(const int posX, const int posY) void WindowGLFW::OnMove(const int posX, const int posY)
{ {
Logger::WINDOW->debug("Window (id: {0}) moved (x: {1}, y: {2})", GetWindowId(), posX, posY); Logger::WINDOW->trace("Window (id: {0}) moved (x: {1}, y: {2})", GetWindowId(), posX, posY);
if (windowConfig.windowMode == WINDOWED || windowConfig.windowMode == BORDERLESS) if (windowConfig.windowMode == WINDOWED || windowConfig.windowMode == BORDERLESS)
{ // Don't save window position for fullscreen { // Don't save window position for fullscreen
windowConfig.position.x = posX; windowConfig.position.x = posX;