reshade-shaders icon indicating copy to clipboard operation
reshade-shaders copied to clipboard

Update REFERENCE.md

Open CeeJayDK opened this issue 1 year ago • 2 comments
trafficstars

Mentioned the ADDON_[NAME] definitions

CeeJayDK avatar Oct 22 '24 00:10 CeeJayDK

I provide the following additional information.

The name of the ADDON_ Preprocessor definition is the product name of the .addon file. (The value of ProductName is defined in .rc.) Otherwise, it is the filename of the .addon file.

The naming rule is as follows

  • The letters 0-9 and A-Z will not be changed.
  • a-z lowercase letters will be changed to uppercase.
  • All other letters will be converted to underscores.

The value of ADDON_ preprocessor definition is the file version of the addon. (using FILEVERSION value defined in .rc, not FileVersion) The method is the same as RESHADE_VERSION.(X*10000+Y*100+Z)

When loading the add-on module https://github.com/cot6/reshade/blob/77eeb5d15cbd3b77e1403f98fddf7f1ab906f43a/source/addon_manager.cpp#L413-L418

When compiling the effect https://github.com/cot6/reshade/blob/658fefef601ffa1dd42f9938c3a235f659f5f656/source/runtime.cpp#L1522-L1525

cot6 avatar Oct 22 '24 06:10 cot6

Not a bad idea to add that info.

Please make an edit to the commit and add it.

CeeJayDK avatar Oct 22 '24 16:10 CeeJayDK