Netplay / Qt: Added spectator option to join netplay session dialog.

This commit is contained in:
Jamie Meyer 2023-05-30 23:56:36 +02:00
parent 1bdeb7a507
commit 932f6f1b55
No known key found for this signature in database
GPG Key ID: BF30D71B2F1305C7
3 changed files with 30 additions and 6 deletions

View File

@ -159,6 +159,10 @@ static std::bitset<MAX_PLAYERS> s_reset_players;
static Common::Timer s_reset_start_time;
static Common::Timer s_last_host_connection_attempt;
// Spectators
static std::array<Peer, MAX_SPECTATORS> s_spectators;
static bool s_local_spectating;
/// GGPO
static std::string s_local_nickname;
static std::string s_local_session_password;

View File

@ -10,6 +10,9 @@ enum : s32
// Maximum number of emulated controllers.
MAX_PLAYERS = 2,
// Maximum number of spectators allowed to watch the session.
MAX_SPECTATORS = 4,
// Maximum netplay prediction frames
MAX_ROLLBACK_FRAMES = 8,

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>480</width>
<height>220</height>
<height>226</height>
</rect>
</property>
<property name="windowTitle">
@ -146,11 +146,28 @@
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="spectating">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Enable Spectator Mode</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>