Fix display bug with the environment warning

This commit is contained in:
Maschell 2023-01-20 10:59:21 +01:00
parent 9db68c5d76
commit 3cb99bcf0f
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ ApplicationState::eSubState UpdaterState::UpdateGetEnvironmentDirectory(Input *i
ApplicationState::eSubState UpdaterState::UpdateCheckEnvironmentDirectory(Input *input) {
if (this->mCurEnvironmentPath == DEFAULT_AROMA_ENVIRONMENT_SD_PATH) {
this->mState = STATE_CHECK_VERSIONS;
return SUBSTATE_RUNNING;
}
if (buttonPressed(input, Input::BUTTON_A)) {
std::string sNeedle = DEFAULT_AROMA_ENVIRONMENT_PATH;
@ -53,7 +54,7 @@ ApplicationState::eSubState UpdaterState::UpdateCheckEnvironmentDirectory(Input
}
void UpdaterState::RenderCheckEnvironmentDirectory() {
if (this->mCurEnvironmentPath != DEFAULT_AROMA_ENVIRONMENT_PATH) {
if (!this->mCurEnvironmentPath.empty() && this->mCurEnvironmentPath != DEFAULT_AROMA_ENVIRONMENT_SD_PATH) {
DrawUtils::setFontColor(COLOR_RED);
DrawUtils::setFontSize(30);
DrawUtils::print(16, 90, "Warning");