ReShade
A generic post-processing injector for games and video software.
Namespaces | Macros | Enumerations | Functions
reshade.hpp File Reference
#include "reshade_events.hpp"
#include "reshade_overlay.hpp"
#include <charconv>
#include <Windows.h>

Go to the source code of this file.

Namespaces

 reshade
 
 reshade::internal
 
 reshade::log
 

Macros

#define RESHADE_API_VERSION
 

Enumerations

enum class  reshade::log::level { reshade::log::error , reshade::log::warning , reshade::log::info , reshade::log::debug }
 Severity levels for logging. More...
 

Functions

BOOL WINAPI K32EnumProcessModules (HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded)
 
HMODULE reshade::internal::get_reshade_module_handle (HMODULE initial_handle=nullptr)
 Gets the handle to the ReShade module. More...
 
HMODULE reshade::internal::get_current_module_handle (HMODULE initial_handle=nullptr)
 Gets the handle to the current add-on module. More...
 
void reshade::log::message (level level, const char *message)
 Writes a message to ReShade's log. More...
 
void reshade::get_reshade_base_path (char *path, size_t *path_size)
 Gets the base path ReShade uses to resolve relative paths. More...
 
bool reshade::get_config_value (api::effect_runtime *runtime, const char *section, const char *key, char *value, size_t *value_size)
 Gets a value from one of ReShade's config files. This can use either the global config file (ReShade.ini next to the application executable), or one local to an effect runtime (ReShade[index].ini in the base path). More...
 
void reshade::set_config_value (api::effect_runtime *runtime, const char *section, const char *key, const char *value)
 Sets and saves a value in one of ReShade's config files. This can use either the global config file (ReShade.ini next to the application executable), or one local to an effect runtime (ReShade[index].ini in the base path). More...
 
void reshade::set_config_value (api::effect_runtime *runtime, const char *section, const char *key, const char *value, size_t value_size)
 
bool reshade::register_addon (HMODULE addon_module, [[maybe_unused]] HMODULE reshade_module=nullptr)
 Registers this module as an add-on with ReShade. Call this in 'AddonInit' or 'DllMain' during process attach, before any of the other API functions! More...
 
void reshade::unregister_addon (HMODULE addon_module, [[maybe_unused]] HMODULE reshade_module=nullptr)
 Unregisters this module as an add-on. Call this in 'AddonUninit' or 'DllMain' during process detach, after any of the other API functions. More...
 
template<addon_event ev>
void reshade::register_event (typename addon_event_traits< ev >::decl callback)
 Registers a callback for the specified event with ReShade. More...
 
template<addon_event ev>
void reshade::unregister_event (typename addon_event_traits< ev >::decl callback)
 Unregisters a callback from the specified event that was previously registered via register_event. More...
 
void reshade::register_overlay (const char *title, void(*callback)(api::effect_runtime *runtime))
 Registers an overlay with ReShade. More...
 
void reshade::unregister_overlay (const char *title, void(*callback)(api::effect_runtime *runtime))
 Unregisters an overlay that was previously registered via register_overlay. More...
 
bool reshade::create_effect_runtime (reshade::api::device_api api, void *device, void *command_queue, void *swapchain, const char *config_path, reshade::api::effect_runtime **out_runtime)
 Creates a new effect runtime for an existing swapchain, for when it was not already hooked by ReShade (e.g. because the RESHADE_DISABLE_GRAPHICS_HOOK environment variable is set). More...
 
void reshade::destroy_effect_runtime (api::effect_runtime *runtime)
 Instantly destroys an effect runtime that was previously created via create_effect_runtime. Do not call this with effect runtimes that were automatically created by ReShade! More...
 
void reshade::update_and_present_effect_runtime (api::effect_runtime *runtime)
 Updates and renders an effect runtime onto the current back buffer of the swap chain it was created with. Do not call this with effect runtimes that were automatically created by ReShade! More...
 

Macro Definition Documentation

◆ RESHADE_API_VERSION

#define RESHADE_API_VERSION

Function Documentation

◆ K32EnumProcessModules()

BOOL WINAPI K32EnumProcessModules ( HANDLE  hProcess,
HMODULE *  lphModule,
DWORD  cb,
LPDWORD  lpcbNeeded 
)