summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-08-04 15:18:24 -0400
committerGitHub <noreply@github.com>2016-08-04 15:18:24 -0400
commitd6df861e8ebfffd31a7b498ea8e979e48ae143ed (patch)
treea6b294eae1ddf0cf9511829ac8ac6ce7bfe918d1 /Source
parente98875949c1fa70d3eb92ed0f618b7dd28048a2e (diff)
parent2bdc3ee777131d896d3b170855b61f1f4dab6fad (diff)
Merge pull request #4089 from RisingFog/remove_globals_saveslot
Remove Global Declarations from Frame
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp6
-rw-r--r--Source/Core/DolphinWX/Frame.h2
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp10
3 files changed, 8 insertions, 10 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index e918db9b59..28ef4c1386 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -66,8 +66,6 @@
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
-int g_saveSlot = 1;
-
#if defined(HAVE_X11) && HAVE_X11
// X11Utils nastiness that's only used here
namespace X11Utils
@@ -1528,11 +1526,11 @@ void CFrame::ParseHotkeys()
}
if (IsHotkey(HK_SAVE_STATE_SLOT_SELECTED))
{
- State::Save(g_saveSlot);
+ State::Save(m_saveSlot);
}
if (IsHotkey(HK_LOAD_STATE_SLOT_SELECTED))
{
- State::Load(g_saveSlot);
+ State::Load(m_saveSlot);
}
if (IsHotkey(HK_TOGGLE_STEREO_SBS))
diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h
index 067d80675e..cbcee5e374 100644
--- a/Source/Core/DolphinWX/Frame.h
+++ b/Source/Core/DolphinWX/Frame.h
@@ -158,6 +158,7 @@ private:
bool m_bGameLoading;
bool m_bClosing;
bool m_confirmStop;
+ int m_saveSlot = 1;
std::vector<std::string> drives;
@@ -347,4 +348,3 @@ void OnStoppedCallback();
void GCTASManipFunction(GCPadStatus* PadStatus, int controllerID);
void WiiTASManipFunction(u8* data, WiimoteEmu::ReportFeatures rptf, int controllerID, int ext,
const wiimote_key key);
-extern int g_saveSlot;
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index b3689e9ab5..b27a7a8de5 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -1673,9 +1673,9 @@ void CFrame::OnFrameSkip(wxCommandEvent& event)
void CFrame::OnSelectSlot(wxCommandEvent& event)
{
- g_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1;
- Core::DisplayMessage(StringFromFormat("Selected slot %d - %s", g_saveSlot,
- State::GetInfoStringOfSlot(g_saveSlot).c_str()),
+ m_saveSlot = event.GetId() - IDM_SELECT_SLOT_1 + 1;
+ Core::DisplayMessage(StringFromFormat("Selected slot %d - %s", m_saveSlot,
+ State::GetInfoStringOfSlot(m_saveSlot).c_str()),
2500);
}
@@ -1683,7 +1683,7 @@ void CFrame::OnLoadCurrentSlot(wxCommandEvent& event)
{
if (Core::IsRunningAndStarted())
{
- State::Load(g_saveSlot);
+ State::Load(m_saveSlot);
}
}
@@ -1691,7 +1691,7 @@ void CFrame::OnSaveCurrentSlot(wxCommandEvent& event)
{
if (Core::IsRunningAndStarted())
{
- State::Save(g_saveSlot);
+ State::Save(m_saveSlot);
}
}