Workaround Mojave SDL bug in Tetris.

This commit is contained in:
igotti-google
2018-10-21 16:21:11 +03:00
parent 1e3dc5d526
commit 7038a47024
@@ -188,6 +188,10 @@ class SDL_Visualizer(val width: Int, val height: Int): GameFieldVisualizer, User
}
this.renderer = renderer
// Workaround for Mojave SDL bug, see https://bugzilla.libsdl.org/show_bug.cgi?id=4272
SDL_PumpEvents()
SDL_SetWindowSize(window, windowWidth, windowHeight)
texture = loadImage(window, renderer, "tetris_all.bmp")
}
@@ -472,4 +476,4 @@ class SDL_Visualizer(val width: Int, val height: Int): GameFieldVisualizer, User
SDL_Quit()
gamePadButtons?.destroy()
}
}
}