correctly update the map dimensions on rotate

refs #37
This commit is contained in:
Konstantin Käfer
2014-04-10 14:07:36 -04:00
parent eb499e77c1
commit 06bcab9560
4 changed files with 21 additions and 5 deletions

View File

@@ -46,9 +46,9 @@ void Map::loadSettings() {
void Map::resize(uint16_t width, uint16_t height, uint16_t fb_width, uint16_t fb_height) {
transform.resize(width, height, fb_width, fb_height);
painter.resize(fb_width, fb_height);
painter.resize();
if (!style.sprite || style.sprite->pixelRatio) {
if (!style.sprite || style.sprite->pixelRatio != transform.getPixelRatio()) {
style.sprite = std::make_shared<Sprite>(transform.getPixelRatio());
style.sprite->load(kSpriteURL);
}