Skip to content

Commit

Permalink
MMCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Grabacr07 committed Feb 12, 2015
1 parent d0a38c4 commit 53ea626
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Grabacr07.KanColleViewer/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected override void OnStartup(StartupEventArgs e)
PluginHost.Instance.Initialize();
NotifierHost.Instance.Initialize(KanColleClient.Current);
Helper.SetRegistryFeatureBrowserEmulation();
Helper.SetMMCSSTask();

KanColleClient.Current.Proxy.Startup(AppSettings.Default.LocalProxyPort);
KanColleClient.Current.Proxy.UpstreamProxySettings = Settings.Current.ProxySettings;
Expand Down
6 changes: 6 additions & 0 deletions Grabacr07.KanColleViewer/Models/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public static void SetRegistryFeatureBrowserEmulation()
}
}

public static void SetMMCSSTask()
{
var index = 0u;
NativeMethods.AvSetMmThreadCharacteristics("Games", ref index);
}


/// <summary>
/// キャッシュを削除します。
Expand Down
2 changes: 2 additions & 0 deletions Grabacr07.KanColleViewer/Win32/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ namespace Grabacr07.KanColleViewer.Win32
{
internal static class NativeMethods
{
[DllImport("Avrt.dll")]
public static extern IntPtr AvSetMmThreadCharacteristics(string taskName, ref uint taskIndex);
}
}

0 comments on commit 53ea626

Please sign in to comment.