nvda
96325a9d - Moving mouse with audio coordinates no longer throws an error (#18931)

Commit
128 days ago
Moving mouse with audio coordinates no longer throws an error (#18931) Fixes #18929 ### Summary of the issue: when moving the mouse with play audio coordinates with brightness enabled, NVDA fails to read what is under the mouse, fails to play the audio beeps, and logs an error: This is due to the fact that screenBitmap.captureImage was recently changed to return a 1d array of RGBQUAD values, rather than a 2d array. The change was to fix an incompatibility with argument types of uwpOCR_recognize. However, mouseHandler.playAudioCoordinates still expects a 2d array. ### Description of user facing changes: Mouse movement with play audio coordinates and brightness works and does not throw an error. ### Description of developer facing changes: None ### Description of development approach: screenBitmap.captureImage again returns a 2d array, keeping it backward compatible and fixes the mouse movement bug. uwpOCR recognize: the pixels array provided from screenBitmap.captureImage is a 2d array. However uwpOCR_recognise expects pixels to be a 1d array. these are exactly the same memory layout, so we now just cast to a POINTER(RGBQUAD). ### Testing strategy: * Turned on play audio coordinates with mouse moves. Turned on detect brightness. Moved the mouse around the screen, ensuring audio coordinates beeps played and there were no errors in the log. Did an OCR recogise of the screen with NvDA+r, and ensured that the results were readable and no error was logged. ### Known issues with pull request: None known.
Parents
Loading