[nostalgia/core] Add focusWindow, cleanup GLFW leak into Userland, change shutdown to stop main loop
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user