device detector, viewport write and rewrite