Skip to main content

MaaControllerCachedImage

Function MaaControllerCachedImage 

Source
pub unsafe extern "C" fn MaaControllerCachedImage(
    ctrl: *const MaaController,
    buffer: *mut MaaImageBuffer,
) -> MaaBool
Expand description

@brief Get the cached screenshot image.

@param ctrl The controller handle. @param buffer The output buffer to store the screenshot image. @return true if the screenshot is available, false otherwise.

@note The returned image is scaled according to the screenshot target size settings (long side / short side). The image dimensions may differ from the raw device resolution. Use MaaControllerGetResolution to get the raw (unscaled) device resolution. @see MaaControllerPostScreencap, MaaControllerSetOption, MaaControllerGetResolution