Improve one of the Satellaview header heuristics (resolves #4268)

This commit is contained in:
YoshiRulz 2025-03-13 06:36:43 +10:00
parent 6965767328
commit e94a20877a
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using BizHawk.Common;
using BizHawk.Common.IOExtensions;
@ -105,7 +106,9 @@ namespace BizHawk.Emulation.Common
var corruption = 0;
// "invalid" states were assigned a higher value if the wiki page was less vague
if (header.Title.Length is 0) corruption++;
static bool IsASCIIOrKana(char c)
=> c is (>= ' ' and <= '~') or (>= 'ぁ' and <= 'ヿ') or (>= '' and <= '○'); // doubt this matches SHIFT-JIS but it should cover all the kana which is what I expect in a title
if (!header.Title.Any(IsASCIIOrKana)) corruption++;
if (header.IsSelfDestructing)
{