Remove Global Declarations from Frame

This commit is contained in:
Chris Burgener 2016-08-04 13:41:28 -04:00
parent e98875949c
commit 2bdc3ee777
3 changed files with 8 additions and 10 deletions

View File

@ -66,8 +66,6 @@
#include "VideoCommon/VertexShaderManager.h" #include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"
int g_saveSlot = 1;
#if defined(HAVE_X11) && HAVE_X11 #if defined(HAVE_X11) && HAVE_X11
// X11Utils nastiness that's only used here // X11Utils nastiness that's only used here
namespace X11Utils namespace X11Utils
@ -1528,11 +1526,11 @@ void CFrame::ParseHotkeys()
} }
if (IsHotkey(HK_SAVE_STATE_SLOT_SELECTED)) if (IsHotkey(HK_SAVE_STATE_SLOT_SELECTED))
{ {
State::Save(g_saveSlot); State::Save(m_saveSlot);
} }
if (IsHotkey(HK_LOAD_STATE_SLOT_SELECTED)) if (IsHotkey(HK_LOAD_STATE_SLOT_SELECTED))
{ {
State::Load(g_saveSlot); State::Load(m_saveSlot);
} }
if (IsHotkey(HK_TOGGLE_STEREO_SBS)) if (IsHotkey(HK_TOGGLE_STEREO_SBS))

View File

@ -158,6 +158,7 @@ private:
bool m_bGameLoading; bool m_bGameLoading;
bool m_bClosing; bool m_bClosing;
bool m_confirmStop; bool m_confirmStop;
int m_saveSlot = 1;
std::vector<std::string> drives; std::vector<std::string> drives;
@ -347,4 +348,3 @@ void OnStoppedCallback();
void GCTASManipFunction(GCPadStatus* PadStatus, int controllerID); void GCTASManipFunction(GCPadStatus* PadStatus, int controllerID);
void WiiTASManipFunction(u8* data, WiimoteEmu::ReportFeatures rptf, int controllerID, int ext, void WiiTASManipFunction(u8* data, WiimoteEmu::ReportFeatures rptf, int controllerID, int ext,
const wiimote_key key); const wiimote_key key);
extern int g_saveSlot;

View File

@ -1673,9 +1673,9 @@ void CFrame::OnFrameSkip(wxCommandEvent& event)
void CFrame::OnSelectSlot(wxCommandEvent& event) void CFrame::OnSelectSlot(wxCommandEvent& event)
{ {
g_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1; m_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1;
Core::DisplayMessage(StringFromFormat("Selected slot %d - %s", g_saveSlot, Core::DisplayMessage(StringFromFormat("Selected slot %d - %s", m_saveSlot,
State::GetInfoStringOfSlot(g_saveSlot).c_str()), State::GetInfoStringOfSlot(m_saveSlot).c_str()),
2500); 2500);
} }
@ -1683,7 +1683,7 @@ void CFrame::OnLoadCurrentSlot(wxCommandEvent& event)
{ {
if (Core::IsRunningAndStarted()) if (Core::IsRunningAndStarted())
{ {
State::Load(g_saveSlot); State::Load(m_saveSlot);
} }
} }
@ -1691,7 +1691,7 @@ void CFrame::OnSaveCurrentSlot(wxCommandEvent& event)
{ {
if (Core::IsRunningAndStarted()) if (Core::IsRunningAndStarted())
{ {
State::Save(g_saveSlot); State::Save(m_saveSlot);
} }
} }