libobs: Pump Win32 messages on the graphics thread
Necessary for upcoming Windows Graphics Capture support.master
parent
f27f858ab3
commit
82cdc6e8c6
|
@ -24,6 +24,11 @@
|
||||||
#include "media-io/format-conversion.h"
|
#include "media-io/format-conversion.h"
|
||||||
#include "media-io/video-frame.h"
|
#include "media-io/video-frame.h"
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define WIN32_MEAN_AND_LEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static uint64_t tick_sources(uint64_t cur_time, uint64_t last_time)
|
static uint64_t tick_sources(uint64_t cur_time, uint64_t last_time)
|
||||||
{
|
{
|
||||||
struct obs_core_data *data = &obs->data;
|
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);
|
last_time = tick_sources(obs->video.video_time, last_time);
|
||||||
profile_end(tick_sources_name);
|
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);
|
profile_start(output_frame_name);
|
||||||
output_frame(raw_active, gpu_active);
|
output_frame(raw_active, gpu_active);
|
||||||
profile_end(output_frame_name);
|
profile_end(output_frame_name);
|
||||||
|
|
Loading…
Reference in New Issue