支持GAMEBOY

This commit is contained in:
sin365 2025-02-21 13:25:54 +08:00
parent 99a986f801
commit 72edf02773
13 changed files with 1542 additions and 16 deletions

View File

@ -3372,6 +3372,30 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3494583397601441494, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3494583397601441494, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3494583397601441494, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3494583397601441494, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3494583397601441494, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3494583397601441494, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3503037033175468881, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
@ -4312,6 +4336,34 @@ PrefabInstance:
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132893870988580745, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6215373793562089842, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
@ -4488,6 +4540,34 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6638777639981908314, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6649054923859470628, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
@ -4508,6 +4588,10 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6675522891095741603, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6719905869711622945, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
@ -4692,6 +4776,58 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8164210650886440255, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8164210650886440255, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8164210650886440255, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8164210650886440255, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8164210650886440255, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8164210650886440255, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8188495521677218387, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8208748686492600180, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
propertyPath: m_AnchorMax.y
value: 0

View File

@ -817,6 +817,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 3226730524206505336, guid: ece591129eb9bcc48bd83ec153c98018, type: 3}
insertIndex: -1
addedObject: {fileID: 8664827731639454549}
- targetCorrespondingSourceObject: {fileID: 3226730524206505336, guid: ece591129eb9bcc48bd83ec153c98018, type: 3}
insertIndex: -1
addedObject: {fileID: 4494951505442638845}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ece591129eb9bcc48bd83ec153c98018, type: 3}
--- !u!224 &1184851303049462769 stripped
@ -3567,3 +3570,253 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 1998281097548910301, guid: ae0d9b04c112f5b4c98feb0af7ed5676, type: 3}
m_PrefabInstance: {fileID: 7513750463397081986}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8629347071825754065
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2814076563062444116}
m_Modifications:
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 460203047818732930, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 471896259363812078, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 471896259363812078, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 471896259363812078, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 471896259363812078, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 471896259363812078, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 471896259363812078, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1952221633680236903, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: Platform
value: 4
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2512431393477943384, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3127083372996404082, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3161584559533241995, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5169807349761294599, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5169807349761294599, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5169807349761294599, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5169807349761294599, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5169807349761294599, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5169807349761294599, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.x
value: 144
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_SizeDelta.y
value: 104
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.x
value: -72
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_AnchoredPosition.y
value: -1143
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6906796367924543454, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_Text
value: GAME BOY
objectReference: {fileID: 0}
- target: {fileID: 9003373412835913538, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_Text
value: Nintendo Game Boy
objectReference: {fileID: 0}
- target: {fileID: 9106117812833555594, guid: 16523b967a6221241ab1109d556992f4, type: 3}
propertyPath: m_Name
value: GameBoy
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 16523b967a6221241ab1109d556992f4, type: 3}
--- !u!224 &4494951505442638845 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5305486536744057900, guid: 16523b967a6221241ab1109d556992f4, type: 3}
m_PrefabInstance: {fileID: 8629347071825754065}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 16523b967a6221241ab1109d556992f4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -40,7 +40,7 @@ namespace AxibugEmuOnline.Client.ClientCore
private static Dictionary<RomPlatformType, RomLib> s_romLibs = new Dictionary<RomPlatformType, RomLib>();
#region Mono
public static TickLoop tickLoop;
public static TickLoop tick;
public static AudioMgr audioMgr;
private static CoroutineRunner coRunner;
@ -107,7 +107,7 @@ namespace AxibugEmuOnline.Client.ClientCore
mTestSrvIP = testSrvIP;
var go = new GameObject("[AppAxibugEmuOnline]");
GameObject.DontDestroyOnLoad(go);
tickLoop = go.AddComponent<TickLoop>();
tick = go.AddComponent<TickLoop>();
audioMgr = go.AddComponent<AudioMgr>();
coRunner = go.AddComponent<CoroutineRunner>();

View File

@ -52,6 +52,7 @@ public class UEssgee : MonoBehaviour, IEmuCore
void Awake()
{
App.tick.SetFrameRate(60);
instance = this;
uegResources = new UEGResources();
uegLog = new UEGLog();
@ -79,7 +80,6 @@ public class UEssgee : MonoBehaviour, IEmuCore
public void LoadState(object state)
{
Application.targetFrameRate = 60;
emulatorHandler.SetStateData((byte[])state);
}

View File

@ -1,5 +1,4 @@
using System;
using Unity.Android.Gradle.Manifest;
using UnityEngine;
using UnityEngine.UI;

View File

@ -43,10 +43,8 @@ public class UMAME : MonoBehaviour, IEmuCore
public uint Frame => (uint)emu.currEmuFrame;
void Awake()
{
//设为60帧
Application.targetFrameRate = 60;
App.tick.SetFrameRate(60);
// 强制横屏
Screen.orientation = ScreenOrientation.LandscapeLeft;
instance = this;

View File

@ -31,10 +31,7 @@ namespace AxibugEmuOnline.Client
private void Start()
{
//关闭垂直同步
QualitySettings.vSyncCount = 0;
//设为60帧
Application.targetFrameRate = 60;
App.tick.SetFrameRate(60);
VideoProvider.NesEmu = this;
AudioProvider.NesEmu = this;
}

View File

@ -53,7 +53,7 @@ namespace AxibugEmuOnline.Client
}
else
{
Debug.LogError(overTask.downloadHandler.ErrInfo);
Debug.LogError($"{overTask.downloadHandler.ErrInfo}:{overTask.downloadHandler.url}");
}
}
}

View File

@ -71,7 +71,7 @@ namespace AxibugEmuOnline.Client
{
Directory.CreateDirectory(dir);
}
return $"{dir}/{App.tickLoop.GetDateTimeStr()}";
return $"{dir}/{App.tick.GetDateTimeStr()}";
}
void BeginRecording(int frequency, int channels)

View File

@ -78,7 +78,7 @@ namespace AxibugEmuOnline.Client
int randSeed = new System.Random().Next(0, int.MaxValue);
LastPingSeed = randSeed;
LastStartPingTime = App.tickLoop.sw.Elapsed;
LastStartPingTime = App.tick.sw.Elapsed;
Protobuf_Ping resp = new Protobuf_Ping()
{
Seed = randSeed,
@ -105,7 +105,7 @@ namespace AxibugEmuOnline.Client
if (LastPingSeed == msg.Seed)
{
TimeSpan current = App.tickLoop.sw.Elapsed;
TimeSpan current = App.tick.sw.Elapsed;
TimeSpan delta = current - LastStartPingTime;
NetDelays.Add(delta.TotalSeconds);
@ -129,5 +129,12 @@ namespace AxibugEmuOnline.Client
{
return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
}
internal void SetFrameRate(int rate)
{//关闭垂直同步
QualitySettings.vSyncCount = 0;
//设为60帧
Application.targetFrameRate = rate;
}
}
}

View File

@ -77,7 +77,7 @@ public class XMBInfoBar : MonoBehaviour
{
if (App.user.IsLoggedIn)
{
DelayValue.text = $"{App.tickLoop.AveNetDelay * 1000:0}ms";
DelayValue.text = $"{App.tick.AveNetDelay * 1000:0}ms";
OnlinePlayerCount.text = App.user.OnlinePlayerCount.ToString();
}
else