Bronya-Rand / DDLCModTemplate2.0

A new template for producing DDLC mods that adhere to Team Salvato's guidelines based off DDLC itself.
58 stars 18 forks source link

Ren'Py Version Check for Screenshots #8

Closed Bronya-Rand closed 3 years ago

Bronya-Rand commented 3 years ago

Versions Affected

Any Ren'Py 7.4+ DDLC Mod

Issue Description

After Ren'Py 7.3.5, the Ren'Py code changed the method of taking screenshots in the game, causing issues with certain effects in the game like screen tear in Ren'Py 7.4.0 or higher.

Cause

The cause of this is due to depreciation, or a moved/removed feature in the screenshot() define in swdraw.py for fullscreen_video. This feature has been present since 6.99.12.4 (Ren'Py 6), up to Ren'Py 7.3.5 (Ren'Py 7) until Ren'Py 7.4.0 removed this in the define itself. Since it takes less arguments than what Ren'Py 6 and older Ren'Py 7 code had in the files, it will error out due to being given 2 arguments rather than one.

Solution

The solution appears to be modifying effects.rpy to check whether the version of Ren'Py running is 7.4 or higher to use the new draw call and if not to use the older draw call from DDLC itself. This should fix the 2 argument screenshot error for future builds of the mod template and higher versions of Ren'Py.