fix: GLFW error on exit
This commit is contained in:
parent
0ac8fcd1eb
commit
ace25d353b
@ -95,6 +95,11 @@ namespace hex {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clear() noexcept {
|
||||||
|
s_events.clear();
|
||||||
|
s_tokenStore.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::map<void *, EventList::iterator> s_tokenStore;
|
static std::map<void *, EventList::iterator> s_tokenStore;
|
||||||
static EventList s_events;
|
static EventList s_events;
|
||||||
|
@ -163,6 +163,8 @@ namespace hex::init {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool deleteSharedData() {
|
bool deleteSharedData() {
|
||||||
|
EventManager::clear();
|
||||||
|
|
||||||
while (ImHexApi::Provider::isValid())
|
while (ImHexApi::Provider::isValid())
|
||||||
ImHexApi::Provider::remove(ImHexApi::Provider::get());
|
ImHexApi::Provider::remove(ImHexApi::Provider::get());
|
||||||
ContentRegistry::Provider::getEntries().clear();
|
ContentRegistry::Provider::getEntries().clear();
|
||||||
|
@ -160,14 +160,14 @@ namespace hex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Window::~Window() {
|
Window::~Window() {
|
||||||
this->exitImGui();
|
|
||||||
this->exitGLFW();
|
|
||||||
|
|
||||||
EventManager::unsubscribe<EventProviderDeleted>(this);
|
EventManager::unsubscribe<EventProviderDeleted>(this);
|
||||||
EventManager::unsubscribe<RequestCloseImHex>(this);
|
EventManager::unsubscribe<RequestCloseImHex>(this);
|
||||||
EventManager::unsubscribe<RequestChangeWindowTitle>(this);
|
EventManager::unsubscribe<RequestChangeWindowTitle>(this);
|
||||||
EventManager::unsubscribe<EventAbnormalTermination>(this);
|
EventManager::unsubscribe<EventAbnormalTermination>(this);
|
||||||
EventManager::unsubscribe<RequestOpenPopup>(this);
|
EventManager::unsubscribe<RequestOpenPopup>(this);
|
||||||
|
|
||||||
|
this->exitImGui();
|
||||||
|
this->exitGLFW();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::loop() {
|
void Window::loop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user