geode/loader/src/hooks/updateResources.cpp

16 lines
464 B
C++
Raw Normal View History

2022-07-30 12:24:03 -04:00
#include <Geode/loader/Loader.hpp>
#include <Geode/modify/LoadingLayer.hpp>
#include <Geode/modify/GameManager.hpp>
2022-07-30 12:24:03 -04:00
using namespace geode::prelude;
2022-07-30 12:24:03 -04:00
struct ResourcesUpdate : Modify<ResourcesUpdate, LoadingLayer> {
void loadAssets() {
2022-10-30 14:56:36 -04:00
LoadingLayer::loadAssets();
// this is in case the user refreshes texture quality at runtime
if (m_loadStep == 10) {
2023-04-10 05:49:59 -04:00
Loader::get()->updateResources(true);
2022-10-30 14:56:36 -04:00
}
}
};