Settings: Add netplay layer
This commit is contained in:
parent
bdebd8bdef
commit
fd6aeefd93
|
@ -10,6 +10,7 @@ class LayeredSettingsInterface final : public SettingsInterface
|
|||
public:
|
||||
enum Layer : u32
|
||||
{
|
||||
LAYER_NETPLAY,
|
||||
LAYER_CMDLINE,
|
||||
LAYER_GAME,
|
||||
LAYER_INPUT,
|
||||
|
@ -61,7 +62,7 @@ public:
|
|||
using SettingsInterface::GetUIntValue;
|
||||
|
||||
private:
|
||||
static constexpr Layer FIRST_LAYER = LAYER_CMDLINE;
|
||||
static constexpr Layer FIRST_LAYER = LAYER_NETPLAY;
|
||||
static constexpr Layer LAST_LAYER = LAYER_BASE;
|
||||
|
||||
std::array<SettingsInterface*, NUM_LAYERS> m_layers{};
|
||||
|
|
|
@ -69,5 +69,8 @@ void SetGameSettingsLayer(SettingsInterface* sif);
|
|||
|
||||
/// Sets the input profile settings layer. Called by VMManager when the game changes.
|
||||
void SetInputSettingsLayer(SettingsInterface* sif);
|
||||
|
||||
/// Sets the netplay settings layer. Use once a session is established.
|
||||
void SetNetplaySettingsLayer(SettingsInterface* sif);
|
||||
} // namespace Internal
|
||||
} // namespace Host
|
|
@ -190,3 +190,9 @@ void Host::Internal::SetInputSettingsLayer(SettingsInterface* sif)
|
|||
std::unique_lock lock(s_settings_mutex);
|
||||
s_layered_settings_interface.SetLayer(LayeredSettingsInterface::LAYER_INPUT, sif);
|
||||
}
|
||||
|
||||
void Host::Internal::SetNetplaySettingsLayer(SettingsInterface* sif)
|
||||
{
|
||||
std::unique_lock lock(s_settings_mutex);
|
||||
s_layered_settings_interface.SetLayer(LayeredSettingsInterface::LAYER_NETPLAY, sif);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue