本文整理汇总了C++中common::Flag类的典型用法代码示例。如果您正苦于以下问题:C++ Flag类的具体用法?C++ Flag怎么用?C++ Flag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Flag类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Video_AccessEFB
u32 VideoBackendHardware::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
{
if (s_BackendInitialized && g_ActiveConfig.bEFBAccessEnable)
{
s_accessEFBArgs.type = type;
s_accessEFBArgs.x = x;
s_accessEFBArgs.y = y;
s_accessEFBArgs.Data = InputData;
s_efbAccessRequested.Set();
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
{
s_efbAccessReadyEvent.Reset();
if (s_FifoShuttingDown.IsSet())
return 0;
s_efbAccessRequested.Set();
s_efbAccessReadyEvent.Wait();
}
else
VideoFifo_CheckEFBAccess();
return s_AccessEFBResult;
}
return 0;
}
示例2: DVDThread
static void DVDThread()
{
Common::SetCurrentThreadName("DVD thread");
while (true)
{
s_request_queue_expanded.Wait();
if (s_dvd_thread_exiting.IsSet())
return;
ReadRequest request;
while (s_request_queue.Pop(request))
{
FileMonitor::Log(*s_disc, request.partition, request.dvd_offset);
std::vector<u8> buffer(request.length);
if (!s_disc->Read(request.dvd_offset, request.length, buffer.data(), request.partition))
buffer.resize(0);
request.realtime_done_us = Common::Timer::GetTimeUs();
s_result_queue.Push(ReadResult(std::move(request), std::move(buffer)));
s_result_queue_expanded.Set();
if (s_dvd_thread_exiting.IsSet())
return;
}
}
}
示例3: VideoFifo_CheckPerfQueryRequest
static void VideoFifo_CheckPerfQueryRequest()
{
if (s_perfQueryRequested.IsSet())
{
g_perf_query->FlushResults();
s_perfQueryRequested.Clear();
s_perfQueryReadyEvent.Set();
}
}
示例4: VideoFifo_CheckEFBAccess
void VideoFifo_CheckEFBAccess()
{
if (s_efbAccessRequested.IsSet())
{
s_AccessEFBResult = g_renderer->AccessEFB(s_accessEFBArgs.type, s_accessEFBArgs.x, s_accessEFBArgs.y, s_accessEFBArgs.Data);
s_efbAccessRequested.Clear();
s_efbAccessReadyEvent.Set();
}
}
示例5: VideoFifo_CheckSwapRequest
// Run from the graphics thread (from Fifo.cpp)
static void VideoFifo_CheckSwapRequest()
{
if (g_ActiveConfig.bUseXFB)
{
if (s_swapRequested.IsSet())
{
EFBRectangle rc;
Renderer::Swap(s_beginFieldArgs.xfbAddr, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight,rc);
s_swapRequested.Clear();
}
}
}
示例6: InitializeShared
void VideoBackendHardware::InitializeShared()
{
VideoCommon_Init();
s_swapRequested.Clear();
s_efbAccessRequested.Clear();
s_perfQueryRequested.Clear();
s_FifoShuttingDown.Clear();
memset((void*)&s_beginFieldArgs, 0, sizeof(s_beginFieldArgs));
memset(&s_accessEFBArgs, 0, sizeof(s_accessEFBArgs));
s_AccessEFBResult = 0;
m_invalid = false;
}
示例7: Video_ExitLoop
void VideoBackendHardware::Video_ExitLoop()
{
ExitGpuLoop();
s_FifoShuttingDown.Set();
s_efbAccessReadyEvent.Set();
s_perfQueryReadyEvent.Set();
}
示例8: Video_EndField
// Run from the CPU thread (from VideoInterface.cpp)
void VideoBackendHardware::Video_EndField()
{
if (s_BackendInitialized)
{
s_swapRequested.Set();
}
}
示例9: Host_Message
void Host_Message(int Id)
{
if (Id == WM_USER_STOP)
{
s_running.Clear();
updateMainFrameEvent.Set();
}
}
示例10: MainLoop
virtual void MainLoop()
{
while (s_running.IsSet())
{
Core::HostDispatchJobs();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
示例11: InitializeShared
void VideoBackendHardware::InitializeShared()
{
VideoCommon_Init();
s_FifoShuttingDown.Clear();
memset((void*)&s_beginFieldArgs, 0, sizeof(s_beginFieldArgs));
m_invalid = false;
}
示例12: signal_handler
static void signal_handler(int)
{
const char message[] = "A signal was received. A second signal will force Dolphin to stop.\n";
if (write(STDERR_FILENO, message, sizeof(message)) < 0)
{
}
s_shutdown_requested.Set();
}
示例13: EmulatorState
void EmulatorState(bool running)
{
s_emu_running_state.Set(running);
if (running)
s_gpu_mainloop.Wakeup();
else
s_gpu_mainloop.AllowSleep();
}
示例14: ExitGpuLoop
// May be executed from any thread, even the graphics thread.
// Created to allow for self shutdown.
void ExitGpuLoop()
{
// This should break the wait loop in CPU thread
CommandProcessor::fifo.bFF_GPReadEnable = false;
FlushGpu();
// Terminate GPU thread loop
s_emu_running_state.Set();
s_gpu_mainloop.Stop(false);
}
示例15: Shutdown
void HiresTexture::Shutdown()
{
if (s_prefetcher.joinable())
{
s_textureCacheAbortLoading.Set();
s_prefetcher.join();
}
s_textureMap.clear();
s_textureCache.clear();
}