refactor: add window::stop() and remove quit flag
Added `window::stop()` (sets GLFW close flag). Updated signal/timer handlers and Q key check to call it instead of using a separate `quit` bool in main(). This encapsulates the close state in the window class (no more external flag + manual checks). The render loop is now simpler. (The process_signals lambda and ASIO duration timer are retained.)
This commit is contained in:
@@ -83,4 +83,10 @@ auto window::raw() const -> GLFWwindow* {
|
||||
return m_window;
|
||||
}
|
||||
|
||||
auto window::stop() -> void {
|
||||
if (m_window) {
|
||||
glfwSetWindowShouldClose(m_window, GLFW_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user