#include "pch.h" #include "App.xaml.h" #include "MainWindow.xaml.h" #include "VavCore/VavCore.h" #include "src/Logger/SimpleLogger.h" using namespace winrt; using namespace winrt::Microsoft::UI::Xaml; namespace winrt::Vav2Player::implementation { App::App() { InitializeComponent(); // Initialize VavCore on startup VavCoreResult result = vavcore_initialize(); if (result == VAVCORE_SUCCESS) { const char* version = vavcore_get_version_string(); ::Vav2Player::SimpleLogger::GetInstance().LogInfoF("[App] VavCore initialized successfully, version: %s", version); } else { ::Vav2Player::SimpleLogger::GetInstance().LogErrorF("[App] Failed to initialize VavCore: error code %d", result); } #if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION UnhandledException([](IInspectable const&, UnhandledExceptionEventArgs const& e) { if (IsDebuggerPresent()) { auto errorMessage = e.Message(); __debugbreak(); } }); #endif } void App::OnLaunched(LaunchActivatedEventArgs const&) { window = winrt::make(); window.Activate(); } }