[nostalgia/core] Add focusWindow, cleanup GLFW leak into Userland, change shutdown to stop main loop

This commit is contained in:
2021-07-23 21:52:26 -05:00
parent 7dfa2f5713
commit 32ac497a0e
8 changed files with 50 additions and 19 deletions
+11
View File
@@ -26,6 +26,7 @@ class Context {
ox::FileSystem *rom = nullptr;
ox::Vector<Drawer*, 5> drawers;
private:
void *m_customData = nullptr;
void *m_windowerData = nullptr;
void *m_rendererData = nullptr;
@@ -36,6 +37,16 @@ class Context {
Context(const Context &other) noexcept = delete;
Context(const Context &&other) noexcept = delete;
constexpr void setCustomData(void *customData) noexcept {
m_customData = customData;
}
template<typename T>
[[nodiscard]]
constexpr T *customData() noexcept {
return static_cast<T*>(m_customData);
}
constexpr void setWindowerData(void *windowerData) noexcept {
m_windowerData = windowerData;
}