Fix a bug where changing resolution wouldn't make a difference on the fly

Fixes #5223