mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoBackend: Get rid of a boolean global
Also gets rid of global headers
This commit is contained in:
@ -2,19 +2,16 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
#include "VideoCommon/AsyncRequests.h"
|
||||
#include "VideoCommon/BoundingBox.h"
|
||||
#include "VideoCommon/BPStructs.h"
|
||||
#include "VideoCommon/CommandProcessor.h"
|
||||
#include "VideoCommon/Fifo.h"
|
||||
#include "VideoCommon/FramebufferManagerBase.h"
|
||||
#include "VideoCommon/MainBase.h"
|
||||
#include "VideoCommon/OnScreenDisplay.h"
|
||||
#include "VideoCommon/PixelEngine.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/TextureCacheBase.h"
|
||||
#include "VideoCommon/VertexLoaderManager.h"
|
||||
@ -22,8 +19,6 @@
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
#include "VideoCommon/VideoState.h"
|
||||
|
||||
bool s_BackendInitialized = false;
|
||||
|
||||
static Common::Flag s_FifoShuttingDown;
|
||||
|
||||
static volatile struct
|
||||
@ -59,7 +54,7 @@ void VideoBackendHardware::Video_SetRendering(bool bEnabled)
|
||||
// Run from the CPU thread (from VideoInterface.cpp)
|
||||
void VideoBackendHardware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight)
|
||||
{
|
||||
if (s_BackendInitialized && g_ActiveConfig.bUseXFB)
|
||||
if (m_initialized && g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
s_beginFieldArgs.xfbAddr = xfbAddr;
|
||||
s_beginFieldArgs.fbWidth = fbWidth;
|
||||
@ -71,7 +66,7 @@ void VideoBackendHardware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStri
|
||||
// Run from the CPU thread (from VideoInterface.cpp)
|
||||
void VideoBackendHardware::Video_EndField()
|
||||
{
|
||||
if (s_BackendInitialized && g_ActiveConfig.bUseXFB && g_renderer)
|
||||
if (m_initialized && g_ActiveConfig.bUseXFB && g_renderer)
|
||||
{
|
||||
SyncGPU(SYNC_GPU_SWAP);
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
// Copyright 2010 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Flag.h"
|
||||
|
||||
extern bool s_BackendInitialized;
|
@ -17,7 +17,6 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Atomic.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Common/Profiler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
@ -36,11 +35,8 @@
|
||||
#include "VideoCommon/CommandProcessor.h"
|
||||
#include "VideoCommon/CPMemory.h"
|
||||
#include "VideoCommon/Debugger.h"
|
||||
#include "VideoCommon/Fifo.h"
|
||||
#include "VideoCommon/FPSCounter.h"
|
||||
#include "VideoCommon/FramebufferManagerBase.h"
|
||||
#include "VideoCommon/MainBase.h"
|
||||
#include "VideoCommon/OpcodeDecoding.h"
|
||||
#include "VideoCommon/PostProcessing.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/Statistics.h"
|
||||
|
@ -10,13 +10,11 @@
|
||||
#include "VideoCommon/Debugger.h"
|
||||
#include "VideoCommon/GeometryShaderManager.h"
|
||||
#include "VideoCommon/IndexGenerator.h"
|
||||
#include "VideoCommon/MainBase.h"
|
||||
#include "VideoCommon/NativeVertexFormat.h"
|
||||
#include "VideoCommon/OpcodeDecoding.h"
|
||||
#include "VideoCommon/PerfQueryBase.h"
|
||||
#include "VideoCommon/PixelShaderManager.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/Statistics.h"
|
||||
#include "VideoCommon/TextureCacheBase.h"
|
||||
#include "VideoCommon/VertexLoaderManager.h"
|
||||
#include "VideoCommon/VertexManagerBase.h"
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
|
||||
virtual unsigned int PeekMessages() = 0;
|
||||
|
||||
virtual bool Initialize(void *window_handle) = 0;
|
||||
virtual bool Initialize(void* window_handle) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
virtual void RunLoop(bool enable) = 0;
|
||||
|
||||
@ -115,6 +115,9 @@ public:
|
||||
virtual void CheckInvalidState() = 0;
|
||||
|
||||
virtual void UpdateWantDeterminism(bool want) {}
|
||||
|
||||
protected:
|
||||
bool m_initialized = false;
|
||||
};
|
||||
|
||||
extern std::vector<VideoBackend*> g_available_video_backends;
|
||||
|
@ -104,7 +104,6 @@
|
||||
<ClInclude Include="IndexGenerator.h" />
|
||||
<ClInclude Include="LightingShaderGen.h" />
|
||||
<ClInclude Include="LookUpTables.h" />
|
||||
<ClInclude Include="MainBase.h" />
|
||||
<ClInclude Include="NativeVertexFormat.h" />
|
||||
<ClInclude Include="OnScreenDisplay.h" />
|
||||
<ClInclude Include="OpcodeDecoding.h" />
|
||||
|
@ -173,9 +173,6 @@
|
||||
<ClInclude Include="FramebufferManagerBase.h">
|
||||
<Filter>Base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MainBase.h">
|
||||
<Filter>Base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PerfQueryBase.h">
|
||||
<Filter>Base</Filter>
|
||||
</ClInclude>
|
||||
|
Reference in New Issue
Block a user