Upstream changes and fix for games that can change resolution to 256x224