| 241 | } |
| 242 | |
| 243 | static obs_weak_canvas_t *getWeakRefToMainCanvas() |
| 244 | { |
| 245 | static auto canvas = obs_get_main_canvas(); |
| 246 | static auto weakCanvas = obs_canvas_get_weak_canvas(canvas); |
| 247 | [[maybe_unused]] static const bool _ = []() { |
| 248 | // Let's just hope we don't have to deal with selecting scenes |
| 249 | // when the OBS main canvas gets deleted and release the |
| 250 | // references here already to avoid reporting leaks on shutdown |
| 251 | obs_canvas_release(canvas); |
| 252 | obs_weak_canvas_release(weakCanvas); |
| 253 | return true; |
| 254 | }(); |
| 255 | return weakCanvas; |
| 256 | } |
| 257 | |
| 258 | SceneSelection SceneSelectionWidget::CurrentSelection() |
| 259 | { |
no test coverage detected