Add ability to control presets and effects

  • akuvfx
  • Topic Author
More
3 years 1 month ago #1 by akuvfx Add ability to control presets and effects was created 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.

  • crosire
More
3 years 1 month ago - 3 years 1 month 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: 3 years 1 month ago by crosire.
The following user(s) said Thank You: akuvfx

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.