IntChangeDisplaySettings: set last error before leaving the function