Skip to content

Commit

Permalink
Korai won't open if the size specified is bigger than the screen reso…
Browse files Browse the repository at this point in the history
…lution
  • Loading branch information
DisableGraphics committed Apr 27, 2022
1 parent 047cf0d commit 0452e4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,12 @@ int main( int argc, char **argv)
defsize.x = (double)(s->get_width() * 0.3925);
defsize.y = (double)(s->get_height() * 0.722222222);
}
else if(defsize.x > window.get_screen()->get_width() || defsize.y > window.get_screen()->get_height())
{
std::cout << " \t\t\t[ERROR] Hey hey! [ERROR]\n You're trying to open a window bigger than your computer screen!\n";
std::cout << " Your screen dimensions are: " << window.get_screen()->get_width() << "x" << window.get_screen()->get_height() << "\n";
return EXIT_FAILURE;
}

window.set_default_size( defsize.x, defsize.y );
if(fullscreen)
Expand Down

0 comments on commit 0452e4b

Please sign in to comment.