Skip to content

ReStreet: FIFA Street (2012) recompiled for Windows PC, with online play, a launcher with friends, chat and rooms. Bring your own game.

Launcher 2.1.2: tournament check-in view, update checks, OneDrive and Mac fixes

SamuelitoDaVila9235354845d0
diff --git a/Launcher/FifaStreetLauncher.Linux/FifaStreetLauncher.Linux.csproj b/Launcher/FifaStreetLauncher.Linux/FifaStreetLauncher.Linux.csproj
index 42d815f..2ef6ca2 100644
--- a/Launcher/FifaStreetLauncher.Linux/FifaStreetLauncher.Linux.csproj
+++ b/Launcher/FifaStreetLauncher.Linux/FifaStreetLauncher.Linux.csproj
@@ -8,7 +8,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>restreet-launcher</AssemblyName>
<RootNamespace>FifaStreetLauncher.Linux</RootNamespace>
- <Version>2.1.1</Version>
+ <Version>2.1.2</Version>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
<ItemGroup>
diff --git a/Launcher/FifaStreetLauncher.Linux/Social.cs b/Launcher/FifaStreetLauncher.Linux/Social.cs
index 162ae11..8084132 100644
--- a/Launcher/FifaStreetLauncher.Linux/Social.cs
+++ b/Launcher/FifaStreetLauncher.Linux/Social.cs
@@ -240,6 +240,8 @@ internal sealed partial class Launcher
"tournament_full" => "The tournament is full",
"not_signed_up" => "Sign up first",
"checkin_not_open" => "Check-in opens 10 minutes before the start",
+ "real_team_required" => "Tournaments are played with real teams: pick a club or a national team",
+ "already_in_match" => "You already have a match waiting: play it first",
"unknown_action" or "route_not_found" => "This server does not have competitive play yet",
_ => "Could not do that: " + code,
};
diff --git a/Launcher/FifaStreetLauncher/BrowserUi.cs b/Launcher/FifaStreetLauncher/BrowserUi.cs
index 8e443a0..0f22e9b 100644
--- a/Launcher/FifaStreetLauncher/BrowserUi.cs
+++ b/Launcher/FifaStreetLauncher/BrowserUi.cs
@@ -34,6 +34,26 @@ public partial class LauncherForm
return ntdll != IntPtr.Zero && GetProcAddress(ntdll, "wine_get_version") != IntPtr.Zero;
}
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void WineHostVersion(out IntPtr sysname, out IntPtr release);
+
+ // Wine on macOS (CrossOver): the host is "Darwin". The Electron viewer there showed only a white window (2.1), while
+ // the Mac's own browser shows the launcher page fine, so on a Mac the page opens in the default browser.
+ internal static bool RunningOnMac()
+ {
+ IntPtr ntdll = GetModuleHandleA("ntdll.dll");
+ IntPtr fn = ntdll == IntPtr.Zero ? IntPtr.Zero : GetProcAddress(ntdll, "wine_get_host_version");
+ if (fn == IntPtr.Zero) return false;
+ try
+ {
+ Marshal.GetDelegateForFunctionPointer<WineHostVersion>(fn)(out IntPtr sysname, out _);
+ return Marshal.PtrToStringAnsi(sysname) == "Darwin";
+ }
+ catch (Exception ex) when (ex is MarshalDirectiveException or AccessViolationException or InvalidOperationException)
+ {
+ return false;
+ }
+ }
+
private bool PageConnected => glass?.CoreWebView2 != null || browserActive;
// Every message for the page goes through here, whichever way the page is shown.
@@ -62,7 +82,7 @@ public partial class LauncherForm
int port = ((IPEndPoint)browserListener.LocalEndpoint).Port;
_ = Task.Run(() => AcceptBrowserClients(ui));
string url = $"http://127.0.0.1:{port}/{browserSecret}/launcher.html";
- BrowserLog($"Launcher {LauncherVersion} ({Environment.ProcessPath}); wine={RunningOnWine()}; " +
+ BrowserLog($"Launcher {LauncherVersion} ({Environment.ProcessPath}); wine={RunningOnWine()}; mac={RunningOnMac()}; " +
$"viewer={(File.Exists(Path.Combine(AppContext.BaseDirectory, "Viewer", "ReStreetViewer.exe")) ? "found" : "missing")}");
bool appWindow = false;
try
@@ -186,8 +206,9 @@ public partial class LauncherForm
private bool OpenAppWindow(string url)
{
// The viewer is for Wine/Proton only. On Windows nothing below changes (RESTREET_VIEWER=1 forces it, for testing).
- if ((RunningOnWine() || Environment.GetEnvironmentVariable("RESTREET_VIEWER") == "1") && OpenViewer(url)) return true;
+ if ((RunningOnWine() || Environment.GetEnvironmentVariable("RESTREET_VIEWER") == "1") && !RunningOnMac() && OpenViewer(url)) return true;
string size = $"--window-size={Width},{Height}";
+ if (RunningOnMac()) return false; // no Linux browsers to look for: the Mac's default browser opens the page
if (RunningOnWine())
{
var unix = new List<string>();
diff --git a/Launcher/FifaStreetLauncher/FifaStreetLauncher.csproj b/Launcher/FifaStreetLauncher/FifaStreetLauncher.csproj
index fee9022..2b03977 100644
--- a/Launcher/FifaStreetLauncher/FifaStreetLauncher.csproj
+++ b/Launcher/FifaStreetLauncher/FifaStreetLauncher.csproj
@@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
- <Version>2.1.1</Version>
+ <Version>2.1.2</Version>
<ApplicationIcon>fifastreet.ico</ApplicationIcon>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
diff --git a/Launcher/FifaStreetLauncher/GlassUi.cs b/Launcher/FifaStreetLauncher/GlassUi.cs
index 09bf3ac..73c4895 100644
--- a/Launcher/FifaStreetLauncher/GlassUi.cs
+++ b/Launcher/FifaStreetLauncher/GlassUi.cs
@@ -85,7 +85,7 @@ public partial class LauncherForm
// Wine/Proton: WebView2 is not reliable there, so the same page opens in the system browser.
if (RunningOnWine() || Environment.GetEnvironmentVariable("RESTREET_BROWSER_UI") == "1")
{
- if (RunningOnWine()) await EnsureViewerAsync(); // first run on Proton: fetch the viewer once
+ if (RunningOnWine() && !RunningOnMac()) await EnsureViewerAsync(); // first run on Proton: fetch the viewer once
StartBrowserUi();
if (browserActive) StartPageServices();
RevealWindow();
@@ -562,6 +562,8 @@ public partial class LauncherForm
"tournament_full" => "The tournament is full",
"not_signed_up" => "Sign up first",
"checkin_not_open" => "Check-in opens 10 minutes before the start",
+ "real_team_required" => "Tournaments are played with real teams: pick a club or a national team",
+ "already_in_match" => "You already have a match waiting: play it first",
"unknown_action" or "route_not_found" => "This server does not have competitive play yet",
_ => "Could not do that: " + code,
};
diff --git a/Launcher/FifaStreetLauncher/LauncherForm.cs b/Launcher/FifaStreetLauncher/LauncherForm.cs
index fe1d1fd..cb6530c 100644
--- a/Launcher/FifaStreetLauncher/LauncherForm.cs
+++ b/Launcher/FifaStreetLauncher/LauncherForm.cs
@@ -153,7 +153,8 @@ public partial class LauncherForm : Form, ISceneHost, IUiScaled
scaler.Capture();
// Stay invisible until the new page has loaded, so the classic controls underneath never flash on screen.
if (Environment.GetEnvironmentVariable("RESTREET_CLASSIC_UI") != "1") Opacity = 0;
- Shown += (_, _) => { InitGlassUi(); _ = CheckForUpdateAsync(); };
+ // Direct play asks for updates itself, before the game starts (StartDirect).
+ Shown += (_, _) => { InitGlassUi(); if (!closeAfterGame) { StartUpdateChecks(); BeginInvoke(WarnOneDriveOnce); } };
}
// Layout on an 8 px grid (design pixels, window 1250 x 720): left column margin 48; glass sheet
@@ -1071,7 +1072,24 @@ displayModeBox.SelectedIndexChanged += (_, _) => { UpdateRefreshRates(); UpdateS
Opacity = 0;
StartPosition = FormStartPosition.Manual;
Location = new Point(-32000, -32000);
- Shown += (_, _) => LaunchGame();
+ Shown += async (_, _) =>
+ {
+ // The direct-play shortcut never showed an update (hidden window, the game already running): look first,
+ // briefly, and when there is one open the launcher with the offer instead of the game.
+ using var wait = new CancellationTokenSource(TimeSpan.FromSeconds(5));
+ if (await FindUpdateAsync(wait.Token))
+ {
+ closeAfterGame = false;
+ ShowInTaskbar = true;
+ Opacity = 1;
+ CenterToScreen();
+ Activate();
+ await Task.Delay(1500); // the page is loading in the window that just appeared
+ await OfferUpdateAsync();
+ return;
+ }
+ LaunchGame();
+ };
}
private void CreateDesktopShortcut()
@@ -1438,6 +1456,7 @@ startInfo.Environment["REX_DRAW_RESOLUTION_SCALE_Y"] =
if (!deck) ApplyMonitorRefresh(monitor, refresh, fullscreen ? width : 0, fullscreen ? height : 0);
EnsureStadiumThumbs(Path.GetDirectoryName(exe)!, gameRoot);
+ var started = DateTime.UtcNow;
using var process = Process.Start(startInfo);
gameRunning = process != null;
gameProcess = process;
@@ -1455,6 +1474,7 @@ startInfo.Environment["REX_DRAW_RESOLUTION_SCALE_Y"] =
await process.WaitForExitAsync();
OnSessionEnded(perfReport, logFile, perfSettings, process.ExitCode);
UpdateStatus(ReadyText(), true);
+ SuggestD3D12AfterVulkanCrash(graphicsApi, process.ExitCode, DateTime.UtcNow - started);
}
}
catch (Exception ex)
diff --git a/Launcher/FifaStreetLauncher/OneDriveWarning.cs b/Launcher/FifaStreetLauncher/OneDriveWarning.cs
new file mode 100644
index 0000000..fc2516d
--- /dev/null
+++ b/Launcher/FifaStreetLauncher/OneDriveWarning.cs
@@ -0,0 +1,54 @@
+namespace FifaStreetLauncher;
+
+// The game keeps its saves in Documents\fifastreet (the Windows Documents folder, wherever it points). When OneDrive
+// backs up Documents it can roll the save files back or hold them as online-only, and players lost their World Tour
+// careers. Warn once, in the player's language, with the fix.
+public partial class LauncherForm
+{
+ private static bool DocumentsInOneDrive()
+ {
+ string docs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
+ if (string.IsNullOrEmpty(docs)) return false;
+ foreach (string name in new[] { "OneDrive", "OneDriveConsumer", "OneDriveCommercial" })
+ {
+ string? root = Environment.GetEnvironmentVariable(name);
+ if (!string.IsNullOrEmpty(root) && docs.StartsWith(root.TrimEnd('\\') + "\\", StringComparison.OrdinalIgnoreCase))
+ return true;
+ }
+ return docs.Contains("\\OneDrive", StringComparison.OrdinalIgnoreCase);
+ }
+
+ private void WarnOneDriveOnce()
+ {
+ try
+ {
+ string marker = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+ "FifaStreetOnline", "onedrive-warned.txt");
+ if (File.Exists(marker) || !DocumentsInOneDrive()) return;
+ Directory.CreateDirectory(Path.GetDirectoryName(marker)!);
+ File.WriteAllText(marker, DateTime.UtcNow.ToString("o"));
+ string docs = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "fifastreet");
+ string lang = System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;
+ string text = lang switch
+ {
+ "pt" => "Sua pasta Documentos está no OneDrive. O jogo salva os saves em:\n" + docs +
+ "\n\nO OneDrive pode apagar ou trocar esses arquivos e fazer você perder o World Tour.\n\n" +
+ "Para evitar isso: no OneDrive, Configurações > Sincronizar e fazer backup > Gerenciar backup, " +
+ "desative a pasta Documentos. Antes, copie a pasta fifastreet para outro lugar por segurança.",
+ "es" => "Tu carpeta Documentos está en OneDrive. El juego guarda las partidas en:\n" + docs +
+ "\n\nOneDrive puede borrar o cambiar estos archivos y hacerte perder el World Tour.\n\n" +
+ "Para evitarlo: en OneDrive, Configuración > Sincronización y copia de seguridad > Administrar copia de seguridad, " +
+ "desactiva la carpeta Documentos. Antes, copia la carpeta fifastreet a otro sitio por seguridad.",
+ _ => "Your Documents folder is in OneDrive. The game keeps its saves in:\n" + docs +
+ "\n\nOneDrive can remove or swap these files and you can lose your World Tour career.\n\n" +
+ "To avoid it: in OneDrive, Settings > Sync and backup > Manage back up, turn off Documents. " +
+ "First copy the fifastreet folder somewhere else to be safe.",
+ };
+ MessageBox.Show(this, text, "ReStreet", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
+ {
+ // No warning is better than a launcher that fails to open.
+ }
+ }
+}
diff --git a/Launcher/FifaStreetLauncher/Updater.cs b/Launcher/FifaStreetLauncher/Updater.cs
index da610bb..2fc9888 100644
--- a/Launcher/FifaStreetLauncher/Updater.cs
+++ b/Launcher/FifaStreetLauncher/Updater.cs
@@ -10,7 +10,7 @@ namespace FifaStreetLauncher;
// name, key and server, and reopens the launcher) and closes the launcher. Only installs that have the online patch.
public partial class LauncherForm
{
- internal const string LauncherVersion = "2.1.1";
+ internal const string LauncherVersion = "2.1.2";
private const string ReleasesApi = "https://api.github.com/repos/samuelit0davila/fifa-street-pc-port/releases/latest";
private static readonly HttpClient UpdateHttp = CreateUpdateHttp();
private (string Version, string ExeUrl, string ShaUrl, string Notes)? pendingUpdate;
@@ -34,17 +34,38 @@ public partial class LauncherForm
Uri.TryCreate(url, UriKind.Absolute, out var u) && u.Scheme == "https" &&
(u.Host == "github.com" || u.Host.EndsWith(".githubusercontent.com", StringComparison.Ordinal));
+ private System.Windows.Forms.Timer? updateTimer;
+
+ // A launcher left open for days still hears about a new version: ask GitHub again every 2 hours (its API allows
+ // 60 requests an hour per address) until one is found.
+ private void StartUpdateChecks()
+ {
+ _ = CheckForUpdateAsync();
+ updateTimer = new System.Windows.Forms.Timer { Interval = 2 * 60 * 60 * 1000 };
+ updateTimer.Tick += (_, _) => { if (pendingUpdate == null) _ = CheckForUpdateAsync(); };
+ updateTimer.Start();
+ }
+
private async Task CheckForUpdateAsync()
{
- if (LoadOnlineConfig() == null) return; // offline installs update with the full installer
+ if (!await FindUpdateAsync()) return;
+ // The page may still be loading (it asks again with "state"); give it a moment to say whether it is up.
+ await Task.Delay(4000);
+ await OfferUpdateAsync();
+ }
+
+ // Sets pendingUpdate when GitHub has a newer release with a patch; true when it did.
+ private async Task<bool> FindUpdateAsync(CancellationToken cancel = default)
+ {
+ if (LoadOnlineConfig() == null) return false; // offline installs update with the full installer
// RESTREET_NO_UPDATE=1: never offer an update (a self-built launcher would be replaced by the official one).
- if (Environment.GetEnvironmentVariable("RESTREET_NO_UPDATE") == "1") return;
+ if (Environment.GetEnvironmentVariable("RESTREET_NO_UPDATE") == "1") return false;
try
{
- using var doc = JsonDocument.Parse(await UpdateHttp.GetStringAsync(ReleasesApi));
+ using var doc = JsonDocument.Parse(await UpdateHttp.GetStringAsync(ReleasesApi, cancel));
var r = doc.RootElement;
string tag = r.GetProperty("tag_name").GetString() ?? "";
- if (ParseVersion(tag) <= ParseVersion(LauncherVersion)) return;
+ if (ParseVersion(tag) <= ParseVersion(LauncherVersion)) return false;
string? exe = null, sha = null;
foreach (var a in r.GetProperty("assets").EnumerateArray())
{
@@ -53,31 +74,36 @@ public partial class LauncherForm
if (name.EndsWith(".exe.sha256", StringComparison.OrdinalIgnoreCase)) sha = url;
else if (name.EndsWith(".exe", StringComparison.OrdinalIgnoreCase)) exe = url;
}
- if (exe == null || sha == null) return;
+ if (exe == null || sha == null) return false;
string notes = r.TryGetProperty("name", out var n) ? n.GetString() ?? tag : tag;
pendingUpdate = (ParseVersion(tag).ToString(), exe, sha, notes);
- // The page may still be loading (it asks again with "state"); give it a moment to say whether it is up.
- await Task.Delay(4000);
- if (PageConnected)
- {
- PostToPage(new { type = "update", version = pendingUpdate.Value.Version, notes });
- }
- else
- {
- // Classic interface (no WebView2, for example on Wine/Proton): ask with a plain dialog.
- var answer = MessageBox.Show(this, "ReStreet " + pendingUpdate.Value.Version + " is available.\n\nThe launcher downloads it from GitHub, " +
- "checks it and installs it for you. Your name, server and saves are kept.\n\nUpdate now?", "ReStreet update",
- MessageBoxButtons.YesNo, MessageBoxIcon.Information);
- if (answer == DialogResult.Yes)
- {
- UpdateStatus("Downloading the update...", true);
- await InstallUpdateAsync();
- }
- }
+ return true;
}
- catch (Exception ex) when (ex is HttpRequestException or TaskCanceledException or JsonException or KeyNotFoundException or InvalidOperationException)
+ catch (Exception ex) when (ex is HttpRequestException or TaskCanceledException or OperationCanceledException or JsonException or KeyNotFoundException or InvalidOperationException)
{
- // No network or GitHub unavailable: try again next start.
+ // No network or GitHub unavailable: try again later.
+ return false;
+ }
+ }
+
+ private async Task OfferUpdateAsync()
+ {
+ if (pendingUpdate is not { } u) return;
+ if (PageConnected)
+ {
+ PostToPage(new { type = "update", version = u.Version, notes = u.Notes });
+ }
+ else
+ {
+ // Classic interface (no WebView2, for example on Wine/Proton): ask with a plain dialog.
+ var answer = MessageBox.Show(this, "ReStreet " + u.Version + " is available.\n\nThe launcher downloads it from GitHub, " +
+ "checks it and installs it for you. Your name, server and saves are kept.\n\nUpdate now?", "ReStreet update",
+ MessageBoxButtons.YesNo, MessageBoxIcon.Information);
+ if (answer == DialogResult.Yes)
+ {
+ UpdateStatus("Downloading the update...", true);
+ await InstallUpdateAsync();
+ }
}
}
diff --git a/Launcher/FifaStreetLauncher/VulkanFallback.cs b/Launcher/FifaStreetLauncher/VulkanFallback.cs
new file mode 100644
index 0000000..d9e6167
--- /dev/null
+++ b/Launcher/FifaStreetLauncher/VulkanFallback.cs
@@ -0,0 +1,38 @@
+namespace FifaStreetLauncher;
+
+// Vulkan on some AMD drivers (RX 580, Ryzen integrated graphics) kills the game while the first match or menu loads,
+// and Direct3D 12 works on the same PCs. Players did not know: when the game crashes in its first minutes with
+// Vulkan, offer to switch. Only asks; nothing changes without a yes.
+public partial class LauncherForm
+{
+ private bool vulkanFallbackAsked; // once per launcher run
+
+ private static bool IsCrashExitCode(int code)
+ {
+ uint c = unchecked((uint)code);
+ return c >= 0xC0000000 || c == 0xE06D7363; // NTSTATUS errors (access violation, ...) and C++ exceptions
+ }
+
+ private void SuggestD3D12AfterVulkanCrash(string graphicsApi, int exitCode, TimeSpan ran)
+ {
+ if (graphicsApi != "Vulkan" || !IsCrashExitCode(exitCode) || ran > TimeSpan.FromMinutes(3) ||
+ vulkanFallbackAsked || closeAfterGame || graphicsApiBox.SelectedIndex != 1)
+ return;
+ vulkanFallbackAsked = true;
+ string lang = System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;
+ string text = lang switch
+ {
+ "pt" => "O ReStreet fechou logo no início usando Vulkan. Em algumas placas AMD o Vulkan fecha o jogo e o " +
+ "Direct3D 12 funciona.\n\nMudar para Direct3D 12?",
+ "es" => "ReStreet se cerró al poco de empezar con Vulkan. En algunas gráficas AMD Vulkan cierra el juego y " +
+ "Direct3D 12 funciona.\n\n¿Cambiar a Direct3D 12?",
+ _ => "ReStreet closed soon after starting with Vulkan. On some AMD graphics Vulkan closes the game and " +
+ "Direct3D 12 works.\n\nSwitch to Direct3D 12?",
+ };
+ if (MessageBox.Show(this, text, "ReStreet", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
+ return;
+ graphicsApiBox.SelectedIndex = 0;
+ UpdateGraphicsApiState();
+ SaveSettings();
+ }
+}
diff --git a/Launcher/FifaStreetLauncher/ui/lang.js b/Launcher/FifaStreetLauncher/ui/lang.js
index 66238b0..316f68a 100644
--- a/Launcher/FifaStreetLauncher/ui/lang.js
+++ b/Launcher/FifaStreetLauncher/ui/lang.js
@@ -467,6 +467,12 @@
"players": ["jogadores", "jugadores", "joueurs", "Spieler", "giocatori"],
"Checked in": ["Presença confirmada", "Asistencia confirmada", "Confirmé", "Eingecheckt", "Presenza confermata"],
"Signed up": ["Inscrito", "Inscrito", "Inscrit", "Angemeldet", "Iscritto"],
+ "Check in now": ["Confirme agora", "Confirma ahora", "Confirme maintenant", "Jetzt einchecken", "Conferma ora"],
+ "checked in": ["confirmados", "confirmados", "confirmés", "eingecheckt", "confermati"],
+ "signed up": ["inscritos", "inscritos", "inscrits", "angemeldet", "iscritti"],
+ "Real teams only": ["Só times reais", "Solo equipos reales", "Équipes réelles uniquement", "Nur echte Teams", "Solo squadre reali"],
+ "Tournaments are played with real teams: pick a club or a national team": ["Os torneios são jogados com times reais: escolha um clube ou uma seleção", "Los torneos se juegan con equipos reales: elige un club o una selección", "Les tournois se jouent avec des équipes réelles : choisis un club ou une sélection", "Turniere werden mit echten Teams gespielt: wähle einen Verein oder eine Nationalmannschaft", "I tornei si giocano con squadre reali: scegli un club o una nazionale"],
+ "You already have a match waiting: play it first": ["Você já tem uma partida esperando: jogue-a primeiro", "Ya tienes un partido esperando: juégalo primero", "Tu as déjà un match qui t'attend : joue-le d'abord", "Auf dich wartet schon ein Spiel: spiel es zuerst", "Hai già una partita in attesa: giocala prima"],
"Final": ["Final", "Final", "Finale", "Finale", "Finale"],
"Semi-finals": ["Semifinais", "Semifinales", "Demi-finales", "Halbfinale", "Semifinali"],
"Quarter-finals": ["Quartas de final", "Cuartos de final", "Quarts de finale", "Viertelfinale", "Quarti di finale"],
diff --git a/Launcher/FifaStreetLauncher/ui/launcher.html b/Launcher/FifaStreetLauncher/ui/launcher.html
index c63def6..92b8ced 100644
--- a/Launcher/FifaStreetLauncher/ui/launcher.html
+++ b/Launcher/FifaStreetLauncher/ui/launcher.html
@@ -1235,9 +1235,14 @@ function renderTours(list) {
const rounds = t.rounds.map((r, i) => '<div class="bround"><span class="rh">' + roundName(t, i) + '</span><div class="bms">' + r.map(m => '<div class="bm">' +
[m.a, m.b].map((n, k) => '<div class="' + (n && n === m.winner ? 'w' : '') + (n && sameName(n, me) ? ' me' : '') + '"><span>' + esc(n || '—') +
'</span><span class="sc">' + score(m, k) + '</span></div>').join('') + '</div>').join('') + '</div></div>').join('');
- const mine = t.me_checked ? '<span><b>&#10003;</b> <span>Checked in</span></span>' : t.me_signed ? '<span><b>&#10003;</b> <span>Signed up</span></span>' : '';
+ // During check-in the count that matters is who checked in (only they play); a signed player who has not yet sees it.
+ const checkin = t.state === 'open' && now >= t.checkin;
+ const mine = t.me_checked ? '<span><b>&#10003;</b> <span>Checked in</span></span>'
+ : t.me_signed ? (checkin ? '<span class="state live">Check in now</span>' : '<span><b>&#10003;</b> <span>Signed up</span></span>') : '';
+ const count = checkin ? '<span><b>' + t.checked + '/' + t.size + '</b> <span>checked in</span></span><span><b>' + t.signed + '</b> <span>signed up</span></span>'
+ : '<span><b>' + (t.state === 'open' ? t.signed : t.checked) + '/' + t.size + '</b> <span>players</span></span>';
return '<div class="tour"><div class="th"><h4>' + esc(t.name) + '</h4>' + state + '<div class="meta"><span><b>' + esc(when(t.start)) + '</b></span><span>' +
- esc(MODE[t.mode] || t.mode) + '</span><span><b>' + (t.state === 'open' ? t.signed : t.checked) + '/' + t.size + '</b> <span>players</span></span>' +
+ esc(MODE[t.mode] || t.mode) + '</span>' + count + (t.real_teams !== false ? '<span>Real teams only</span>' : '') +
(t.state === 'open' ? mine : '') + '</div><div class="acts">' + acts + '</div></div>' + (rounds ? '<div class="bracket">' + rounds + '</div>' : '') +
(t.champion ? '<div class="champ"><span>Champion</span> <b>' + esc(t.champion) + '</b></div>' : '') + '</div>';
}).join('');