rename executeGDThreadQueue to executeMainThreadQueue

This commit is contained in:
ConfiG 2024-01-14 15:38:37 +03:00
parent be7ee3ef18
commit b70b64dfc9
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ using namespace geode::prelude;
struct FunctionQueue : Modify<FunctionQueue, CCScheduler> {
void update(float dt) {
LoaderImpl::get()->executeGDThreadQueue();
LoaderImpl::get()->executeMainThreadQueue();
return CCScheduler::update(dt);
}
};

View file

@ -697,9 +697,9 @@ void Loader::Impl::queueInMainThread(ScheduledFunction func) {
m_mainThreadQueue.push_back(func);
}
void Loader::Impl::executeGDThreadQueue() {
void Loader::Impl::executeMainThreadQueue() {
// copy queue to avoid locking mutex if someone is
// running addToGDThread inside their function
// running addToMainThread inside their function
m_mainThreadMutex.lock();
auto queue = m_mainThreadQueue;
m_mainThreadQueue.clear();

View file

@ -114,7 +114,7 @@ namespace geode {
void updateResources(bool forceReload);
void queueInMainThread(ScheduledFunction func);
void executeGDThreadQueue();
void executeMainThreadQueue();
bool isReadyToHook() const;
void addUninitializedHook(Hook* hook, Mod* mod);