Post: PS4Dev: E3Mode Update by ZiL0G80 for PS4 Developers
10-14-2016, 02:19 PM #1
Hydrogen
Super Mod
(adsbygoogle = window.adsbygoogle || []).push({});
PS4 Dev ZiL0G80 and other Developers have found some new code for the E3Mode they were looking into before:


Copy of the Pastebin found: You must login or register to view this content.

[tweet]https://twitter.com/ZiL0G80/status/786208802408235008?ref_src=twsrc%5Etfw[/tweet]





    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 RISad Awesome 13
[Aot]
public class E3Mode
{
// Token: 0x060000B2 RISad Awesome 178 RVA: 0x00004C6A File Offset: 0x00002E6A
public static void Start()
{
if (ShowMode.Enable)
{
E3Mode.s_enableAutoBoot = true;
E3Mode.CreateDimmerScreen();
E3Mode.StartMonitorPsImpose();
}
}

// Token: 0x060000B3 RISad Awesome 179 RVA: 0x00004C83 File Offset: 0x00002E83
public static void StartFarsightUI()
{
if (ShowMode.Enable && E3Mode.s_enableAutoBoot)
{
E3Mode.StartAutoBoot();
}
}

// Token: 0x060000B4 RISad Awesome 180 RVA: 0x00004C98 File Offset: 0x00002E98
public static bool IsEnableAutoBoot()
{
return ShowMode.Enable && E3Mode.s_enableAutoBoot;
}

// Token: 0x060000B5 RISad Awesome 181 RVA: 0x00004CA8 File Offset: 0x00002EA8
private static void Stop()
{
E3Mode.s_enableAutoBoot = false;
E3Mode.DestroyDimmerScreen();
E3Mode.StopMonitorPsImpose();
}

// Token: 0x060000B6 RISad Awesome 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 RISad Awesome 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 RISad Awesome 184 RVA: 0x00004DA6 File Offset: 0x00002FA6
private static void StartMonitorPsImpose()
{
LayerManager.UpdateFocusSceneAction += new Action<Scene>(E3Mode.OnUpdateFocusScene);
}

// Token: 0x060000B9 RISad Awesome 185 RVA: 0x00004DB9 File Offset: 0x00002FB9
private static void StopMonitorPsImpose()
{
LayerManager.UpdateFocusSceneAction -= new Action<Scene>(E3Mode.OnUpdateFocusScene);
}

// Token: 0x060000BA RISad Awesome 186 RVA: 0x00004DCC File Offset: 0x00002FCC
private static void OnUpdateFocusScene(Scene scene)
{
if (LayerManager.FindRootContainerScene(scene) == LayerManager.FindScene("PSMenu"))
{
E3Mode.Stop();
}
}

// Token: 0x060000BB RISad Awesome 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 RISad Awesome 188 RVA: 0x00004EE0 File Offset: 0x000030E0
public E3Mode()
{
}

// Token: 0x060000BD RISad Awesome 189 RVA: 0x00004DE5 File Offset: 0x00002FE5
[CompilerGenerated]
private static void <StartAutoBoot>b__5(Utility.AppLauncher obj)
{
E3Mode.Stop();
}

// Token: 0x040000AA RISad Awesome 170
private static bool s_enableAutoBoot;

// Token: 0x040000AB RISad Awesome 171
private static Scene s_dimmerScreen;

// Token: 0x040000AC RISad Awesome 172
[CompilerGenerated]
private static Action<Utility.AppLauncher> CS$<>9__CachedAnonymousMethodDelegate6;

// Token: 0x0200103D RISad Awesome 4157
[CompilerGenerated]
private sealed class <>c__DisplayClass3
{
// Token: 0x06007D59 RISad Awesome 32089 RVA: 0x00004D42 File Offset: 0x00002F42
public <>c__DisplayClass3()
{
}

// Token: 0x06007D5A RISad Awesome 32090 RVA: 0x00004D4A File Offset: 0x00002F4A
public bool <Awesome faceestroyDimmerScreen>b__2()
{
if (BootManager.IsHealthWarningExecuting())
{
return false;
}
this.scene.RemoveFromSuperScene();
return true;
}

// Token: 0x04005272 RISad Awesome 21106
public Scene scene;
}
}
}
10-14-2016, 05:57 PM #2
nice!!
10-14-2016, 10:49 PM #3
Dog88Christian
Hail to the King, Baby!
What's this used for?
10-15-2016, 04:34 AM #4
where can i find the .LIB file so i could have a look
10-15-2016, 05:12 AM #5
shawncarnage
Little One
Downgrade?
10-15-2016, 03:51 PM #6
Para que serve isso?
Continuação de bom trabalho 8-)

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo