From 09d30acd7b0c31482b760045aeed23b7ac736c8b Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 1 Feb 2023 22:44:11 -0600 Subject: [PATCH] [nostalgia/studio] Add Bullock integration --- src/nostalgia/studio/CMakeLists.txt | 1 + src/nostalgia/studio/main.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/nostalgia/studio/CMakeLists.txt b/src/nostalgia/studio/CMakeLists.txt index 1a4db1aa..f593f943 100644 --- a/src/nostalgia/studio/CMakeLists.txt +++ b/src/nostalgia/studio/CMakeLists.txt @@ -15,6 +15,7 @@ add_executable( target_link_libraries( nostalgia-studio OxClArgs + OxLogConn NostalgiaStudio NostalgiaCore-Studio ) diff --git a/src/nostalgia/studio/main.cpp b/src/nostalgia/studio/main.cpp index 287c71a1..fe29fc5c 100644 --- a/src/nostalgia/studio/main.cpp +++ b/src/nostalgia/studio/main.cpp @@ -2,6 +2,8 @@ * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved. */ +#include + #include #include @@ -53,6 +55,15 @@ static ox::Error run(ox::UniquePtr fs) noexcept { static ox::Error run(int argc, const char **argv) noexcept { ox::trace::init(); +#ifdef DEBUG + ox::LoggerConn loggerConn; + const auto loggerErr = loggerConn.initConn("Nostalgia Studio"); + if (loggerErr) { + oxErrf("Could not connect to logger: {}\n", toStr(loggerErr)); + } else { + ox::trace::setLogger(&loggerConn); + } +#endif if (argc >= 2) { const auto path = argv[1]; oxRequireM(fs, core::loadRomFs(path));