Skip to content

Latest commit

 

History

History
115 lines (85 loc) · 3.92 KB

overlay.md

File metadata and controls

115 lines (85 loc) · 3.92 KB

Overlay

The overlay is based off technology licensed from Evolve and provides the following functionality:

  • "Overlay" UI displayed on top of apps (including pop-up notifications for achievements, etc.)
  • Recording video (see DVR)
  • Taking screenshots
  • Input from devices (as an alternative to implementing input portion of SDK)

The following are not (yet) supported:

  • DirectX 12 (Coming soon)
  • Vulkan (coming less soon)
  • HDR10 (not coming soon; see hardware)

It is implemented via dll injection (also called dll hooking) so it works without requiring any modifications in compatible applications. However, this might cause problems if your game uses anti-cheat middleware.

It already supports over 5000 games. Your game can be made compatible with any of the following methods:

API

Compatible apps don't have to do anything with the SDK.

However, there are some functions related to the overlay in the SDK. For example, apps can trigger a screenshot. See SDK documentation for details.

Manifest

A compatibility string may be placed in the application manifest:

meta_data:[
    {
    name:"gamedb_string",
    value:"
    
        <game>
            <id>6002</id>
            <name>UE4Game</name>
            <conditions>
                <cond name='is-UE4Game.exe-present' type='exe-present' exe='UE4Game.exe'/>
            </conditions>
            <detection>
                <variant order='1' name='default'>
                    <if cond='is-UE4Game.exe-present'/>
                </variant>
            </detection>
        </game>

    "
    }
]

Here the value in gamedb_string is a <game></game> block copied from gamesdb.xml. Pay attention to use ' ' instead of " ", in order to correctly embed JSON in XML.

Gamesdb.xml

Compatible apps may be listed in RuyiOverlay/Resources/DeployRes/gamesdb.xml.

  1. Shutdown Layer0

  2. Open OverlayClient/DeployRes/gamesdb.xml in a text/XML editor

  3. Inside <games version="2"> add a new <game> block similar to:

    <game>
        <!-- Your app id -->
        <id>9999</id> 
        <name>Your Game Name</name>
        <conditions>
            <cond name="is-YourGameName.exe-present" type="exe-present" exe="YourGameName.exe"/>
        </conditions>
        <detection>
            <variant order="1" name="default">
                <if cond="is-YourGameName.exe-present"/>
            </variant>
        </detection>
    </game>
  4. Save gamesdb.xml

  5. Restart layer0

In most cases, a simple entry like above will suffice. For more advanced uses, consult gamesdb.xml format.

Input

Instead of integrating the input portion of the SDK, you may be able to leverage dll hooking of input APIs. This might work if your app uses any of the following:

This currently does NOT work if your app uses:

<runtime>
    <ruyifeatures>
        <ruyi_xinput enabled="true" />
    </ruyifeatures>
</runtime>

Debugging

Some registry values in HKEY_LOCAL_MACHINE\SOFTWARE\Subor\Ruyi can be set (or created):

Name Type Description
EnableDisplayDriverLogging DWORD If 1, additional logging is done
DisplayDriverLogFilePath string/REG_SZ Path of file for log output