video zoom: Fix crash on windows when making detached video too small

This commit is contained in:
arch1t3cht 2022-11-02 23:07:55 +01:00
parent 0e89f32cfb
commit 28db5d31ce

View file

@ -201,7 +201,7 @@ void VideoDisplay::Render() try {
E(glMatrixMode(GL_PROJECTION));
E(glLoadIdentity());
E(glOrtho(0.0f, client_w, client_h, 0.0f, -1000.0f, 1000.0f));
E(glOrtho(0.0f, std::max(client_w, 1), std::max(client_h, 1), 0.0f, -1000.0f, 1000.0f));
if (OPT_GET("Video/Overscan Mask")->GetBool()) {
double ar = con->videoController->GetAspectRatioValue();