IntChangeDisplaySettings: set last error before leaving the function
[reactos.git] / reactos / subsystems / win32 / win32k / objects / device.c
index 456ac8a..3469a56 100644 (file)
@@ -1229,8 +1229,8 @@ IntChangeDisplaySettings(
     {
         /* Dynamically change graphics mode */
         DPRINT1("flag 0 UNIMPLEMENTED\n");
-        return DISP_CHANGE_FAILED;
         SetLastWin32Error(ERROR_CALL_NOT_IMPLEMENTED);
+        return DISP_CHANGE_FAILED;
     }
 
     if ((dwflags & CDS_TEST) == CDS_TEST)