Add ability to control presets and effects

More
2 days 4 hours ago #1 by akuvfx
It'd be very useful to have API for changing state of `_effects_enabled`.

This is the only way of changing it I'm aware of.

The problem with it is not only fact that the game window needs to be focused (since SendMessage doesn't work, you have to use SendInput), it also requires to have specific key bind set, which is very inconvenient to control from add-on. It doesn't let you set specific state (true / false) but instead toggles it, which leaves no other choice for add-on developer than trusting user that variable's state is either of these, if we want to set it to the other.

Another useful API would be ability to select current preset with a function, and ability to dynamically create presets from an add-on to render selected effects.

Please Log in or Create an account to join the conversation.

More
1 day 13 hours ago - 1 day 13 hours ago #2 by crosire
Replied by crosire on topic Add ability to control presets and effects
Added in github.com/crosire/reshade/commit/68e48e...b943d2fe07cdb26c4188.

reshade::api::effect_runtime *runtime = ...;

// Disable all effects
runtime->set_effects_state(false);

// Set a uniform variable in the MyPreset1.ini preset and then switch back to MyPreset2.ini
runtime->set_current_preset_path("MyPreset1.ini");
runtime->set_uniform_value_int(...);

runtime->set_current_preset_path("MyPreset2.ini");
Last edit: 1 day 13 hours ago by crosire.
The following user(s) said Thank You: akuvfx

Please Log in or Create an account to join the conversation.