Merge pull request #9488 from iwubcode/dynamic-input-tex-optimizations InputCommon: fix potential dynamic input texture crash and an optimization