diff --git a/Compatible/Compatible.csproj b/Compatible/Compatible.csproj
index a6e9f8b..c1010be 100644
--- a/Compatible/Compatible.csproj
+++ b/Compatible/Compatible.csproj
@@ -8,7 +8,7 @@
-
-
+
+
diff --git a/Qwilight/Compute/AutoCompute.cs b/Qwilight/Compute/AutoCompute.cs
index 13f7b87..040ea48 100644
--- a/Qwilight/Compute/AutoCompute.cs
+++ b/Qwilight/Compute/AutoCompute.cs
@@ -7,6 +7,8 @@
{
public class AutoCompute : DefaultCompute
{
+ public override bool IsPointVisible => true;
+
public override bool CanPause => false;
public override bool IsPassable => false;
diff --git a/Qwilight/Compute/CommentCompute.cs b/Qwilight/Compute/CommentCompute.cs
index 94b9998..0df67b1 100644
--- a/Qwilight/Compute/CommentCompute.cs
+++ b/Qwilight/Compute/CommentCompute.cs
@@ -7,6 +7,8 @@
{
public sealed class CommentCompute : DefaultCompute
{
+ public override bool IsPointVisible => true;
+
public override bool IsPassable => false;
public override bool IsEscapable => false;
diff --git a/Qwilight/Compute/DefaultCompute.cs b/Qwilight/Compute/DefaultCompute.cs
index 2bb8a59..3494026 100644
--- a/Qwilight/Compute/DefaultCompute.cs
+++ b/Qwilight/Compute/DefaultCompute.cs
@@ -412,6 +412,8 @@
public Event.Types.DrawingComponent NetDrawingComponentValue { get; set; }
+ public virtual bool IsPointVisible => false;
+
public virtual bool CanPause => WwwLevelDataValue?.AllowPause != false;
public virtual bool CanUndo => WwwLevelDataValue?.AllowPause != false;
@@ -1104,6 +1106,7 @@
{
throw new ScriptRuntimeException(e);
}
+ HandleWarning();
HandleComputer();
}
}
@@ -1447,7 +1450,7 @@
{
NotifySystem.Instance.Notify(NotifySystem.NotifyVariety.Warning, NotifySystem.NotifyConfigure.Default, string.Format(LanguageSystem.Instance.AudioMultiplierWarning, ModeComponentValue.AudioMultiplier.ToString("×0.00")));
}
- if (!Configure.Instance.AllowTwilightComment && !IsBanned && !IsPostableItemMode && ModeComponentValue.CanBeTwilightComment && TwilightSystem.Instance.IsLoggedIn)
+ if (!Configure.Instance.AllowTwilightComment && !IsBanned && string.IsNullOrEmpty(EventNoteEntryItem?.EventNoteID) && !IsPostableItemMode && ModeComponentValue.CanBeTwilightComment && TwilightSystem.Instance.IsLoggedIn)
{
NotifySystem.Instance.Notify(NotifySystem.NotifyVariety.Warning, NotifySystem.NotifyConfigure.Default, LanguageSystem.Instance.TwilightCommentWarning);
}
@@ -1586,7 +1589,6 @@
LevelValue = NoteFile.LevelValue;
LevelText = NoteFile.LevelText;
InputMode = NoteFile.InputMode;
- HandleWarning();
}
void SetIIDXInputAudioVariety(BaseNote note)
@@ -4825,7 +4827,16 @@
}
else
{
- if (EventNoteEntryItem != null)
+ if (string.IsNullOrEmpty(EventNoteEntryItem?.EventNoteID))
+ {
+ var commentFilePath = Path.Combine(QwilightComponent.CommentEntryPath, commentID);
+ if (File.Exists(commentFilePath))
+ {
+ using var fs = File.OpenRead(commentFilePath);
+ netItem.Comment = Comment.Parser.ParseFrom(fs);
+ }
+ }
+ else
{
var commentFilePath = Path.Combine(QwilightComponent.CommentEntryPath, Path.ChangeExtension(commentID, ".zip"));
if (File.Exists(commentFilePath))
@@ -4840,15 +4851,6 @@
}
}
}
- else
- {
- var commentFilePath = Path.Combine(QwilightComponent.CommentEntryPath, commentID);
- if (File.Exists(commentFilePath))
- {
- using var fs = File.OpenRead(commentFilePath);
- netItem.Comment = Comment.Parser.ParseFrom(fs);
- }
- }
}
}
}
diff --git a/Qwilight/Compute/IOCompute.cs b/Qwilight/Compute/IOCompute.cs
index e10969a..d6face8 100644
--- a/Qwilight/Compute/IOCompute.cs
+++ b/Qwilight/Compute/IOCompute.cs
@@ -7,6 +7,8 @@
{
public sealed class IOCompute : DefaultCompute
{
+ public override bool IsPointVisible => true;
+
public override bool IsPowered => false;
public override bool CanPause => false;
diff --git a/Qwilight/Qwilight.csproj b/Qwilight/Qwilight.csproj
index 269869f..8ff0205 100644
--- a/Qwilight/Qwilight.csproj
+++ b/Qwilight/Qwilight.csproj
@@ -10,7 +10,7 @@
Qwilight.ico
Taehui
불로그
- 1.16.29
+ 1.16.30
true
enable
false
@@ -46,9 +46,9 @@
-
+
-
+
all
@@ -65,7 +65,7 @@
-
+
diff --git a/Qwilight/System/Configure/Configure.cs b/Qwilight/System/Configure/Configure.cs
index 4c2f340..b2411ad 100644
--- a/Qwilight/System/Configure/Configure.cs
+++ b/Qwilight/System/Configure/Configure.cs
@@ -3463,10 +3463,6 @@
{
FlowValues = true;
}
- if (isInit || Utility.IsLowerDate(Date, 1, 16, 16))
- {
- LazyGCV2 = 0L;
- }
if (isInit || Utility.IsLowerDate(Date, 1, 16, 17))
{
AutoInputFavorLabelledMillis = false;
@@ -3547,6 +3543,7 @@
{
MSI = false;
CM = false;
+ LazyGCV2 = 4096L;
}
if (!UIConfigureValuesV2.ContainsKey(UIItemValue.Title))
{
diff --git a/Qwilight/System/TVSystem.cs b/Qwilight/System/TVSystem.cs
index 3fb44b3..e0d9432 100644
--- a/Qwilight/System/TVSystem.cs
+++ b/Qwilight/System/TVSystem.cs
@@ -42,7 +42,7 @@
public bool TVAssists => TVAssist0 || TVAssist1;
- bool IsAvailable => !ViewModels.Instance.MainValue.IsLazyGCMode;
+ bool IsAvailable => !ViewModels.Instance.MainValue.IsPragmatic;
public void HandleSystemIfAvailable()
{
diff --git a/Qwilight/System/TwilightSystem.cs b/Qwilight/System/TwilightSystem.cs
index ffc0c6a..697fccb 100644
--- a/Qwilight/System/TwilightSystem.cs
+++ b/Qwilight/System/TwilightSystem.cs
@@ -1591,7 +1591,7 @@
public async Task GetDefaultUIDate(long defaultUIDate, bool isSilent)
{
var twilightWwwDefaultDate = await GetWwwParallel($"{QwilightComponent.QwilightAPI}/defaultUIDate?date={defaultUIDate}").ConfigureAwait(false);
- if (twilightWwwDefaultDate.HasValue && !ViewModels.Instance.MainValue.IsLazyGCMode)
+ if (twilightWwwDefaultDate.HasValue && !ViewModels.Instance.MainValue.IsPragmatic)
{
var date = twilightWwwDefaultDate.Value.date;
Configure.Instance.DefaultUIDate = date;
diff --git a/Qwilight/View/MainWindow/MainWindow.xaml.cs b/Qwilight/View/MainWindow/MainWindow.xaml.cs
index 9124f5e..50766f6 100644
--- a/Qwilight/View/MainWindow/MainWindow.xaml.cs
+++ b/Qwilight/View/MainWindow/MainWindow.xaml.cs
@@ -3,6 +3,7 @@
using Microsoft.UI;
using Microsoft.UI.Content;
using Microsoft.UI.Input;
+using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Hosting;
using Microsoft.UI.Xaml.Input;
@@ -229,17 +230,13 @@
{
UIHandler.Instance.HandleParallel(() =>
{
- _siteView.Enable();
_siteView.Show();
+ _mainView.Focus(FocusState.Pointer);
});
}
else
{
- UIHandler.Instance.HandleParallel(() =>
- {
- _siteView.Hide();
- _siteView.Disable();
- });
+ UIHandler.Instance.HandleParallel(_siteView.Hide);
}
}
diff --git a/Qwilight/ViewModel/MainViewModel.cs b/Qwilight/ViewModel/MainViewModel.cs
index d64c9e6..fb4ee92 100644
--- a/Qwilight/ViewModel/MainViewModel.cs
+++ b/Qwilight/ViewModel/MainViewModel.cs
@@ -113,7 +113,6 @@
bool _isHallAbility9KLoading;
bool _isHallLevelLoading;
string _twilightCommentary = string.Empty;
- bool _isLazyGCMode;
bool _isWPFViewVisible = true;
bool _isLoaded;
double _windowDPI;
@@ -238,45 +237,42 @@
{
IsVisible = !value
});
- IsLazyGCMode = IsComputingMode && !value;
ViewModels.Instance.NotifyWindowViewModels();
TVSystem.Instance.HandleSystemIfAvailable();
+ SetPragmatic();
}
}
}
- public bool IsLazyGCMode
- {
- get => _isLazyGCMode;
+ public bool IsPragmatic { get; set; }
- set
+ void SetPragmatic()
+ {
+ IsPragmatic = !IsWPFViewVisible && IsComputingMode && !Computer.IsPausing;
+ if (IsPragmatic)
{
- _isLazyGCMode = value;
- if (value)
- {
- var lazyGC = Configure.Instance.LazyGCV2 * 1000L * 1000L;
- if (lazyGC > 0L)
- {
- try
- {
- GC.TryStartNoGCRegion(lazyGC);
- }
- catch (InvalidOperationException)
- {
- }
- }
- }
- else
+ var lazyGC = Configure.Instance.LazyGCV2 * 1000L * 1000L;
+ if (lazyGC > 0L)
{
try
{
- GC.EndNoGCRegion();
+ GC.TryStartNoGCRegion(lazyGC);
}
catch (InvalidOperationException)
{
}
}
}
+ else
+ {
+ try
+ {
+ GC.EndNoGCRegion();
+ }
+ catch (InvalidOperationException)
+ {
+ }
+ }
}
public bool HasPoint { get; set; }
@@ -448,7 +444,11 @@
set => SetProperty(ref _isHallLevelLoading, value, nameof(IsHallLevelLoading));
}
- public void NotifyIsPausing() => OnPropertyChanged(nameof(IsPausing));
+ public void NotifyIsPausing()
+ {
+ OnPropertyChanged(nameof(IsPausing));
+ SetPragmatic();
+ }
public Fading FadingValue { get; } = new();