overwolf.media.getScreenshotUrl not working

Issue Description:
overwolf.media.getScreenshotUrl does not work for Tower of Fantaisy
Callback results is {"success":false,"status":"error","error":"Capture failed"}

Can you reproduce it (exact steps to reproduce):
Open Tower of Fantaisy and try this code snippet :

        const { width } = await OWGames.getRunningGameInfo();

        const equipmentWindowWidth = Math.floor(width * 0.27);
        const equipmentWindowHeight = Math.floor(equipmentWindowWidth / 0.661);
        overwolf.media.getScreenshotUrl({
          roundAwayFromZero: true,
          crop: {
            x: (width / 2) - (equipmentWindowWidth / 2),
            y: width * 0.05,
            width: equipmentWindowWidth,
            height: equipmentWindowHeight,
          },
          rescale: {
            width: equipmentWindowWidth,
            height: equipmentWindowHeight,
          },
        }, (result) => {
          console.log(result);
        });

Impact for my app: blocks the app development
Do you currently have a workaround?
→ No, not yet

Hi!
We will look into this issue, and keep you updated. However, keep in mind that the team is on holiday until the 17th, so it might take longer than usual for a response.

1 Like

Hi!
After verifying with the team, it seems like tower of fantasy can run using either OpenGL, DirectX 11, or DirectX 12.
In-memory screenshots currently do not work in games that use either OpenGL or DirectX 12. As such, either the app will require users to run the game using DirectX 11, or you’ll need to capture the screenshots directly to a file like so, and then read them from there (you’ll then also need to delete the files occasionally to avoid clutter).

I hope this helps!

Hello ! Thank you for your precision, i’ll try the file solution, it will be more durable

1 Like