Added a little bit of input validation.
This commit is contained in:
parent
b55a5e1906
commit
56ca9d694b
@ -21,9 +21,24 @@ Graphics::Graphics(glm::uvec2 windowSize, float nearPlane,
|
||||
std::string screenContinuePath) {
|
||||
this->windowSize = windowSize;
|
||||
this->nearPlane = nearPlane;
|
||||
if (farPlane > 0) {
|
||||
this->farPlane = farPlane;
|
||||
}
|
||||
else {
|
||||
this->farPlane = 0;
|
||||
}
|
||||
if (cube_size > 0) {
|
||||
this->cube_size = cube_size;
|
||||
}
|
||||
else {
|
||||
this->cube_size = 0;
|
||||
}
|
||||
if (maxShadowRenderCount < 15) {
|
||||
this->maxShadowRenderCount = maxShadowRenderCount;
|
||||
}
|
||||
else {
|
||||
this->maxShadowRenderCount = 0;
|
||||
}
|
||||
this->loadingScreenPath = screenPath;
|
||||
this->loadingScreenContinuePath = screenContinuePath;
|
||||
gameStart = false;
|
||||
|
Loading…
Reference in New Issue
Block a user