fighting the crash everywhere: random crash at random location. Changing

computer might be better idea than changing the code indefinitely...
This commit is contained in:
brunoherbelin
2020-08-15 18:05:18 +02:00
parent 44b9169cdc
commit 0e2af5b04f
10 changed files with 80 additions and 34 deletions

View File

@@ -541,7 +541,7 @@ uint MixingView::textureMixingQuadratic()
RenderView::RenderView() : View(RENDERING), frame_buffer_(nullptr), fading_overlay_(nullptr)
{
// set resolution to settings or default
// set resolution to settings default
setResolution();
}
@@ -571,7 +571,8 @@ float RenderView::fading() const
void RenderView::setResolution(glm::vec3 resolution)
{
if (resolution.x < 128.f || resolution.y < 128.f)
// use default resolution if invalid resolution is given (default behavior)
if (resolution.x < 2.f || resolution.y < 2.f)
resolution = FrameBuffer::getResolutionFromParameters(Settings::application.render.ratio, Settings::application.render.res);
// do we need to change resolution ?