This is a HACK and not a workaround. Also: suppose the overlay gets shown and the cursor is not replaced (i.e. still the game cursor) wouldn't this result in the scaling be still disabled even when the overlay is hidden again? (i.e. it would change the scale state in an unpredictable manner as far as I can tell)