From c6d6d45d9012646e83935f9af8fc0349be2bed7a Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Tue, 4 Nov 2025 13:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=B0=81=E9=9D=A2=E5=9B=BE?= =?UTF-8?q?=EF=BC=8C=E5=8D=B3=E6=97=B6=E5=AD=98=E6=A1=A3=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=A4=84=E7=90=86=E6=88=AA=E5=9B=BE=E6=9C=9D?= =?UTF-8?q?=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AxibugEmuOnline.Client/Assets/Script/AppMain/EmuCore.cs | 5 +++++ .../Script/AppMain/Emulator/EssgeeEmulator/UEssgee.cs | 1 + .../Assets/Script/AppMain/Emulator/MameEmulator/UMAME.cs | 6 +----- .../Script/AppMain/Emulator/NesEmulator/NesEmulator.cs | 1 + .../AppMain/Emulator/StoicGooseEmulator/UStoicGoose.cs | 3 +++ .../Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs | 2 +- .../AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/EmuCore.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/EmuCore.cs index dfaebcec..2014c0a1 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/EmuCore.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/EmuCore.cs @@ -44,6 +44,11 @@ namespace AxibugEmuOnline.Client public abstract Texture OutputPixel { get; } public abstract RawImage DrawCanvas { get; } + /// + /// 渲染朝向,用于截图 + /// + public abstract Vector3 DrawLocalScale { get; } + /// 指示该游戏实例是否处于联机模式 public bool IsNetPlay diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/EssgeeEmulator/UEssgee.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/EssgeeEmulator/UEssgee.cs index f21a7735..31a63544 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/EssgeeEmulator/UEssgee.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/EssgeeEmulator/UEssgee.cs @@ -30,6 +30,7 @@ public class UEssgee : EmuCore public override Texture OutputPixel => graphicsHandler.rawBufferWarper; public override RawImage DrawCanvas => graphicsHandler.DrawCanvas; + public override Vector3 DrawLocalScale => new Vector3(1, -1, 1); public static bool bLogicUpdatePause { get; private set; } #region diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UMAME.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UMAME.cs index 7532ee89..434a5367 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UMAME.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UMAME.cs @@ -230,11 +230,7 @@ public class UMAME : EmuCore br.Close(); fs.Close(); } - - public override Texture OutputPixel => mUniVideoPlayer.rawBufferWarper; - public override RawImage DrawCanvas => mUniVideoPlayer.DrawCanvas; - - + public override Vector3 DrawLocalScale => new Vector3(1, -1, 1); } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator.cs index 38b31b2b..3c81dfaa 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator.cs @@ -167,6 +167,7 @@ namespace AxibugEmuOnline.Client public override Texture OutputPixel => VideoProvider.OutputPixel; public override RawImage DrawCanvas => VideoProvider.Drawer; + public override Vector3 DrawLocalScale => DrawCanvas.transform.localScale; public override void GetAudioParams(out int frequency, out int channels) { AudioProvider.GetAudioParams(out frequency, out channels); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/StoicGooseEmulator/UStoicGoose.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/StoicGooseEmulator/UStoicGoose.cs index 9247d6e9..a718e644 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/StoicGooseEmulator/UStoicGoose.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/StoicGooseEmulator/UStoicGoose.cs @@ -57,6 +57,9 @@ public class UStoicGoose : EmuCore public override Texture OutputPixel => graphicsHandler.rawBufferWarper; public override RawImage DrawCanvas => graphicsHandler.DrawCanvas; + + public override Vector3 DrawLocalScale => DrawCanvas.transform.localScale; + public override object GetState() { throw new NotImplementedException(); diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs index b98ed527..74e97dbd 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs @@ -99,7 +99,7 @@ namespace AxibugEmuOnline.Client var stateData = m_ingameUI.Core.GetStateBytes(); var tex = m_ingameUI.Core.OutputPixel; - var screenData = tex.ToJPG(m_ingameUI.Core.DrawCanvas.transform.localScale); + var screenData = tex.ToJPG(m_ingameUI.Core.DrawLocalScale); m_savFile.Save(m_savFile.Sequecen + 1, stateData, screenData); } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs index d7ca550b..360eeb19 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI_UploadGameCoverImg.cs @@ -15,7 +15,7 @@ namespace AxibugEmuOnline.Client public override void OnExcute(OptionUI optionUI, ref bool cancelHide) { var tex = m_gameUI.Core.OutputPixel; - var screenData = tex.ToJPG(m_gameUI.Core.DrawCanvas.transform.localScale); + var screenData = tex.ToJPG(m_gameUI.Core.DrawLocalScale); App.share.SendUpLoadGameScreenCover(m_gameUI.RomFile.ID, screenData); } }