diff --git a/libobs/obs-video.c b/libobs/obs-video.c index 4b82aa366..207ff1453 100644 --- a/libobs/obs-video.c +++ b/libobs/obs-video.c @@ -24,6 +24,11 @@ #include "media-io/format-conversion.h" #include "media-io/video-frame.h" +#ifdef _WIN32 +#define WIN32_MEAN_AND_LEAN +#include +#endif + static uint64_t tick_sources(uint64_t cur_time, uint64_t last_time) { struct obs_core_data *data = &obs->data; @@ -874,6 +879,14 @@ void *obs_graphics_thread(void *param) last_time = tick_sources(obs->video.video_time, last_time); profile_end(tick_sources_name); +#ifdef _WIN32 + MSG msg; + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } +#endif + profile_start(output_frame_name); output_frame(raw_active, gpu_active); profile_end(output_frame_name);