From 2286f0793c1555a22786745abd55e37a586022d0 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Thu, 30 Apr 2026 21:40:25 +0800 Subject: [PATCH] fix: anti-cheat is game-level, not per-device --- components/wizard/steps/anti-cheat-step.tsx | 61 ++++++++++++++------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/components/wizard/steps/anti-cheat-step.tsx b/components/wizard/steps/anti-cheat-step.tsx index e6dea88..a7515ae 100644 --- a/components/wizard/steps/anti-cheat-step.tsx +++ b/components/wizard/steps/anti-cheat-step.tsx @@ -21,21 +21,24 @@ const statusConfig = { label: "Supported", color: "border-green-500/30 bg-green-500/10", textColor: "text-green-400", - message: "This game's anti-cheat supports Linux/SteamOS. Multiplayer should work.", + message: + "This game's anti-cheat supports Linux/SteamOS. Multiplayer should work.", }, unsupported: { icon: ShieldX, label: "Unsupported", color: "border-red-500/30 bg-red-500/10", textColor: "text-red-400", - message: "This game's anti-cheat does not support Linux/SteamOS. Multiplayer may not work.", + message: + "This game's anti-cheat does not support Linux/SteamOS. Multiplayer may not work.", }, unknown: { icon: ShieldQuestion, label: "Unknown", color: "border-yellow-500/30 bg-yellow-500/10", textColor: "text-yellow-400", - message: "Anti-cheat compatibility is unknown. Multiplayer may or may not work.", + message: + "Anti-cheat compatibility is unknown. Multiplayer may or may not work.", }, none: { icon: Shield, @@ -46,28 +49,44 @@ const statusConfig = { }, } as const -export function AntiCheatStep({ hardwareSlug, platformSupport }: AntiCheatStepProps) { - const support = platformSupport.find((p) => p.hardwareSlug === hardwareSlug) +export function AntiCheatStep({ + hardwareSlug, + platformSupport, +}: AntiCheatStepProps) { + // Anti-cheat is a game-level property, not device-specific. + // Find the first entry with anti-cheat info (any device). + const antiCheatEntry = platformSupport.find((p) => p.antiCheatRelevant) - if (!hardwareSlug) { + if (!antiCheatEntry) { return ( -
- -

Please select a hardware device first.

+
+
+ +
+

+ Anti-Cheat Status +

+

+ Check the anti-cheat compatibility before submitting. +

+
+
+ +
+
+ +

No Anti-Cheat

+
+

+ This game does not use anti-cheat software. Multiplayer (if + available) should work without issues. +

+
) } - if (!support || !support.antiCheatRelevant) { - return ( -
- -

No anti-cheat information for this hardware device.

-
- ) - } - - const config = statusConfig[support.antiCheatStatus] + const config = statusConfig[antiCheatEntry.antiCheatStatus] const Icon = config.icon return ( @@ -77,7 +96,7 @@ export function AntiCheatStep({ hardwareSlug, platformSupport }: AntiCheatStepPr

Anti-Cheat Status

- Check the anti-cheat compatibility for your selected hardware before submitting. + Check the anti-cheat compatibility before submitting.

@@ -86,7 +105,7 @@ export function AntiCheatStep({ hardwareSlug, platformSupport }: AntiCheatStepPr

- Anti-Cheat: {support.antiCheatName || config.label} + Anti-Cheat: {antiCheatEntry.antiCheatName || config.label}

{config.message}