Skip to content

Commit

Permalink
Do not crash when display mode is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Dec 20, 2024
1 parent 5f8526f commit b8ddfe8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/OptionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,11 @@ void OptionManager::setHowToPlaySeen(bool value) {

int OptionManager::getScreenWidth() {
int result = this->options.get("screen_width", 0).asInt();
if (result == 0) {
panic("Could not find a valid display mode!");
}
return result;
}

int OptionManager::getScreenHeight() {
int result = this->options.get("screen_height", 0).asInt();
if (result == 0) {
panic("Could not find a valid display mode!");
}
return result;
}

Expand Down

0 comments on commit b8ddfe8

Please sign in to comment.