FransBouma / ShaderToggler

Reshade 5+ addin to toggle shaders on/off in groups based on a key press. It allows you to configure these groups from within the addin as well.
MIT License
101 stars 28 forks source link

Change code merged with #17 to use the reshade api to obtain the reshade base path #18

Closed FransBouma closed 1 year ago

FransBouma commented 1 year ago

See: #17

The code merged works but if the user has all addons in a central location the ini files will now also be placed in that central location which isn't useful. Using get_reshade_base_path() fixes this.

FransBouma commented 1 year ago

The API can't be used as we have to load the ini at startup and we don't have the runtime object there. We could implement a hack with loading the ini file in present but that if statement is executed at every frame while it's true only once.

Instead shadertoggler now obtains the host process' executable name and path. This is highly likely the location of the dxgi / ini files as well. We can't use the reshade module handle because under vulkan the reshade dll is stored in a central place.

Implemented in 1.2.1