aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/singletons/GameSingleton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp')
-rw-r--r--extension/src/openvic-extension/singletons/GameSingleton.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/singletons/GameSingleton.cpp b/extension/src/openvic-extension/singletons/GameSingleton.cpp
index 5268789..13324d0 100644
--- a/extension/src/openvic-extension/singletons/GameSingleton.cpp
+++ b/extension/src/openvic-extension/singletons/GameSingleton.cpp
@@ -597,7 +597,7 @@ Error GameSingleton::set_compatibility_mode_roots(PackedStringArray const& file_
Error GameSingleton::load_defines_compatibility_mode() {
Error err = OK;
auto add_message = std::bind_front(&LoadLocalisation::add_message, LoadLocalisation::get_singleton());
-
+
if (!game_manager.load_definitions(add_message)) {
UtilityFunctions::push_error("Failed to load defines!");
err = FAILED;
@@ -616,6 +616,12 @@ Error GameSingleton::load_defines_compatibility_mode() {
err = FAILED;
}
+ AssetManager* asset_manager = AssetManager::get_singleton();
+ if (asset_manager == nullptr || asset_manager->preload_textures() != OK) {
+ UtilityFunctions::push_error("Failed to preload assets!");
+ err = FAILED;
+ }
+
return err;
}