Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Nov 4, 2024
1 parent 363d87e commit 1826fee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 15 additions & 1 deletion src/Live/Sucrose.Live.CefSharp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
using SSSHI = Sucrose.Shared.Space.Helper.Instance;
using SSSHS = Sucrose.Shared.Space.Helper.Security;
using SSSHW = Sucrose.Shared.Space.Helper.Watchdog;
using SSSMI = Sucrose.Shared.Space.Manage.Internal;
using SSTHC = Sucrose.Shared.Theme.Helper.Compatible;
using SSTHI = Sucrose.Shared.Theme.Helper.Info;
using SSTHP = Sucrose.Shared.Theme.Helper.Properties;
Expand Down Expand Up @@ -273,7 +274,6 @@ protected void Configure()

CefSettings Settings = new()
{
Locale = SMMG.Culture,
UserAgent = SMMG.UserAgent,
PersistSessionCookies = true,
WindowlessRenderingEnabled = true,
Expand Down Expand Up @@ -304,6 +304,20 @@ protected void Configure()
}
}

string LocalesPath = Path.Combine(SSSMI.This, "locales");

if (Directory.Exists(LocalesPath))
{
string Locales = Directory.GetFiles(LocalesPath, "*.pak")
.FirstOrDefault(locale => Path.GetFileNameWithoutExtension(locale)
.StartsWith(SMMG.Culture, StringComparison.OrdinalIgnoreCase));

if (!string.IsNullOrEmpty(Locales))
{
Settings.Locale = Path.GetFileNameWithoutExtension(Locales);
}
}

//Settings.RegisterScheme(new CefCustomScheme
//{
// SchemeName = "themeFolder",
Expand Down
5 changes: 3 additions & 2 deletions src/Shared/Sucrose.Shared.Space/Manage/Internal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using SSDEVET = Sucrose.Shared.Dependency.Enum.VideoEngineType;
using SSDEWET = Sucrose.Shared.Dependency.Enum.WebEngineType;
using SSDEYTET = Sucrose.Shared.Dependency.Enum.YouTubeEngineType;
using SSSHE = Sucrose.Shared.Space.Helper.Extension;
using SSSHW = Sucrose.Shared.Space.Helper.Windows;

namespace Sucrose.Shared.Space.Manage
Expand All @@ -31,10 +32,10 @@ internal static class Internal

public static string This => Path.GetDirectoryName(App);

public static string App => SHA.Assemble(SEAT.Executing).Location;

public static string Folder => Directory.GetParent(This).FullName;

public static string App => SSSHE.Change(SHA.Assemble(SEAT.Entry).Location, ".exe");

public static string Portal => Path.Combine(Folder, Path.GetFileNameWithoutExtension(SMMRA.Portal), SMMRA.Portal);

public static string Update => Path.Combine(Folder, Path.GetFileNameWithoutExtension(SMMRA.Update), SMMRA.Update);
Expand Down

0 comments on commit 1826fee

Please sign in to comment.