Merged resolution switching stuff.