moved common ui code to comon project
This commit is contained in:
parent
7404d09c2c
commit
dd9ea4bba6
9 changed files with 24 additions and 60 deletions
|
@ -5,7 +5,7 @@ using System.Threading;
|
|||
|
||||
namespace Ryujinx
|
||||
{
|
||||
static class ConsoleLog
|
||||
public static class ConsoleLog
|
||||
{
|
||||
private static Dictionary<LogLevel, ConsoleColor> LogColors;
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Ryujinx.UI.Input
|
||||
namespace Ryujinx.Common.Input
|
||||
{
|
||||
public struct JoyConControllerLeft
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Ryujinx.UI.Input
|
||||
namespace Ryujinx.Common.Input
|
||||
{
|
||||
public struct JoyConKeyboardLeft
|
||||
{
|
11
Ryujinx.Common/Ryujinx.Common.csproj
Normal file
11
Ryujinx.Common/Ryujinx.Common.csproj
Normal file
|
@ -0,0 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ryujinx.HLE\Ryujinx.HLE.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -23,6 +23,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\ChocolArm64\ChocolArm64.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Audio\Ryujinx.Audio.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Common\Ryujinx.Common.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Graphics\Ryujinx.Graphics.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.HLE\Ryujinx.HLE.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -19,7 +19,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.ShaderTools", "Ryuj
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luea", "Ryujinx.LLE\Luea.csproj", "{8E7D36DD-9626-47E2-8EF5-8F2F66751C9C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryujinx.UI", "Ryujinx.UI\Ryujinx.UI.csproj", "{00117502-1661-4C8B-8C07-177C1A8AA455}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.UI", "Ryujinx.UI\Ryujinx.UI.csproj", "{00117502-1661-4C8B-8C07-177C1A8AA455}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryujinx.Common", "Ryujinx.Common\Ryujinx.Common.csproj", "{E614B5D6-7497-4B8D-A6BE-76CA134BDCE7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -63,6 +65,10 @@ Global
|
|||
{00117502-1661-4C8B-8C07-177C1A8AA455}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00117502-1661-4C8B-8C07-177C1A8AA455}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00117502-1661-4C8B-8C07-177C1A8AA455}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E614B5D6-7497-4B8D-A6BE-76CA134BDCE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E614B5D6-7497-4B8D-A6BE-76CA134BDCE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E614B5D6-7497-4B8D-A6BE-76CA134BDCE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E614B5D6-7497-4B8D-A6BE-76CA134BDCE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Ryujinx.UI.Input;
|
||||
using Ryujinx.Common.Input;
|
||||
using Ryujinx.HLE.Logging;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\ChocolArm64\ChocolArm64.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Audio\Ryujinx.Audio.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Common\Ryujinx.Common.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.HLE\Ryujinx.HLE.csproj" />
|
||||
<ProjectReference Include="..\Ryujinx.Graphics\Ryujinx.Graphics.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
using Ryujinx.HLE.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx
|
||||
{
|
||||
static class ConsoleLog
|
||||
{
|
||||
private static Dictionary<LogLevel, ConsoleColor> LogColors;
|
||||
|
||||
private static object ConsoleLock;
|
||||
|
||||
static ConsoleLog()
|
||||
{
|
||||
LogColors = new Dictionary<LogLevel, ConsoleColor>()
|
||||
{
|
||||
{ LogLevel.Stub, ConsoleColor.DarkGray },
|
||||
{ LogLevel.Info, ConsoleColor.White },
|
||||
{ LogLevel.Warning, ConsoleColor.Yellow },
|
||||
{ LogLevel.Error, ConsoleColor.Red }
|
||||
};
|
||||
|
||||
ConsoleLock = new object();
|
||||
}
|
||||
|
||||
public static void PrintLog(object sender, LogEventArgs e)
|
||||
{
|
||||
string FormattedTime = e.Time.ToString(@"hh\:mm\:ss\.fff");
|
||||
|
||||
string CurrentThread = Thread.CurrentThread.ManagedThreadId.ToString("d4");
|
||||
|
||||
string Message = FormattedTime + " | " + CurrentThread + " " + e.Message;
|
||||
|
||||
if (LogColors.TryGetValue(e.Level, out ConsoleColor Color))
|
||||
{
|
||||
lock (ConsoleLock)
|
||||
{
|
||||
Console.ForegroundColor = Color;
|
||||
|
||||
Console.WriteLine(Message);
|
||||
Console.ResetColor();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue