mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
NetPlayClient: Make the NetSettings instance part of the NetPlayClient class
This is only ever read from externally, so we can expose a getter that ensures that immutability, while making the actual instance internal. Given the filling out of these settings depends on packets received by the client instance, it makes more sense to make it a part of the client itself. This trims off one lingering global.
This commit is contained in:
@ -49,7 +49,6 @@ struct NetTraversalConfig
|
||||
u16 traversal_port = 0;
|
||||
};
|
||||
|
||||
extern NetSettings g_NetPlaySettings;
|
||||
extern u64 g_netplay_initial_rtc;
|
||||
|
||||
struct Rpt : public std::vector<u8>
|
||||
@ -112,4 +111,8 @@ using PadMapping = s8;
|
||||
using PadMappingArray = std::array<PadMapping, 4>;
|
||||
|
||||
bool IsNetPlayRunning();
|
||||
|
||||
// Precondition: A netplay client instance must be present. In other words,
|
||||
// IsNetPlayRunning() must be true before calling this.
|
||||
const NetSettings& GetNetSettings();
|
||||
} // namespace NetPlay
|
||||
|
Reference in New Issue
Block a user