From 7085cdaa2cbc767e98908d2732ac3a8f335c0a96 Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Fri, 24 Jan 2025 15:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E6=9E=9A=E4=B8=BE=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmame=E9=94=AE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MameEmulator/UniInterface/UniKeyboard.cs | 25 +++++++++---------- .../Protobuf/ProtobufAxibugEmuOnline.cs | 17 ++++++++----- .../proto/protobuf_AxibugEmuOnline.proto | 1 + 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UniInterface/UniKeyboard.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UniInterface/UniKeyboard.cs index ecd178e6..3c5ed6c8 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UniInterface/UniKeyboard.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Emulator/MameEmulator/UniInterface/UniKeyboard.cs @@ -243,23 +243,22 @@ public class MameSingleConoller : IController if (!ConnectSlot.HasValue) return 0; mTempSingleAllInput = 0; - if (Input.GetKey(INSERT_COIN)) return mTempSingleAllInput |= (ulong)tg_INSERT_COIN; - if (Input.GetKey(GAMESTART)) return mTempSingleAllInput |= (ulong)tg_GAMESTART; - if (Input.GetKey(UP)) return mTempSingleAllInput |= (ulong)tg_UP; - if (Input.GetKey(DOWN)) return mTempSingleAllInput |= (ulong)tg_DOWN; - if (Input.GetKey(LEFT)) return mTempSingleAllInput |= (ulong)tg_LEFT; - if (Input.GetKey(RIGHT)) return mTempSingleAllInput |= (ulong)tg_RIGHT; - if (Input.GetKey(BTN_A)) return mTempSingleAllInput |= (ulong)tg_BTN_A; - if (Input.GetKey(BTN_B)) return mTempSingleAllInput |= (ulong)tg_BTN_B; - if (Input.GetKey(BTN_C)) return mTempSingleAllInput |= (ulong)tg_BTN_C; - if (Input.GetKey(BTN_D)) return mTempSingleAllInput |= (ulong)tg_BTN_D; - if (Input.GetKey(BTN_E)) return mTempSingleAllInput |= (ulong)tg_BTN_E; - if (Input.GetKey(BTN_F)) return mTempSingleAllInput |= (ulong)tg_BTN_F; + if (Input.GetKey(INSERT_COIN)) mTempSingleAllInput |= (ulong)tg_INSERT_COIN; + if (Input.GetKey(GAMESTART)) mTempSingleAllInput |= (ulong)tg_GAMESTART; + if (Input.GetKey(UP)) mTempSingleAllInput |= (ulong)tg_UP; + if (Input.GetKey(DOWN)) mTempSingleAllInput |= (ulong)tg_DOWN; + if (Input.GetKey(LEFT)) mTempSingleAllInput |= (ulong)tg_LEFT; + if (Input.GetKey(RIGHT)) mTempSingleAllInput |= (ulong)tg_RIGHT; + if (Input.GetKey(BTN_A)) mTempSingleAllInput |= (ulong)tg_BTN_A; + if (Input.GetKey(BTN_B)) mTempSingleAllInput |= (ulong)tg_BTN_B; + if (Input.GetKey(BTN_C)) mTempSingleAllInput |= (ulong)tg_BTN_C; + if (Input.GetKey(BTN_D)) mTempSingleAllInput |= (ulong)tg_BTN_D; + if (Input.GetKey(BTN_E)) mTempSingleAllInput |= (ulong)tg_BTN_E; + if (Input.GetKey(BTN_F)) mTempSingleAllInput |= (ulong)tg_BTN_F; return mTempSingleAllInput; } } - public static class MameSingleControllSetter { public static void LoadControlKeyForConfig(this MameSingleConoller singlecontrol) diff --git a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs index af7ff2fd..abd7e0b8 100644 --- a/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Server/Protobuf/ProtobufAxibugEmuOnline.cs @@ -157,15 +157,16 @@ namespace AxibugProtobuf { "bB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goRTG9n", + "aW5SZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1", + "bHQQABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.RomPlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -473,6 +474,10 @@ namespace AxibugProtobuf { [pbr::OriginalName("Coleco_Vision")] ColecoVision = 6, [pbr::OriginalName("SC_3000")] Sc3000 = 7, [pbr::OriginalName("SG_1000")] Sg1000 = 8, + [pbr::OriginalName("NEOGEO")] Neogeo = 20, + [pbr::OriginalName("IGS")] Igs = 21, + [pbr::OriginalName("CPS1")] Cps1 = 22, + [pbr::OriginalName("CPS2")] Cps2 = 23, [pbr::OriginalName("All")] All = 999, } diff --git a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto index 4e84ad17..1144d800 100644 --- a/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto +++ b/ProtobufCore/proto/protobuf_AxibugEmuOnline.proto @@ -147,6 +147,7 @@ enum RomPlatformType IGS = 21; CPS1 = 22; CPS2 = 23; + Arcade_OLD = 30 All = 999; }