diff --git a/neo/ui/SimpleWindow.cpp b/neo/ui/SimpleWindow.cpp index b5099b2e..4e5f2d10 100644 --- a/neo/ui/SimpleWindow.cpp +++ b/neo/ui/SimpleWindow.cpp @@ -180,8 +180,10 @@ void idSimpleWindow::DrawBackground(const idRectangle &drawRect) { if (matColor.w() > 0) { float scalex, scaley; if ( flags & WIN_NATURALMAT ) { - scalex = drawRect.w / background->GetImageWidth(); - scaley = drawRect.h / background->GetImageHeight(); + // DG: now also multiplied with matScalex/y, don't see a reason not to support that + // (it allows scaling a tiled background image) + scalex = (drawRect.w / background->GetImageWidth()) * matScalex; + scaley = (drawRect.h / background->GetImageHeight()) * matScaley; } else { scalex = matScalex; scaley = matScaley; diff --git a/neo/ui/Window.cpp b/neo/ui/Window.cpp index 502592d3..657d12db 100644 --- a/neo/ui/Window.cpp +++ b/neo/ui/Window.cpp @@ -1160,8 +1160,10 @@ void idWindow::DrawBackground(const idRectangle &drawRect) { if ( background && matColor.w() ) { float scalex, scaley; if ( flags & WIN_NATURALMAT ) { - scalex = drawRect.w / background->GetImageWidth(); - scaley = drawRect.h / background->GetImageHeight(); + // DG: now also multiplied with matScalex/y, don't see a reason not to support that + // (it allows scaling a tiled background image) + scalex = (drawRect.w / background->GetImageWidth()) * matScalex; + scaley = (drawRect.h / background->GetImageHeight()) * matScaley; } else { scalex = matScalex; scaley = matScaley;