Remove some static variables that aren't needed

This commit is contained in:
baldurk
2022-02-24 19:00:34 +00:00
parent 6bd8bcee60
commit b17ea43b65
2 changed files with 7 additions and 12 deletions
+4 -10
View File
@@ -275,12 +275,9 @@ rdcstr DoStringise(const SystemChunk &el)
END_ENUM_STRINGISE();
}
RenderDoc *RenderDoc::m_Inst = NULL;
RenderDoc &RenderDoc::Inst()
{
static RenderDoc realInst;
RenderDoc::m_Inst = &realInst;
return realInst;
}
@@ -888,9 +885,6 @@ bool RenderDoc::ShowReplayUI()
void RenderDoc::Tick()
{
static bool prev_focus = false;
static bool prev_cap = false;
bool cur_focus = false;
for(size_t i = 0; i < m_FocusKeys.size(); i++)
cur_focus |= Keyboard::GetKeyState(m_FocusKeys[i]);
@@ -901,17 +895,17 @@ void RenderDoc::Tick()
m_FrameTimer.UpdateTimers();
if(!prev_focus && cur_focus)
if(!m_PrevFocus && cur_focus)
{
CycleActiveWindow();
}
if(!prev_cap && cur_cap)
if(!m_PrevCap && cur_cap)
{
TriggerCapture(1);
}
prev_focus = cur_focus;
prev_cap = cur_cap;
m_PrevFocus = cur_focus;
m_PrevCap = cur_cap;
// check for any child threads that need to be waited on, remove them from the list
rdcarray<Threading::ThreadHandle> waitThreads;
+3 -2
View File
@@ -591,12 +591,13 @@ private:
void SyncAvailableGPUThread();
static RenderDoc *m_Inst;
bool m_Replay;
uint32_t m_Cap;
bool m_PrevFocus = false;
bool m_PrevCap = false;
rdcarray<RENDERDOC_InputButton> m_FocusKeys;
rdcarray<RENDERDOC_InputButton> m_CaptureKeys;