diff --git a/data/ui/p-black.png b/data/ui/p-black.png new file mode 100644 index 0000000..3c3f63d Binary files /dev/null and b/data/ui/p-black.png differ diff --git a/engine/app_layout.cpp b/engine/app_layout.cpp index ec81597..1c6afbb 100644 --- a/engine/app_layout.cpp +++ b/engine/app_layout.cpp @@ -567,6 +567,16 @@ void App::initLayout() if (auto* toolbar = layout[main_id]->find("toolbar")) toolbar->m_flood_events = true; + NodeImage* n = new NodeImage; + n->m_path = "data/ui/p-black.png"; + n->m_tex_id = const_hash("data/ui/p-black.png"); + n->create(); + n->SetPositioning(YGPositionTypeAbsolute); + //n->SetPosition(100, 100); + YGNodeStyleSetPosition(n->y_node, YGEdgeBottom, 10); + YGNodeStyleSetPosition(n->y_node, YGEdgeLeft, 10); + n->SetSize(40, 60); + layout[main_id]->add_child(n); /* if (auto* slider = layout[main_id]->find("frames-slider")) { diff --git a/engine/log.cpp b/engine/log.cpp index 9412997..8cab797 100644 --- a/engine/log.cpp +++ b/engine/log.cpp @@ -30,6 +30,15 @@ void LogRemote::start() LOG("NET thread loop exit"); }); } + +void LogRemote::stop() +{ + m_running = false; + m_mq.UnlockGetters(); + if (m_thread.joinable()) + m_thread.join(); +} + void LogRemote::net_init() { if (!(curl = curl_easy_init())) @@ -120,8 +129,5 @@ void LogRemote::log(const wchar_t* format, ...) } LogRemote::~LogRemote() { - m_running = false; - m_mq.UnlockGetters(); - if (m_thread.joinable()) - m_thread.join(); + stop(); } diff --git a/engine/log.h b/engine/log.h index 6ffea0b..b46e315 100644 --- a/engine/log.h +++ b/engine/log.h @@ -26,6 +26,7 @@ public: std::ofstream m_logfile; void start(); + void stop(); void net_init(); std::string net_request(std::string cmd, std::string data = ""); void net_close(); diff --git a/engine/main.cpp b/engine/main.cpp index 84f78e2..ce63527 100644 --- a/engine/main.cpp +++ b/engine/main.cpp @@ -390,9 +390,9 @@ int main(int argc, char** argv) auto present = App::I.animate || App::I.redraw ? PeekMessage(&msg, 0, 0, 0, PM_REMOVE) : GetMessage(&msg, 0, 0, 0); + running = !(msg.message == WM_QUIT/* || gl.keys[VK_ESCAPE]*/); if (present) { - running = !(msg.message == WM_QUIT/* || gl.keys[VK_ESCAPE]*/); DispatchMessage(&msg); TranslateMessage(&msg); } @@ -422,6 +422,7 @@ int main(int argc, char** argv) WacomTablet::I.terminate(); DestroyWindow(hWnd); UnregisterClass(className, hInst); + LogRemote::I.stop(); } LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) diff --git a/icon.ico b/icon.ico index 87edc2a..b0c3374 100644 Binary files a/icon.ico and b/icon.ico differ diff --git a/icon.png b/icon.png index 364c721..42965fa 100644 Binary files a/icon.png and b/icon.png differ