From d034995511218014b97e879ce9de3e10bd88caed Mon Sep 17 00:00:00 2001 From: Andrey Sterkhov Date: Tue, 3 Dec 2024 10:35:04 +0300 Subject: [PATCH 1/2] #15 fix CMake configure audio module --- engine/3rdparty_libs/miniaudio/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/3rdparty_libs/miniaudio/CMakeLists.txt b/engine/3rdparty_libs/miniaudio/CMakeLists.txt index d531b94e..83f52456 100644 --- a/engine/3rdparty_libs/miniaudio/CMakeLists.txt +++ b/engine/3rdparty_libs/miniaudio/CMakeLists.txt @@ -5,4 +5,10 @@ project(miniaudio LANGUAGES CXX) set(TargetName miniaudio) add_library(${TargetName} INTERFACE) -target_include_directories(${TargetName} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/) + +target_include_directories(${TargetName} INTERFACE + $ + $/include/3rdPartyLibs/miniaudio> +) + +nau_install(${TargetName} 3rdPartyLibs) From c979321c8fc72cfdebb4d617bf9089dcd2f3a736 Mon Sep 17 00:00:00 2001 From: Andrey Sterkhov Date: Tue, 3 Dec 2024 16:14:02 +0300 Subject: [PATCH 2/2] fix minimal app crash with null reference exception --- .../windows/windows_window_manager_impl.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/engine/core/modules/platform_app/src/platform/windows/windows_window_manager_impl.cpp b/engine/core/modules/platform_app/src/platform/windows/windows_window_manager_impl.cpp index b536b4e6..34a3e6c7 100644 --- a/engine/core/modules/platform_app/src/platform/windows/windows_window_manager_impl.cpp +++ b/engine/core/modules/platform_app/src/platform/windows/windows_window_manager_impl.cpp @@ -277,9 +277,11 @@ namespace nau } else { - auto* const coreGraphics = getServiceProvider().find(); - auto task = coreGraphics->closeWindow(hWnd); - task.detach(); + if (auto* const coreGraphics = getServiceProvider().find()) + { + auto task = coreGraphics->closeWindow(hWnd); + task.detach(); + } window.destroyWindow(); } } @@ -288,9 +290,11 @@ namespace nau int width = LOWORD(lParam); int height = HIWORD(lParam); - auto* const coreGraphics = getServiceProvider().find(); - auto task = coreGraphics->requestViewportResize(width, height, hWnd); - task.detach(); + if (auto* const coreGraphics = getServiceProvider().find()) + { + auto task = coreGraphics->requestViewportResize(width, height, hWnd); + task.detach(); + } } else if (message == WM_DESTROY) {