Updated viewport emulation a bit.