summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-08-16 01:08:51 -0400
committerLioncash <mathew1800@gmail.com>2015-08-17 21:56:48 -0400
commitca0b9481ea2be14032d4599bae3bc243f87b2179 (patch)
tree68167e94190ba19d6d893b39d977b29756fbf63c /Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp
parentaf35f38491e39e5b030a55784f3a247d3453d7ba (diff)
ChangeGameDialog: Internally set the chosen game name
Passing in a reference to an empty string is unnecessary and overcomplicates design.
Diffstat (limited to 'Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp')
-rw-r--r--Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp b/Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp
index 57da50a65d..98f6dec441 100644
--- a/Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp
+++ b/Source/Core/DolphinWX/NetPlay/ChangeGameDialog.cpp
@@ -9,9 +9,8 @@
#include "DolphinWX/NetPlay/ChangeGameDialog.h"
#include "DolphinWX/NetPlay/NetWindow.h"
-ChangeGameDialog::ChangeGameDialog(wxWindow* parent, const CGameListCtrl* const game_list, wxString& game_name)
+ChangeGameDialog::ChangeGameDialog(wxWindow* parent, const CGameListCtrl* const game_list)
: wxDialog(parent, wxID_ANY, _("Change Game"))
- , m_game_name(game_name)
{
m_game_lbox = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT);
m_game_lbox->Bind(wxEVT_LISTBOX_DCLICK, &ChangeGameDialog::OnPick, this);
@@ -29,9 +28,13 @@ ChangeGameDialog::ChangeGameDialog(wxWindow* parent, const CGameListCtrl* const
SetFocus();
}
+wxString ChangeGameDialog::GetChosenGameName() const
+{
+ return m_game_name;
+}
+
void ChangeGameDialog::OnPick(wxCommandEvent& event)
{
- // return the selected game name
m_game_name = m_game_lbox->GetStringSelection();
EndModal(wxID_OK);
}