| 223 | } |
| 224 | |
| 225 | void ReShadeDestroyEffectRuntime(reshade::api::effect_runtime *runtime) |
| 226 | { |
| 227 | if (runtime == nullptr) |
| 228 | return; |
| 229 | |
| 230 | reshade::api::device *const device = runtime->get_device(); |
| 231 | reshade::api::swapchain *const swapchain = static_cast<reshade::runtime *>(runtime)->get_swapchain(); |
| 232 | reshade::api::command_queue *const graphics_queue = runtime->get_command_queue(); |
| 233 | |
| 234 | static_cast<reshade::runtime *>(runtime)->on_reset(); |
| 235 | |
| 236 | delete static_cast<reshade::runtime *>(runtime); |
| 237 | |
| 238 | switch (device->get_api()) |
| 239 | { |
| 240 | case reshade::api::device_api::d3d9: |
| 241 | delete static_cast<reshade::d3d9::swapchain_impl *>(swapchain); |
| 242 | delete static_cast<reshade::d3d9::device_impl *>(device); |
| 243 | break; |
| 244 | case reshade::api::device_api::d3d10: |
| 245 | delete static_cast<reshade::d3d10::swapchain_impl *>(swapchain); |
| 246 | delete static_cast<reshade::d3d10::device_impl *>(device); |
| 247 | break; |
| 248 | case reshade::api::device_api::d3d11: |
| 249 | delete static_cast<reshade::d3d11::swapchain_impl *>(swapchain); |
| 250 | delete static_cast<reshade::d3d11::device_context_impl *>(graphics_queue); |
| 251 | delete static_cast<reshade::d3d11::device_impl *>(device); |
| 252 | break; |
| 253 | case reshade::api::device_api::d3d12: |
| 254 | delete static_cast<reshade::d3d12::swapchain_impl *>(swapchain); |
| 255 | delete static_cast<reshade::d3d12::command_queue_impl *>(graphics_queue); |
| 256 | delete static_cast<reshade::d3d12::device_impl *>(device); |
| 257 | break; |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | void ReShadeUpdateAndPresentEffectRuntime(reshade::api::effect_runtime *runtime) |
| 262 | { |
no test coverage detected