PS4 Dev ZiL0G80 and other Developers have found some new code for the E3Mode they were looking into before:[
Copy of the Pastebin found: HERE
https://twitter.com/ZiL0G80/status/78620...wsrc%5Etfw
https://twitter.com/ZiL0G80/status/786600116731785217
https://twitter.com/notzecoxao/status/78...1194449920
Copy of the Pastebin found: HERE
https://twitter.com/ZiL0G80/status/78620...wsrc%5Etfw
https://twitter.com/ZiL0G80/status/786600116731785217
https://twitter.com/notzecoxao/status/78...1194449920
Code:
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Sce.PlayStation.HighLevel.UI2;
using Sce.Vsh.Accessor;
using Sce.Vsh.Accessor.Db;
using Sce.Vsh.Lx;
using Sce.Vsh.ShellUI.AppSystem;
using Sce.Vsh.ShellUI.Lnc;
namespace Sce.Vsh.ShellUI.AppMain
{
// Token: 0x0200000D RID: 13
[Aot]
public class E3Mode
{
// Token: 0x060000B2 RID: 178 RVA: 0x00004C6A File Offset: 0x00002E6A
public static void Start()
{
if (ShowMode.Enable)
{
E3Mode.s_enableAutoBoot = true;
E3Mode.CreateDimmerScreen();
E3Mode.StartMonitorPsImpose();
}
}
// Token: 0x060000B3 RID: 179 RVA: 0x00004C83 File Offset: 0x00002E83
public static void StartFarsightUI()
{
if (ShowMode.Enable && E3Mode.s_enableAutoBoot)
{
E3Mode.StartAutoBoot();
}
}
// Token: 0x060000B4 RID: 180 RVA: 0x00004C98 File Offset: 0x00002E98
public static bool IsEnableAutoBoot()
{
return ShowMode.Enable && E3Mode.s_enableAutoBoot;
}
// Token: 0x060000B5 RID: 181 RVA: 0x00004CA8 File Offset: 0x00002EA8
private static void Stop()
{
E3Mode.s_enableAutoBoot = false;
E3Mode.DestroyDimmerScreen();
E3Mode.StopMonitorPsImpose();
}
// Token: 0x060000B6 RID: 182 RVA: 0x00004CBC File Offset: 0x00002EBC
private static void CreateDimmerScreen()
{
if (E3Mode.s_dimmerScreen == null)
{
E3Mode.s_dimmerScreen = new Scene
{
Focusable = false
};
E3Mode.s_dimmerScreen.RootWidget.AppendChild(new Panel
{
BackgroundColor = new UIColor(0f, 0f, 0f, 1f),
Width = 1920f,
Height = 1080f
});
LayerManager.FindContainerSceneByPath("SystemOverlay").AddScene(E3Mode.s_dimmerScreen);
}
}
// Token: 0x060000B7 RID: 183 RVA: 0x00004D64 File Offset: 0x00002F64
private static void DestroyDimmerScreen()
{
if (E3Mode.s_dimmerScreen != null)
{
Scene scene = E3Mode.s_dimmerScreen;
E3Mode.s_dimmerScreen = null;
UITimer.Start(1f, delegate
{
if (BootManager.IsHealthWarningExecuting())
{
return false;
}
scene.RemoveFromSuperScene();
return true;
});
}
}
// Token: 0x060000B8 RID: 184 RVA: 0x00004DA6 File Offset: 0x00002FA6
private static void StartMonitorPsImpose()
{
LayerManager.UpdateFocusSceneAction += new Action<Scene>(E3Mode.OnUpdateFocusScene);
}
// Token: 0x060000B9 RID: 185 RVA: 0x00004DB9 File Offset: 0x00002FB9
private static void StopMonitorPsImpose()
{
LayerManager.UpdateFocusSceneAction -= new Action<Scene>(E3Mode.OnUpdateFocusScene);
}
// Token: 0x060000BA RID: 186 RVA: 0x00004DCC File Offset: 0x00002FCC
private static void OnUpdateFocusScene(Scene scene)
{
if (LayerManager.FindRootContainerScene(scene) == LayerManager.FindScene("PSMenu"))
{
E3Mode.Stop();
}
}
// Token: 0x060000BB RID: 187 RVA: 0x00004DEC File Offset: 0x00002FEC
private static void StartAutoBoot()
{
if (UT.UserService.ForegroundUserId == -1)
{
E3Mode.Stop();
return;
}
string text = null;
using (AppBrowseItemAccessor appBrowseItemAccessor = new AppBrowseItemAccessor())
{
appBrowseItemAccessor.SetUserId(UT.UserService.ForegroundUserId);
List<Item> items = appBrowseItemAccessor.GetItems(0, Math.Min(32, appBrowseItemAccessor.GetTotalCount()));
foreach (Item current in items)
{
AppBrowseItem appBrowseItem = current as AppBrowseItem;
if (appBrowseItem != null && appBrowseItem.CanRemove)
{
text = appBrowseItem.TitleId;
}
}
}
if (text.Empty())
{
E3Mode.Stop();
return;
}
Utility.AppLauncher appLauncher = Utility.LaunchApp(text, "", EventMonitor.AppAttr.None);
appLauncher.LaunchFinishedAction += delegate(Utility.AppLauncher obj)
{
E3Mode.Stop();
};
}
// Token: 0x060000BC RID: 188 RVA: 0x00004EE0 File Offset: 0x000030E0
public E3Mode()
{
}
// Token: 0x060000BD RID: 189 RVA: 0x00004DE5 File Offset: 0x00002FE5
[CompilerGenerated]
private static void <StartAutoBoot>b__5(Utility.AppLauncher obj)
{
E3Mode.Stop();
}
// Token: 0x040000AA RID: 170
private static bool s_enableAutoBoot;
// Token: 0x040000AB RID: 171
private static Scene s_dimmerScreen;
// Token: 0x040000AC RID: 172
[CompilerGenerated]
private static Action<Utility.AppLauncher> CS$<>9__CachedAnonymousMethodDelegate6;
// Token: 0x0200103D RID: 4157
[CompilerGenerated]
private sealed class <>c__DisplayClass3
{
// Token: 0x06007D59 RID: 32089 RVA: 0x00004D42 File Offset: 0x00002F42
public <>c__DisplayClass3()
{
}
// Token: 0x06007D5A RID: 32090 RVA: 0x00004D4A File Offset: 0x00002F4A
public bool <DestroyDimmerScreen>b__2()
{
if (BootManager.IsHealthWarningExecuting())
{
return false;
}
this.scene.RemoveFromSuperScene();
return true;
}
// Token: 0x04005272 RID: 21106
public Scene scene;
}
}
}
Have any questions? Feel free to PM me! / Knowledge is Power