34 lines
841 B
C++
34 lines
841 B
C++
#include "application.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include "command_line.h"
|
|
#include "spdlog/async.h"
|
|
#include "spdlog/spdlog.h"
|
|
#include "spdlog/sinks/basic_file_sink.h"
|
|
#include "thread_message/thread_message_hubs.h"
|
|
|
|
bool g_is_running = true;
|
|
bool g_exit_requested = false;
|
|
application* g_app_instance = nullptr;
|
|
|
|
void application::init(const window_params& in_window_params, int argc, char** argv) {
|
|
try {
|
|
async_spdlog_ = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", "logs/log.txt");
|
|
} catch (const spdlog::spdlog_ex& ex) {
|
|
std::cout << "Log init failed: " << ex.what() << std::endl;
|
|
}
|
|
|
|
command_line::instance().init(argc, argv);
|
|
|
|
g_is_running = true;
|
|
}
|
|
|
|
void application::shutdown() {
|
|
g_is_running = false;
|
|
}
|
|
|
|
void application::request_exit() {
|
|
g_exit_requested = true;
|
|
}
|