MCPcopy Create free account
hub / github.com/InoriRus/Kyty / Open

Method Open

source/emulator/src/Graphics/VideoOut.cpp:277–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277int VideoOutContext::Open()
278{
279 Core::LockGuard lock(m_mutex);
280
281 int handle = -1;
282
283 for (int i = 1; i < VIDEO_OUT_NUM_MAX; i++)
284 {
285 if (!m_video_out_ctx[i].opened)
286 {
287 handle = i;
288 break;
289 }
290 }
291
292 EXIT_IF(!m_video_out_ctx[handle].flip_eqs.IsEmpty());
293 EXIT_IF(!m_video_out_ctx[handle].pre_vblank_eqs.IsEmpty());
294 EXIT_IF(!m_video_out_ctx[handle].vblank_eqs.IsEmpty());
295 EXIT_IF(m_video_out_ctx[handle].flip_rate != 0);
296
297 m_video_out_ctx[handle].opened = true;
298 m_video_out_ctx[handle].flip_status = VideoOutFlipStatus();
299 m_video_out_ctx[handle].flip_status.flipArg = -1;
300 m_video_out_ctx[handle].flip_status.currentBuffer = -1;
301 m_video_out_ctx[handle].flip_status.count = 0;
302 m_video_out_ctx[handle].pre_vblank_status = VideoOutVblankStatus();
303 m_video_out_ctx[handle].vblank_status = VideoOutVblankStatus();
304
305 return handle;
306}
307
308void VideoOutContext::Close(int handle)
309{

Callers 4

VideoOutOpenFunction · 0.45
LoadMethod · 0.45
GetSizeMethod · 0.45
DbgDbSaveMethod · 0.45

Calls 3

VideoOutFlipStatusClass · 0.70
IsEmptyMethod · 0.45

Tested by

no test coverage detected