From 7e535b28554145c9497853c0255d7db088ceb126 Mon Sep 17 00:00:00 2001 From: JDV Date: Wed, 3 Aug 2016 14:20:38 -0600 Subject: Make Dolphin remember the NetPlay window size/position The default size might be too big for some screens. This allows the user to modify the window as they see fit and has Dolphin remember those settings. People who are happy with the default size and position will not be affected --- Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp') diff --git a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp index a1126429d6..c20ebdde92 100644 --- a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp +++ b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp @@ -324,6 +324,24 @@ void NetPlaySetupFrame::MakeNetPlayDiag(int port, const std::string& game, bool trav, centralServer, (u16)centralPort); if (netplay_client->IsConnected()) { + int winPosX, winPosY, winWidth, winHeight; + + // Remember the window size and position for NetWindow + netplay_section.Get("NetWindowPosX", &winPosX, -1); + netplay_section.Get("NetWindowPosY", &winPosY, -1); + netplay_section.Get("NetWindowWidth", &winWidth, 768); + netplay_section.Get("NetWindowHeight", &winHeight, 768 - 128); + + if (winPosX == -1 || winPosY == -1) + { + npd->SetSize(768, 768 - 128); + npd->Center(); + } + else + { + npd->SetSize(winPosX, winPosY, winWidth, winHeight); + } + npd->Show(); Destroy(); } -- cgit v1.2.3