Можно ли сделать снимок экрана с полноэкранной игры?

Нужно сделать скриншоты с игры, запущенной в полный экран. Пробовал библиотеки PyAutoGUI, Pillow и mss, но проблема в том, что они делают скриншот рабочего стола, но когда игра запущена снимки выходят пустыми.

import mss
import pyautogui



def get_screen_height():
    """ Получение высоты экрана """
    return pyautogui.size()[1]


def test_pyautogui():
    area_size = 300
    screen_height = get_screen_height()
    
    pyautogui.screenshot('TESTTESTTEST.png',
        region=(0, screen_height-area_size, area_size, area_size))


def test_mss():
    area_size = 300
    screen_height = get_screen_height()

    with mss.mss() as sct:
        # The screen part to capture
        monitor = {"top": screen_height-area_size, "left": 500, "width": area_size, "height": area_size}
        output = "sct-{top}x{left}_{width}x{height}.png".format(**monitor)

        # Grab the data
        sct_img = sct.grab(monitor, mon=1)

        # Save to the picture file
        mss.tools.to_png(sct_img.rgb, sct_img.size, output=output)
        print(output)

Ответы (0 шт):