Skip to content

Commit 5df3e7f

Browse files
committed
Fixed tiling backgrounds in high resolution.
1 parent a600fc3 commit 5df3e7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/code/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,12 @@ void DrawBackground(SDL_Renderer* target) {
292292
if (globalData.theme.background.tileMoveSpeedX) {
293293
nextX -= (ticks/globalData.theme.background.tileMoveSpeedX)%background.GetWidth();
294294
}
295-
while (nextX < globalData.xsize) {
295+
while (nextX < w) {
296296
int nextY = 0;
297297
if (globalData.theme.background.tileMoveSpeedY) {
298298
nextY -= (ticks/globalData.theme.background.tileMoveSpeedY)%background.GetWidth();
299299
}
300-
while (nextY < globalData.ysize) {
300+
while (nextY < h ) {
301301
background.Draw(target, ticks, nextX, nextY);
302302
nextY += background.GetHeight();
303303
}

0 commit comments

Comments
 (0)