RSDKModding / RSDKv4-Decompilation

A complete decompilation of Sonic 1 & Sonic 2 (2013) & Retro Engine (v4)
Other
940 stars 176 forks source link

Fixed: Mods don't work if parent dir ends in Data #411

Closed Sappharad closed 8 months ago

Sappharad commented 1 year ago

Mod support does not work if the game is running from a parent directory that ends in Data. When it finds something in Data under a mod folder, it appears to be trying to create that path relative to Data/ but it stops at the first instance of Data/.

When running debug builds out of the Xcode debugger, apps are compiled by default into a folder called DerivedData/ so this makes debugging with mods installed not really feasible. Fix the problem by finding the last instance of the Data/ token instead of the first one.

I don't know if this fix will break anything else so please consider the implications.