mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-28 09:47:57 +03:00
Merge remote-tracking branch 'tendokyu/ic-scanning' into ic-scanning
This commit is contained in:
@@ -36,7 +36,7 @@ internal class CardPresenter
|
||||
lock (_cardLock)
|
||||
{
|
||||
// IDm and requireIDm are mutually exclusive
|
||||
if (_currentCard == null || (requireIDm.HasValue && (_currentCard.IDm == null) ^ requireIDm.Value))
|
||||
if (_currentCard == null || (requireIDm.HasValue && (_currentCard.IDm != null) ^ requireIDm.Value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using Windows.Win32;
|
||||
using Windows.Win32.Foundation;
|
||||
|
||||
@@ -41,6 +42,8 @@ internal static class Config
|
||||
/// </summary>
|
||||
public static string AimeTxtPath { get; }
|
||||
|
||||
public static Version ServerVersion { get; } = new(Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyFileVersionAttribute>()?.Version ?? "1.0");
|
||||
|
||||
internal static unsafe string ReadKey(string section, string key, uint maxLength, string @default = null)
|
||||
{
|
||||
// +1 for null terminator
|
||||
|
||||
@@ -36,7 +36,7 @@ public static class DllMain
|
||||
CancellationTokenRegistration? cancellationRegistration = null;
|
||||
cancellationRegistration = App.Lifetime.ApplicationStarted.Register(() =>
|
||||
{
|
||||
App.Logger.LogInformation("AMNet Server ({gameId}) started successfully.", Config.GameId ?? "SXXX");
|
||||
App.Logger.LogInformation("AMNet Server v{version} ({gameId}) started.", Config.ServerVersion.ToString(Config.ServerVersion.Build > 0 ? 3 : 2), Config.GameId ?? "SXXX");
|
||||
App.Logger.LogInformation("Visit {addr} from a mobile device on the same network to get started.", WebAddress);
|
||||
|
||||
// ReSharper disable once AccessToModifiedClosure
|
||||
@@ -125,7 +125,7 @@ public static class DllMain
|
||||
}
|
||||
|
||||
Marshal.Copy(card.IDm, 0, idm, sizeof(ulong));
|
||||
App.Logger.LogInformation("FeliCa IDm read: {idm}", card.IDm);
|
||||
App.Logger.LogInformation("FeliCa IDm read: {idm}", CardPresenter.FormatHexCode(card.IDm));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user