diff --git a/src/saturn/saturn_colors.cpp b/src/saturn/saturn_colors.cpp index 71f0271f..aa784349 100644 --- a/src/saturn/saturn_colors.cpp +++ b/src/saturn/saturn_colors.cpp @@ -305,6 +305,9 @@ void saturn_load_cc_directory() { colorCodeDir = "dynos/colorcodes/"; #endif + if (!fs::exists(colorCodeDir)) + return; + for (const auto & entry : fs::directory_iterator(colorCodeDir)) { fs::path path = entry.path(); diff --git a/src/saturn/saturn_textures.cpp b/src/saturn/saturn_textures.cpp index ed621933..8c01f14e 100644 --- a/src/saturn/saturn_textures.cpp +++ b/src/saturn/saturn_textures.cpp @@ -58,6 +58,10 @@ void saturn_load_eye_folder(std::string path) { eye_array.clear(); fs::create_directory("res/gfx"); + // if eye folder is missing + if (!fs::exists("dynos/eyes/")) + return; + // reset dir if we last used models or returned to root if (path == "../") path = ""; if (model_eyes_enabled || path == "") { @@ -149,10 +153,12 @@ const void* saturn_bind_texture(const void* input) { } } - if (texName == "actors/mario/mario_eyes_left_unused.rgba16" || texName.find("saturn_eye") != string::npos) { - outputTexture = current_eye.c_str(); - const void* output = static_cast(outputTexture); - return output; + if (eye_array.size() > 0) { + if (texName == "actors/mario/mario_eyes_left_unused.rgba16" || texName.find("saturn_eye") != string::npos) { + outputTexture = current_eye.c_str(); + const void* output = static_cast(outputTexture); + return output; + } } return input;