diff options
| author | 1992414357@qq.com <1992414357@qq.com> | 2025-05-29 14:20:04 +0800 |
|---|---|---|
| committer | 1992414357@qq.com <1992414357@qq.com> | 2025-05-29 14:20:04 +0800 |
| commit | 3d23632d7c6330e0ec98dad53656dfed5f5767b0 (patch) | |
| tree | d8d59726ca5b046b55ba502f1b8d5ba3a561a569 | |
| parent | 9d3d6d4195e58c51166811d8357a331d53c4cdd4 (diff) | |
1. 优化了服务器的消息处理方式
2. 将c和c#的绑定移动到了./bindings/文件夹
| -rw-r--r-- | .cargo/config.toml | 7 | ||||
| -rw-r--r-- | .cargo/scripts/generate_documents.bat | 59 | ||||
| -rw-r--r-- | .cargo/scripts/release_console/generate_console_release_file.bat | 63 | ||||
| -rw-r--r-- | .cargo/scripts/release_files_win | 10 | ||||
| -rw-r--r-- | .cargo/scripts/release_project.bat | 22 | ||||
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | .idea/NoGamepads.iml | 7 | ||||
| -rw-r--r-- | .idea/runConfigurations/Release_Project.xml | 20 | ||||
| -rw-r--r-- | .idea/runConfigurations/Run_Client_Console.xml | 2 | ||||
| -rw-r--r-- | .idea/runConfigurations/Run_Server_Console.xml | 2 | ||||
| -rw-r--r-- | .idea/runConfigurations/_LEGACY__Generate_Documents__Win_.xml | 17 | ||||
| -rw-r--r-- | .idea/runConfigurations/_LEGACY__Release_Project__Win_.xml | 17 | ||||
| -rw-r--r-- | Cargo.lock | 23 | ||||
| -rw-r--r-- | Cargo.toml | 7 | ||||
| -rw-r--r-- | Config_Export.toml (renamed from Release.toml) | 4 | ||||
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | bindings/c/Cargo.toml | 15 | ||||
| -rw-r--r-- | bindings/c/build.rs (renamed from core_c/build.rs) | 20 | ||||
| -rw-r--r-- | bindings/c/src/data_c/common.rs (renamed from core_c/src/data_c/common.rs) | 0 | ||||
| -rw-r--r-- | bindings/c/src/data_c/connection_callback_message_c.rs (renamed from core_c/src/data_c/connection_callback_message_c.rs) | 4 | ||||
| -rw-r--r-- | bindings/c/src/data_c/connection_message_c.rs (renamed from core_c/src/data_c/connection_message_c.rs) | 4 | ||||
| -rw-r--r-- | bindings/c/src/data_c/control_message_c.rs (renamed from core_c/src/data_c/control_message_c.rs) | 4 | ||||
| -rw-r--r-- | bindings/c/src/data_c/game_message_c.rs (renamed from core_c/src/data_c/game_message_c.rs) | 4 | ||||
| -rw-r--r-- | bindings/c/src/data_c/game_profile_c.rs (renamed from core_c/src/data_c/game_profile_c.rs) | 12 | ||||
| -rw-r--r-- | bindings/c/src/data_c/mod.rs (renamed from core_c/src/data_c/mod.rs) | 0 | ||||
| -rw-r--r-- | bindings/c/src/data_c/player_info_c.rs (renamed from core_c/src/data_c/player_info_c.rs) | 12 | ||||
| -rw-r--r-- | bindings/c/src/data_c/player_info_list_c.rs (renamed from core_c/src/data_c/player_info_list_c.rs) | 0 | ||||
| -rw-r--r-- | bindings/c/src/lib.rs (renamed from core_c/src/lib.rs) | 0 | ||||
| -rw-r--r-- | bindings/c/src/service_c/common.rs (renamed from core_c/src/service_c/common.rs) | 0 | ||||
| -rw-r--r-- | bindings/c/src/service_c/mod.rs (renamed from core_c/src/service_c/mod.rs) | 2 | ||||
| -rw-r--r-- | bindings/c/src/service_c/padclient.rs (renamed from core_c/src/service_c/padclient.rs) | 10 | ||||
| -rw-r--r-- | bindings/c/src/service_c/padserver.rs (renamed from core_c/src/service_c/padserver.rs) | 22 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/.gitignore (renamed from core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/.gitignore) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/indexLayout.xml (renamed from core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/indexLayout.xml) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/vcs.xml (renamed from core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/vcs.xml) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/.run/Run Example.run.xml (renamed from core_csharp/NoGamepadsSharp/.run/Run Example.run.xml) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp.sln (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp.sln) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/GameProfile.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/GameProfile.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/HsvColor.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/HsvColor.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/PlayerInfo.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/PlayerInfo.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/NoGamepadsSharp_Core.csproj (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/NoGamepadsSharp_Core.csproj) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadClient.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadClient.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadServer.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadServer.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.dll) | bin | 4096 -> 4096 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.pdb (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.pdb) | bin | 10692 -> 10692 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Data.deps.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Data.deps.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/nogamepads_lib_c.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/nogamepads_lib_c.dll) | bin | 2114560 -> 2114560 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfo.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfo.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfoInputs.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfoInputs.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GeneratedMSBuildEditorConfig.editorconfig (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GeneratedMSBuildEditorConfig.editorconfig) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GlobalUsings.g.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GlobalUsings.g.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.assets.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.assets.cache) | bin | 157 -> 157 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfo.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfo.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfoInputs.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfoInputs.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GeneratedMSBuildEditorConfig.editorconfig (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GeneratedMSBuildEditorConfig.editorconfig) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GlobalUsings.g.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GlobalUsings.g.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.assets.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.assets.cache) | bin | 157 -> 157 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.CoreCompileInputs.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.CoreCompileInputs.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.FileListAbsolute.txt (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.FileListAbsolute.txt) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.dll) | bin | 4096 -> 4096 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.pdb (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.pdb) | bin | 10692 -> 10692 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.sourcelink.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.sourcelink.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/ref/NoGamepadsSharp_Data.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/ref/NoGamepadsSharp_Data.dll) | bin | 5120 -> 5120 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/refint/NoGamepadsSharp_Data.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/refint/NoGamepadsSharp_Data.dll) | bin | 5120 -> 5120 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.dgspec.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.dgspec.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.props (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.props) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.targets (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.targets) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.dgspec.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.dgspec.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.props (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.props) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.targets (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.targets) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.assets.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.assets.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.nuget.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.nuget.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.packagespec.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.packagespec.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.model.nuget.info (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.model.nuget.info) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.restore.info (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.restore.info) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/NoGamepadsSharp_Execute.csproj (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/NoGamepadsSharp_Execute.csproj) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/Program.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/Program.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.deps.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.deps.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.dll) | bin | 5120 -> 5120 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.exe (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.exe) | bin | 139264 -> 139264 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.pdb (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.pdb) | bin | 10760 -> 10760 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.runtimeconfig.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.runtimeconfig.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/nogamepads_lib_c.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/nogamepads_lib_c.dll) | bin | 2128896 -> 2128896 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfo.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfo.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfoInputs.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfoInputs.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GeneratedMSBuildEditorConfig.editorconfig (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GeneratedMSBuildEditorConfig.editorconfig) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GlobalUsings.g.cs (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GlobalUsings.g.cs) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.assets.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.assets.cache) | bin | 157 -> 157 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.CoreCompileInputs.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.CoreCompileInputs.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.FileListAbsolute.txt (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.FileListAbsolute.txt) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.dll) | bin | 5120 -> 5120 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.genruntimeconfig.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.genruntimeconfig.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.pdb (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.pdb) | bin | 10760 -> 10760 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.sourcelink.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.sourcelink.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/apphost.exe (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/apphost.exe) | bin | 139264 -> 139264 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/ref/NoGamepadsSharp_Execute.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/ref/NoGamepadsSharp_Execute.dll) | bin | 6144 -> 6144 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/refint/NoGamepadsSharp_Execute.dll (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/refint/NoGamepadsSharp_Execute.dll) | bin | 6144 -> 6144 bytes | |||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.dgspec.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.dgspec.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.props (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.props) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.targets (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.targets) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.assets.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.assets.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.nuget.cache (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.nuget.cache) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.packagespec.json (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.packagespec.json) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.model.nuget.info (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.model.nuget.info) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.restore.info (renamed from core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.restore.info) | 0 | ||||
| -rw-r--r-- | bindings/csharp/NoGamepadsSharp/global.json (renamed from core_csharp/NoGamepadsSharp/global.json) | 0 | ||||
| -rw-r--r-- | console/Cargo.toml | 1 | ||||
| -rw-r--r-- | console/src/bin/nogpads.rs | 144 | ||||
| -rw-r--r-- | core/Cargo.toml | 2 | ||||
| -rw-r--r-- | core/examples/start_client_console.rs | 8 | ||||
| -rw-r--r-- | core/examples/start_server_console.rs | 17 | ||||
| -rw-r--r-- | core/src/pad_data/game_layout.rs | 9 | ||||
| -rw-r--r-- | core/src/pad_data/layout.rs | 137 | ||||
| -rw-r--r-- | core/src/pad_data/mod.rs | 2 | ||||
| -rw-r--r-- | core/src/pad_service/client.rs | 25 | ||||
| -rw-r--r-- | core/src/pad_service/server.rs | 287 | ||||
| -rw-r--r-- | core/src/pad_service/server_debug_cli.rs | 64 | ||||
| -rw-r--r-- | core_c/Cargo.toml | 13 | ||||
| -rw-r--r-- | documents/About Toolchain - 关于 Rust 工具链.md | 17 | ||||
| -rw-r--r-- | documents/路线.md | 4 | ||||
| -rw-r--r-- | export/.gitignore | 5 | ||||
| -rw-r--r-- | export/Cargo.toml (renamed from release/Cargo.toml) | 4 | ||||
| -rw-r--r-- | export/src/bin/export_project.rs (renamed from release/src/bin/release_project.rs) | 16 | ||||
| -rw-r--r-- | release/0.1.0/LICENSE-LGPL-2 | 464 | ||||
| -rw-r--r-- | release/0.1.0/LICENSE-THIRD-PARTY | 649 | ||||
| -rw-r--r-- | release/0.1.0/bin/nogpadc.exe | bin | 2237440 -> 0 bytes | |||
| -rw-r--r-- | release/0.1.0/bin/nogpads.exe | bin | 2195456 -> 0 bytes | |||
| -rw-r--r-- | release/0.1.0/bridge/nogamepads.h | 202 | ||||
| -rw-r--r-- | release/0.1.0/bridge/nogamepads_cpp.h | 207 | ||||
| -rw-r--r-- | release/0.1.0/bridge/nogamepads_lib_c.dll | bin | 2128896 -> 0 bytes | |||
| -rw-r--r-- | src/console_utils.rs | 2 |
133 files changed, 671 insertions, 1992 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml index f605948..b4690fc 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,4 +2,9 @@ target-dir = "./.cargo/shared/target" [env] -PROJECT_VERSION = { value = "0.1.0" }
\ No newline at end of file +PROJECT_VERSION = { value = "0.1.0" } + +TEST_PLAYER_ACCOUNT = { value = "Juliet_Smile" } +TEST_PLAYER_PASSWORD = { value = "juliet09881652@@__" } + +TEST_PLAYER_NICKNAME = { value = "juliet" }
\ No newline at end of file diff --git a/.cargo/scripts/generate_documents.bat b/.cargo/scripts/generate_documents.bat deleted file mode 100644 index edde8ea..0000000 --- a/.cargo/scripts/generate_documents.bat +++ /dev/null @@ -1,59 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -:: ================= 路径 ================= -set "CARGO_TARGET_DIR=.\.cargo\shared\target" -set "DOC_SOURCE_DIR=%CARGO_TARGET_DIR%\doc" -set "DOC_DEST_DIR=.\documents\cargo_doc" - -:: ============== Crate 列表 ============== -set "CRATE_PATHS=core console" - -:: =============== 文档路径 =============== -set "DOC_LINK_PATHS=nogamepads_core nogpadc nogpads" - -:: =============== 生成文档 =============== -if not exist "%DOC_DEST_DIR%" mkdir "%DOC_DEST_DIR%" -:: cargo clean --target-dir "%CARGO_TARGET_DIR%" -for %%c in (%CRATE_PATHS%) do ( - echo [INFO] Generating documentation for crate: %%c - cargo doc --no-deps --manifest-path "./%%c/Cargo.toml" - if !errorlevel! neq 0 ( - echo [ERROR] Failed to generate docs for crate: %%c - exit /b !errorlevel! - ) -) - -:: ============== 清理旧文件 ============== -if exist "%DOC_DEST_DIR%" ( - echo [INFO] Removing old documents... - rmdir /s /q "%DOC_DEST_DIR%" -) - -:: ============== 复制新文件 ============== -echo [INFO] Copying new documents to %DOC_DEST_DIR%... -xcopy /E /I /Q /Y "%DOC_SOURCE_DIR%" "%DOC_DEST_DIR%" -if !errorlevel! neq 0 ( - echo [ERROR] Failed to copy documents - exit /b !errorlevel! -) - -:: ================= 清理 ================= -:: Uncomment to clean generated docs from target directory -:: rmdir /s /q "%DOC_SOURCE_DIR%" - -:: =============== 生成链接 =============== -echo. -echo [DOCUMENTATION LINKS] - -:: 获取当前目录绝对路径(转换为URL格式) -set "CURRENT_DIR=%CD:\=/%" - -:: 遍历自定义路径列表 -for %%p in (%DOC_LINK_PATHS%) do ( - set "HTML_PATH=file:///%CURRENT_DIR%/documents/cargo_doc/%%p/index.html" - echo !HTML_PATH! -) - -echo [SUCCESS] Documentation generated at: %DOC_DEST_DIR% -endlocal
\ No newline at end of file diff --git a/.cargo/scripts/release_console/generate_console_release_file.bat b/.cargo/scripts/release_console/generate_console_release_file.bat deleted file mode 100644 index 601391b..0000000 --- a/.cargo/scripts/release_console/generate_console_release_file.bat +++ /dev/null @@ -1,63 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -:: ================= 路径 ================= -:: 源文件目录 -set "CONSOLE_DIR=.cargo\shared\target\release\deps" -:: 待复制文件列表 -set "FILE_LIST=.cargo\scripts\release_files_win" -:: 控制台文件目标目录(基础路径) -set "BASE_DEST_DIR=release\dev\" -:: 证书文件 -set "LICENSE_FILE=LICENSE-LGPL-2" -set "LICENSE_TP_FILE=LICENSE-THIRD-PARTY" - -:: ============= 创建基础目录 ============= -if not exist "%BASE_DEST_DIR%" mkdir "%BASE_DEST_DIR%" - -:: =========== 清空目标目录内容 =========== -if exist "%BASE_DEST_DIR%" ( - echo [INFO] Cleaning target directory "%BASE_DEST_DIR%" - :: 删除所有文件(包括隐藏/只读文件) - del /f /s /q "%BASE_DEST_DIR%\*.*" >nul 2>&1 - :: 递归删除所有子目录 - for /d %%D in ("%BASE_DEST_DIR%\*") do rd /s /q "%%D" >nul 2>&1 -) - -:: ======== 读取文件列表并复制文件 ======== -for /f "delims=" %%F in ('findstr /v /r "^// ^$" "%FILE_LIST%"') do ( - set "line=%%F" - :: 分割行内容为 filename 和相对路径 - for /f "tokens=1,* delims=:" %%A in ("!line!") do ( - set "filename=%%A" - set "rel_path=%%B" - ) - :: 去除两端的空格 - for /f "tokens=* delims= " %%L in ("!filename!") do set "filename=%%L" - for /f "tokens=* delims= " %%P in ("!rel_path!") do set "rel_path=%%P" - :: 构造完整目标路径 - set "dest_path=%BASE_DEST_DIR%!rel_path:.\=!" - :: 提取目标目录并创建 - for %%I in ("!dest_path!") do set "dest_dir=%%~dpI" - if not exist "!dest_dir!" mkdir "!dest_dir!" - :: 复制文件 - set "source_file=%CONSOLE_DIR%\!filename!" - if exist "!source_file!" ( - echo [INFO] Copying "!filename!" to "!dest_path!" - copy /Y "!source_file!" "!dest_path!" >nul - if errorlevel 1 ( - echo [ERROR] Failed to copy "!filename!" - ) else ( - echo [SUCCESS] Copied "!filename!" - ) - ) else ( - echo [ERROR] Source file "!source_file!" not found - ) -) - -:: ============= 复制证书文件 ============= -copy /Y "%LICENSE_FILE%" "%BASE_DEST_DIR%\" >nul -copy /Y "%LICENSE_TP_FILE%" "%BASE_DEST_DIR%\" >nul - -endlocal -exit /b 0
\ No newline at end of file diff --git a/.cargo/scripts/release_files_win b/.cargo/scripts/release_files_win deleted file mode 100644 index b82e833..0000000 --- a/.cargo/scripts/release_files_win +++ /dev/null @@ -1,10 +0,0 @@ -// 控制台部分 -nogpadc.exe : .\bin\nogpadc.exe -nogpads.exe : .\bin\nogpads.exe - -// Dll部分 -nogamepads_c.dll : .\bridge\nogamepads.dll - -// Header部分 -nogamepads.h : .\bridge\nogamepads.h -nogamepads_cpp.h : .\bridge\nogamepads_cpp.h
\ No newline at end of file diff --git a/.cargo/scripts/release_project.bat b/.cargo/scripts/release_project.bat deleted file mode 100644 index dbe9686..0000000 --- a/.cargo/scripts/release_project.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -:: ================= 路径 ================= -:: 打包地址 -set "RELEASE_DIR=release\dev" - -:: ================= 构建 ================= -:: 控制台程序 -echo [INFO] Building ... -cargo build --workspace --release -echo Done. -echo - -:: =============== 发布文件 =============== -echo -echo [INFO] Generating release files -call .\.cargo\scripts\release_console\generate_console_release_file.bat - -explorer.exe ".\%RELEASE_DIR%\" - -echo Done.
\ No newline at end of file @@ -1,3 +1,3 @@ /.cargo/shared/ -/release/dev/ +/export/dev/ /documents/cargo_doc/
\ No newline at end of file diff --git a/.idea/NoGamepads.iml b/.idea/NoGamepads.iml index 17b7bad..12250e9 100644 --- a/.idea/NoGamepads.iml +++ b/.idea/NoGamepads.iml @@ -6,14 +6,15 @@ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/console/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/core/examples" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/core_c/src" isTestSource="false" /> - <sourceFolder url="file://$MODULE_DIR$/release/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/bindings/c/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/export/src" isTestSource="false" /> <excludeFolder url="file://$MODULE_DIR$/.cargo/shared" /> <excludeFolder url="file://$MODULE_DIR$/core/target" /> <excludeFolder url="file://$MODULE_DIR$/target" /> <excludeFolder url="file://$MODULE_DIR$/console/target" /> <excludeFolder url="file://$MODULE_DIR$/documents/cargo_doc" /> - <excludeFolder url="file://$MODULE_DIR$/release/dev" /> + <excludeFolder url="file://$MODULE_DIR$/export/0.1.0" /> + <excludeFolder url="file://$MODULE_DIR$/export/dev" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> diff --git a/.idea/runConfigurations/Release_Project.xml b/.idea/runConfigurations/Release_Project.xml deleted file mode 100644 index b614f1b..0000000 --- a/.idea/runConfigurations/Release_Project.xml +++ /dev/null @@ -1,20 +0,0 @@ -<component name="ProjectRunConfigurationManager"> - <configuration default="false" name="Release Project" type="CargoCommandRunConfiguration" factoryName="Cargo Command"> - <option name="buildProfileId" value="dev" /> - <option name="command" value="run --manifest-path .\release\Cargo.toml --bin release_project" /> - <option name="workingDirectory" value="file://$PROJECT_DIR$" /> - <envs /> - <option name="emulateTerminal" value="true" /> - <option name="channel" value="DEFAULT" /> - <option name="requiredFeatures" value="true" /> - <option name="allFeatures" value="false" /> - <option name="withSudo" value="false" /> - <option name="buildTarget" value="REMOTE" /> - <option name="backtrace" value="SHORT" /> - <option name="isRedirectInput" value="false" /> - <option name="redirectInputPath" value="" /> - <method v="2"> - <option name="RunConfigurationTask" enabled="true" run_configuration_name="Final Build" run_configuration_type="CargoCommandRunConfiguration" /> - </method> - </configuration> -</component>
\ No newline at end of file diff --git a/.idea/runConfigurations/Run_Client_Console.xml b/.idea/runConfigurations/Run_Client_Console.xml index f0ea024..01b3f83 100644 --- a/.idea/runConfigurations/Run_Client_Console.xml +++ b/.idea/runConfigurations/Run_Client_Console.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="Run Client Console" type="CargoCommandRunConfiguration" factoryName="Cargo Command"> + <configuration default="false" name="Run Client Console" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Run"> <option name="command" value="run --package nogamepads-core --example start_client_console" /> <option name="workingDirectory" value="file://$PROJECT_DIR$" /> <envs /> diff --git a/.idea/runConfigurations/Run_Server_Console.xml b/.idea/runConfigurations/Run_Server_Console.xml index 14e6f92..ed24c68 100644 --- a/.idea/runConfigurations/Run_Server_Console.xml +++ b/.idea/runConfigurations/Run_Server_Console.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="Run Server Console" type="CargoCommandRunConfiguration" factoryName="Cargo Command"> + <configuration default="false" name="Run Server Console" type="CargoCommandRunConfiguration" factoryName="Cargo Command" folderName="Run"> <option name="command" value="run --package nogamepads-core --example start_server_console" /> <option name="workingDirectory" value="file://$PROJECT_DIR$" /> <envs /> diff --git a/.idea/runConfigurations/_LEGACY__Generate_Documents__Win_.xml b/.idea/runConfigurations/_LEGACY__Generate_Documents__Win_.xml deleted file mode 100644 index ac23adf..0000000 --- a/.idea/runConfigurations/_LEGACY__Generate_Documents__Win_.xml +++ /dev/null @@ -1,17 +0,0 @@ -<component name="ProjectRunConfigurationManager"> - <configuration default="false" name="[LEGACY] Generate Documents (Win)" type="ShConfigurationType"> - <option name="SCRIPT_TEXT" value="" /> - <option name="INDEPENDENT_SCRIPT_PATH" value="false" /> - <option name="SCRIPT_PATH" value="$PROJECT_DIR$/.cargo/scripts/generate_documents.bat" /> - <option name="SCRIPT_OPTIONS" value="" /> - <option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" /> - <option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - <option name="INDEPENDENT_INTERPRETER_PATH" value="true" /> - <option name="INTERPRETER_PATH" value="" /> - <option name="INTERPRETER_OPTIONS" value="" /> - <option name="EXECUTE_IN_TERMINAL" value="true" /> - <option name="EXECUTE_SCRIPT_FILE" value="true" /> - <envs /> - <method v="2" /> - </configuration> -</component>
\ No newline at end of file diff --git a/.idea/runConfigurations/_LEGACY__Release_Project__Win_.xml b/.idea/runConfigurations/_LEGACY__Release_Project__Win_.xml deleted file mode 100644 index c8280f4..0000000 --- a/.idea/runConfigurations/_LEGACY__Release_Project__Win_.xml +++ /dev/null @@ -1,17 +0,0 @@ -<component name="ProjectRunConfigurationManager"> - <configuration default="false" name="[LEGACY] Release Project (Win)" type="ShConfigurationType"> - <option name="SCRIPT_TEXT" value="" /> - <option name="INDEPENDENT_SCRIPT_PATH" value="false" /> - <option name="SCRIPT_PATH" value="$PROJECT_DIR$/.cargo/scripts/release_project.bat" /> - <option name="SCRIPT_OPTIONS" value="" /> - <option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="false" /> - <option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - <option name="INDEPENDENT_INTERPRETER_PATH" value="true" /> - <option name="INTERPRETER_PATH" value="" /> - <option name="INTERPRETER_OPTIONS" value="" /> - <option name="EXECUTE_IN_TERMINAL" value="true" /> - <option name="EXECUTE_SCRIPT_FILE" value="true" /> - <envs /> - <method v="2" /> - </configuration> -</component>
\ No newline at end of file @@ -645,6 +645,14 @@ dependencies = [ ] [[package]] +name = "nogamepads-c" +version = "0.0.0" +dependencies = [ + "cbindgen", + "nogamepads-core", +] + +[[package]] name = "nogamepads-console" version = "0.0.0" dependencies = [ @@ -667,17 +675,18 @@ dependencies = [ "hex", "log", "nogamepads", + "prettytable-rs", "serde", "sha1", "tokio", ] [[package]] -name = "nogamepads_c" +name = "nogamepads_export" version = "0.0.0" dependencies = [ - "cbindgen", - "nogamepads-core", + "serde", + "toml 0.7.8", ] [[package]] @@ -928,14 +937,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] -name = "release" -version = "0.0.0" -dependencies = [ - "serde", - "toml 0.7.8", -] - -[[package]] name = "rpassword" version = "7.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -15,10 +15,13 @@ edition = "2024" members = [ "core", "console", - "core_c", - "release" + "bindings/c", + "export" ] +[workspace.package] +version = "0.1.0" + [dependencies] env_logger = "0.10.2" shell-words = "1.1.0" diff --git a/Release.toml b/Config_Export.toml index 8718e70..502cc11 100644 --- a/Release.toml +++ b/Config_Export.toml @@ -1,9 +1,9 @@ -[release.root] #./ +[release.root] license = { raw = "./", target = "./", files = ["LICENSE-LGPL-2", "LICENSE-THIRD-PARTY"] } +#./.cargo/shared/target/export/deps [release.deps] -#./.cargo/shared/target/release/deps header = { raw = "./", target = "./bridge", files = ["nogamepads_cpp.h", "nogamepads.h"] } dll = { raw = "./", target = "./bridge", files = ["nogamepads_lib_c.dll"] } binaries = { raw = "./", target = "./bin", files = ["nogpadc.exe", "nogpads.exe"] }
\ No newline at end of file @@ -12,3 +12,16 @@ 这是一个长期的项目,我们的目的是拓展游戏的操作方式,在线下和朋友联机的时候也不必被手柄数量所局促。为大多主流游戏引擎设计接口的目的也是希望更多的人参与到我们的项目! +## 构建 + +### 构建当前工作区 + +```shell +cargo build --workspace --release +``` + +### 发布当前项目 + +```shell +cargo run --manifest-path .\export\Cargo.toml --bin export_project +```
\ No newline at end of file diff --git a/bindings/c/Cargo.toml b/bindings/c/Cargo.toml new file mode 100644 index 0000000..4f9f7f5 --- /dev/null +++ b/bindings/c/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "nogamepads-c" + +workspace = "../../../NoGamepads" +edition = "2024" + +[dependencies] +nogamepads-core = { path = "../../core" } + +[build-dependencies] +cbindgen = "0.29.0" + +[lib] +name = "nogamepads_lib_c" +crate-type = [ "cdylib", "staticlib"]
\ No newline at end of file diff --git a/core_c/build.rs b/bindings/c/build.rs index 1dd893b..b5770a0 100644 --- a/core_c/build.rs +++ b/bindings/c/build.rs @@ -1,4 +1,4 @@ -use cbindgen::{generate_with_config, Config, Language, ParseConfig, ParseExpandConfig}; +use cbindgen::{generate_with_config, Config, ExportConfig, Language, ParseConfig, ParseExpandConfig}; use std::env; fn main() { @@ -9,12 +9,26 @@ fn main() { header: Some("/* NoGamepads C Bindings. */".to_string()), parse: ParseConfig { + include: Some(vec!["*".to_string()]), expand: ParseExpandConfig { all_features: true, ..Default::default() }, ..Default::default() }, + + export: ExportConfig { + include: vec![ + "ConnectionMessageC".to_string(), + "ConnectionCallbackMessageC".to_string(), + "ControlMessageC".to_string(), + "GameMessageC".to_string(), + + "GameProfileC".to_string(), + "PlayerInfoC".to_string(), + ], + ..Default::default() + }, ..Config::default() }; @@ -26,8 +40,8 @@ fn main() { generate_with_config(&crate_dir, config_c) .expect("Could not generate nogamepads.h") - .write_to_file("../.cargo/shared/target/release/deps/nogamepads.h"); + .write_to_file("../../.cargo/shared/target/export/deps/nogamepads.h"); generate_with_config(&crate_dir, config_cpp) .expect("Could not generate nogamepads_cpp.h") - .write_to_file("../.cargo/shared/target/release/deps/nogamepads_cpp.h"); + .write_to_file("../../.cargo/shared/target/export/deps/nogamepads_cpp.h"); }
\ No newline at end of file diff --git a/core_c/src/data_c/common.rs b/bindings/c/src/data_c/common.rs index 58c34c4..58c34c4 100644 --- a/core_c/src/data_c/common.rs +++ b/bindings/c/src/data_c/common.rs diff --git a/core_c/src/data_c/connection_callback_message_c.rs b/bindings/c/src/data_c/connection_callback_message_c.rs index e23b6f6..9ded18b 100644 --- a/core_c/src/data_c/connection_callback_message_c.rs +++ b/bindings/c/src/data_c/connection_callback_message_c.rs @@ -7,8 +7,8 @@ use std::ptr::null_mut; #[repr(C)] #[allow(unused_imports)] pub struct ConnectionCallbackMessageC { - tag: ConnCallbackMsgCTag, - data: ConnCallbackMsgCUnion, + pub tag: ConnCallbackMsgCTag, + pub data: ConnCallbackMsgCUnion, } #[repr(C)] diff --git a/core_c/src/data_c/connection_message_c.rs b/bindings/c/src/data_c/connection_message_c.rs index 418342d..b3b54d4 100644 --- a/core_c/src/data_c/connection_message_c.rs +++ b/bindings/c/src/data_c/connection_message_c.rs @@ -8,8 +8,8 @@ use nogamepads_lib_rs::pad_data::pad_player_info::nogamepads_player_info::Player #[repr(C)] #[allow(unused_imports)] pub struct ConnectionMessageC { - tag: ConnMsgCTag, - data: ConnMsgCUnion + pub tag: ConnMsgCTag, + pub data: ConnMsgCUnion } #[repr(C)] diff --git a/core_c/src/data_c/control_message_c.rs b/bindings/c/src/data_c/control_message_c.rs index 84f2288..6868459 100644 --- a/core_c/src/data_c/control_message_c.rs +++ b/bindings/c/src/data_c/control_message_c.rs @@ -7,8 +7,8 @@ use std::ptr::null_mut; #[repr(C)] #[allow(unused_imports)] pub struct ControlMessageC { - tag: CtrlMsgCTag, - data: CtrlMsgCUnion + pub tag: CtrlMsgCTag, + pub data: CtrlMsgCUnion } #[repr(C)] diff --git a/core_c/src/data_c/game_message_c.rs b/bindings/c/src/data_c/game_message_c.rs index b6a2b89..946ce60 100644 --- a/core_c/src/data_c/game_message_c.rs +++ b/bindings/c/src/data_c/game_message_c.rs @@ -6,8 +6,8 @@ use crate::data_c::common::KeyData; #[repr(C)] #[allow(unused_imports)] pub struct GameMessageC { - tag: GameMsgCTag, - data: GameMsgCUnion + pub tag: GameMsgCTag, + pub data: GameMsgCUnion } diff --git a/core_c/src/data_c/game_profile_c.rs b/bindings/c/src/data_c/game_profile_c.rs index d0072c8..1dd11f7 100644 --- a/core_c/src/data_c/game_profile_c.rs +++ b/bindings/c/src/data_c/game_profile_c.rs @@ -6,12 +6,12 @@ use std::ffi::c_char; #[derive(Copy, Clone)] #[allow(unused_imports)] pub struct GameProfileC { - game_name: *const c_char, - game_description: *const c_char, - organization: *const c_char, - version: *const c_char, - website: *const c_char, - email: *const c_char + pub game_name: *const c_char, + pub game_description: *const c_char, + pub organization: *const c_char, + pub version: *const c_char, + pub website: *const c_char, + pub email: *const c_char } impl From<GameProfileC> for GameProfile { diff --git a/core_c/src/data_c/mod.rs b/bindings/c/src/data_c/mod.rs index afe8728..afe8728 100644 --- a/core_c/src/data_c/mod.rs +++ b/bindings/c/src/data_c/mod.rs diff --git a/core_c/src/data_c/player_info_c.rs b/bindings/c/src/data_c/player_info_c.rs index f51a9f9..b8a54e6 100644 --- a/core_c/src/data_c/player_info_c.rs +++ b/bindings/c/src/data_c/player_info_c.rs @@ -6,13 +6,13 @@ use std::ffi::c_char; #[derive(Copy, Clone)] #[allow(unused_imports)] pub struct PlayerInfoC { - account_id: *const c_char, - account_hash: *const c_char, + pub account_id: *const c_char, + pub account_hash: *const c_char, - customize_nickname: *const c_char, - customize_color_hue: i32, - customize_color_saturation: f64, - customize_color_value: f64, + pub customize_nickname: *const c_char, + pub customize_color_hue: i32, + pub customize_color_saturation: f64, + pub customize_color_value: f64, } impl From<PlayerInfoC> for PlayerInfo { diff --git a/core_c/src/data_c/player_info_list_c.rs b/bindings/c/src/data_c/player_info_list_c.rs index 99d5c35..99d5c35 100644 --- a/core_c/src/data_c/player_info_list_c.rs +++ b/bindings/c/src/data_c/player_info_list_c.rs diff --git a/core_c/src/lib.rs b/bindings/c/src/lib.rs index 6efd0e9..6efd0e9 100644 --- a/core_c/src/lib.rs +++ b/bindings/c/src/lib.rs diff --git a/core_c/src/service_c/common.rs b/bindings/c/src/service_c/common.rs index 8b13da0..8b13da0 100644 --- a/core_c/src/service_c/common.rs +++ b/bindings/c/src/service_c/common.rs diff --git a/core_c/src/service_c/mod.rs b/bindings/c/src/service_c/mod.rs index c3d23af..674baf7 100644 --- a/core_c/src/service_c/mod.rs +++ b/bindings/c/src/service_c/mod.rs @@ -1,4 +1,4 @@ pub mod common; pub mod padclient; -mod padserver;
\ No newline at end of file +pub mod padserver;
\ No newline at end of file diff --git a/core_c/src/service_c/padclient.rs b/bindings/c/src/service_c/padclient.rs index 60120ab..b7bac43 100644 --- a/core_c/src/service_c/padclient.rs +++ b/bindings/c/src/service_c/padclient.rs @@ -13,11 +13,11 @@ use std::str::FromStr; #[derive(Copy, Clone)] #[allow(unused_imports)] pub struct PadClientC { - target_address: *const c_char, - target_port: u16, - bind_player: PlayerInfoC, - enable_console: bool, - quiet: bool + pub target_address: *const c_char, + pub target_port: u16, + pub bind_player: PlayerInfoC, + pub enable_console: bool, + pub quiet: bool } impl From<PadClientC> for PadClient { diff --git a/core_c/src/service_c/padserver.rs b/bindings/c/src/service_c/padserver.rs index ee1a6a8..98c5792 100644 --- a/core_c/src/service_c/padserver.rs +++ b/bindings/c/src/service_c/padserver.rs @@ -1,10 +1,8 @@ -use crate::data_c::control_message_c::ControlMessageC; use crate::data_c::game_message_c::GameMessageC; use crate::data_c::game_profile_c::GameProfileC; use crate::data_c::player_info_c::PlayerInfoC; use crate::data_c::player_info_list_c::PlayerList; use crate::{box_into_raw, str_c_to_rs}; -use nogamepads_lib_rs::pad_data::pad_messages::nogamepads_messages::ControlMessage; use nogamepads_lib_rs::pad_data::pad_player_info::nogamepads_player_info::PlayerInfo; use nogamepads_lib_rs::pad_service::server::nogamepads_server::PadServer; use nogamepads_lib_rs::DEFAULT_PORT; @@ -97,18 +95,14 @@ pub extern "C" fn put_msg_to_all_players(server: *mut PadServer, msg: GameMessag server.put_msg_to_all(&msg.into()); } -#[unsafe(no_mangle)] -pub extern "C" fn pop_a_msg_from_player(server: *mut PadServer, player: &PlayerInfoC) -> ControlMessageC { - let server = unsafe { Box::from_raw(server) }; - server.pop_a_msg(player.into()).unwrap_or(ControlMessage::Err).into() -} - -#[unsafe(no_mangle)] -pub extern "C" fn pop_msg_from_player_or(server: *mut PadServer, player: &PlayerInfoC, or: ControlMessageC) -> ControlMessageC { - let server = unsafe { Box::from_raw(server) }; - let msg = server.pop_msg_or(player.into(), or.into()); - msg.into() -} +// #[unsafe(no_mangle)] +// pub extern "C" fn pop_a_msg(server: *mut PadServer) -> ControlMessageC { +// let server = unsafe { Box::from_raw(server) }; +// let msg = server.pop_a_msg(); +// if msg.is_some() { +// let (player, msg) = msg.unwrap(); +// } +// } // 玩家管理 #[unsafe(no_mangle)] diff --git a/core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/.gitignore b/bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/.gitignore index 7d29992..7d29992 100644 --- a/core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/.gitignore +++ b/bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/.gitignore diff --git a/core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/indexLayout.xml b/bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/indexLayout.xml index 7b08163..7b08163 100644 --- a/core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/indexLayout.xml +++ b/bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/indexLayout.xml diff --git a/core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/vcs.xml b/bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/vcs.xml index b2bdec2..b2bdec2 100644 --- a/core_csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/vcs.xml +++ b/bindings/csharp/NoGamepadsSharp/.idea/.idea.NoGamepadsSharp/.idea/vcs.xml diff --git a/core_csharp/NoGamepadsSharp/.run/Run Example.run.xml b/bindings/csharp/NoGamepadsSharp/.run/Run Example.run.xml index 52006c3..52006c3 100644 --- a/core_csharp/NoGamepadsSharp/.run/Run Example.run.xml +++ b/bindings/csharp/NoGamepadsSharp/.run/Run Example.run.xml diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp.sln b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp.sln index d9ec2f5..d9ec2f5 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp.sln +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp.sln diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/GameProfile.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/GameProfile.cs index c92a934..c92a934 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/GameProfile.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/GameProfile.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/HsvColor.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/HsvColor.cs index a534be6..a534be6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/HsvColor.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/HsvColor.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/PlayerInfo.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/PlayerInfo.cs index 44ab51b..44ab51b 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/PlayerInfo.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Data/PlayerInfo.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/NoGamepadsSharp_Core.csproj b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/NoGamepadsSharp_Core.csproj index d289ab2..d289ab2 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/NoGamepadsSharp_Core.csproj +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/NoGamepadsSharp_Core.csproj diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadClient.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadClient.cs index 3cbc403..3cbc403 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadClient.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadClient.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadServer.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadServer.cs index 215437e..215437e 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadServer.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/Service/PadServer.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.dll Binary files differindex 6c507ae..6c507ae 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.pdb b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.pdb Binary files differindex 2249b25..2249b25 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.pdb +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Core.pdb diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Data.deps.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Data.deps.json index 8bbf5eb..8bbf5eb 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Data.deps.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/NoGamepadsSharp_Data.deps.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/nogamepads_lib_c.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/nogamepads_lib_c.dll Binary files differindex f9fa81d..f9fa81d 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/nogamepads_lib_c.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/bin/Debug/net8.0/nogamepads_lib_c.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs index 2217181..2217181 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfo.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfo.cs index 9a403d4..9a403d4 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfo.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfo.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfoInputs.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfoInputs.cache index b65f543..b65f543 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfoInputs.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.AssemblyInfoInputs.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GeneratedMSBuildEditorConfig.editorconfig b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GeneratedMSBuildEditorConfig.editorconfig index 5ca075c..5ca075c 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GeneratedMSBuildEditorConfig.editorconfig +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GeneratedMSBuildEditorConfig.editorconfig diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GlobalUsings.g.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GlobalUsings.g.cs index 8578f3d..8578f3d 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GlobalUsings.g.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.GlobalUsings.g.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.assets.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.assets.cache Binary files differindex f039f0a..f039f0a 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.assets.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Core.assets.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfo.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfo.cs index 116d7ca..116d7ca 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfo.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfo.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfoInputs.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfoInputs.cache index 883b42c..883b42c 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfoInputs.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.AssemblyInfoInputs.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GeneratedMSBuildEditorConfig.editorconfig b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GeneratedMSBuildEditorConfig.editorconfig index 123eb1c..123eb1c 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GeneratedMSBuildEditorConfig.editorconfig +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GeneratedMSBuildEditorConfig.editorconfig diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GlobalUsings.g.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GlobalUsings.g.cs index 8578f3d..8578f3d 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GlobalUsings.g.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.GlobalUsings.g.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.assets.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.assets.cache Binary files differindex 3f0d1f1..3f0d1f1 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.assets.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.assets.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.CoreCompileInputs.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.CoreCompileInputs.cache index fdbba54..fdbba54 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.CoreCompileInputs.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.CoreCompileInputs.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.FileListAbsolute.txt b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.FileListAbsolute.txt index 66fd1fc..66fd1fc 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.FileListAbsolute.txt +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.csproj.FileListAbsolute.txt diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.dll Binary files differindex 6c507ae..6c507ae 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.pdb b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.pdb Binary files differindex 2249b25..2249b25 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.pdb +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.pdb diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.sourcelink.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.sourcelink.json index 55ad6d0..55ad6d0 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.sourcelink.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/NoGamepadsSharp_Data.sourcelink.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/ref/NoGamepadsSharp_Data.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/ref/NoGamepadsSharp_Data.dll Binary files differindex f284434..f284434 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/ref/NoGamepadsSharp_Data.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/ref/NoGamepadsSharp_Data.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/refint/NoGamepadsSharp_Data.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/refint/NoGamepadsSharp_Data.dll Binary files differindex f284434..f284434 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/refint/NoGamepadsSharp_Data.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/Debug/net8.0/refint/NoGamepadsSharp_Data.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.dgspec.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.dgspec.json index 2ec1ff3..2ec1ff3 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.dgspec.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.dgspec.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.props b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.props index 23d8bdd..23d8bdd 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.props +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.props diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.targets b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.targets index 3dc06ef..3dc06ef 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.targets +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Core.csproj.nuget.g.targets diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.dgspec.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.dgspec.json index 1b99a0b..1b99a0b 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.dgspec.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.dgspec.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.props b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.props index 23d8bdd..23d8bdd 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.props +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.props diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.targets b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.targets index 3dc06ef..3dc06ef 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.targets +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/NoGamepadsSharp_Data.csproj.nuget.g.targets diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.assets.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.assets.json index b1dd5ac..b1dd5ac 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.assets.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.assets.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.nuget.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.nuget.cache index 30a67f3..30a67f3 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.nuget.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.nuget.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.packagespec.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.packagespec.json index 6409f09..6409f09 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.packagespec.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/project.packagespec.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.model.nuget.info b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.model.nuget.info index 8e81be6..8e81be6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.model.nuget.info +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.model.nuget.info diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.restore.info b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.restore.info index 8e81be6..8e81be6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.restore.info +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Core/obj/rider.project.restore.info diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/NoGamepadsSharp_Execute.csproj b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/NoGamepadsSharp_Execute.csproj index 2f4fc77..2f4fc77 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/NoGamepadsSharp_Execute.csproj +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/NoGamepadsSharp_Execute.csproj diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/Program.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/Program.cs index 4f9a31c..4f9a31c 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/Program.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/Program.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.deps.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.deps.json index 7ec60d1..7ec60d1 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.deps.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.deps.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.dll Binary files differindex 7304713..7304713 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.exe b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.exe Binary files differindex 1aed8a6..1aed8a6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.exe +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.exe diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.pdb b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.pdb Binary files differindex f0bffa1..f0bffa1 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.pdb +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.pdb diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.runtimeconfig.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.runtimeconfig.json index becfaea..becfaea 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.runtimeconfig.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/NoGamepadsSharp_Execute.runtimeconfig.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/nogamepads_lib_c.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/nogamepads_lib_c.dll Binary files differindex 1dcd807..1dcd807 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/nogamepads_lib_c.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/bin/Debug/net8.0/nogamepads_lib_c.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs index 2217181..2217181 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfo.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfo.cs index 1cd6707..1cd6707 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfo.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfo.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfoInputs.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfoInputs.cache index 9d55bff..9d55bff 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfoInputs.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.AssemblyInfoInputs.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GeneratedMSBuildEditorConfig.editorconfig b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GeneratedMSBuildEditorConfig.editorconfig index a70a292..a70a292 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GeneratedMSBuildEditorConfig.editorconfig +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GeneratedMSBuildEditorConfig.editorconfig diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GlobalUsings.g.cs b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GlobalUsings.g.cs index 8578f3d..8578f3d 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GlobalUsings.g.cs +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.GlobalUsings.g.cs diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.assets.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.assets.cache Binary files differindex 6e38352..6e38352 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.assets.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.assets.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.CoreCompileInputs.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.CoreCompileInputs.cache index b8d2bb6..b8d2bb6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.CoreCompileInputs.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.CoreCompileInputs.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.FileListAbsolute.txt b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.FileListAbsolute.txt index 60ba01a..60ba01a 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.FileListAbsolute.txt +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.csproj.FileListAbsolute.txt diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.dll Binary files differindex 7304713..7304713 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.genruntimeconfig.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.genruntimeconfig.cache index d1d6363..d1d6363 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.genruntimeconfig.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.genruntimeconfig.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.pdb b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.pdb Binary files differindex f0bffa1..f0bffa1 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.pdb +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.pdb diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.sourcelink.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.sourcelink.json index 9ab27c4..9ab27c4 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.sourcelink.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/NoGamepadsSharp_Execute.sourcelink.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/apphost.exe b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/apphost.exe Binary files differindex 1aed8a6..1aed8a6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/apphost.exe +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/apphost.exe diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/ref/NoGamepadsSharp_Execute.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/ref/NoGamepadsSharp_Execute.dll Binary files differindex 1a99951..1a99951 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/ref/NoGamepadsSharp_Execute.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/ref/NoGamepadsSharp_Execute.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/refint/NoGamepadsSharp_Execute.dll b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/refint/NoGamepadsSharp_Execute.dll Binary files differindex 1a99951..1a99951 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/refint/NoGamepadsSharp_Execute.dll +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/Debug/net8.0/refint/NoGamepadsSharp_Execute.dll diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.dgspec.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.dgspec.json index fd5cb69..fd5cb69 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.dgspec.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.dgspec.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.props b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.props index 23d8bdd..23d8bdd 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.props +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.props diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.targets b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.targets index 3dc06ef..3dc06ef 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.targets +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/NoGamepadsSharp_Execute.csproj.nuget.g.targets diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.assets.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.assets.json index d719216..d719216 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.assets.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.assets.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.nuget.cache b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.nuget.cache index 1840ead..1840ead 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.nuget.cache +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.nuget.cache diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.packagespec.json b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.packagespec.json index 1fa2ff6..1fa2ff6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.packagespec.json +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/project.packagespec.json diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.model.nuget.info b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.model.nuget.info index 91b84e6..91b84e6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.model.nuget.info +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.model.nuget.info diff --git a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.restore.info b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.restore.info index 91b84e6..91b84e6 100644 --- a/core_csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.restore.info +++ b/bindings/csharp/NoGamepadsSharp/NoGamepadsSharp_Execute/obj/rider.project.restore.info diff --git a/core_csharp/NoGamepadsSharp/global.json b/bindings/csharp/NoGamepadsSharp/global.json index 2ddda36..2ddda36 100644 --- a/core_csharp/NoGamepadsSharp/global.json +++ b/bindings/csharp/NoGamepadsSharp/global.json diff --git a/console/Cargo.toml b/console/Cargo.toml index f48f21d..4bf474f 100644 --- a/console/Cargo.toml +++ b/console/Cargo.toml @@ -5,6 +5,7 @@ description = "This crate provides a set of tools for simulating and deploying t homepage = "https://github.com/CatilGrass/NoGamepads" repository = "https://github.com/CatilGrass/NoGamepads" +workspace = "../../NoGamepads" edition = "2024" [dependencies] diff --git a/console/src/bin/nogpads.rs b/console/src/bin/nogpads.rs index 51390b0..14df488 100644 --- a/console/src/bin/nogpads.rs +++ b/console/src/bin/nogpads.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use clap::{arg, Args, Parser, Subcommand}; use serde::{Deserialize, Serialize}; use std::env::current_dir; @@ -7,6 +8,7 @@ use std::net::{IpAddr, Ipv4Addr}; use std::path::PathBuf; use nogamepads_lib_rs::DEFAULT_PORT; use nogamepads_lib_rs::pad_data::game_profile::game_profile::GameProfile; +use nogamepads_lib_rs::pad_data::layout::layout_data::LayoutKeyRegisters; use nogamepads_lib_rs::pad_service::server::nogamepads_server::PadServer; /// NoGamePads Console - Server Cli @@ -21,6 +23,15 @@ struct NoGamepadServerCli { #[derive(Subcommand, Debug)] enum Commands { + #[command(subcommand, about = "Manage buttons")] + Button(ManageCommands), + + #[command(subcommand, about = "Manage directions")] + Direction(ManageCommands), + + #[command(subcommand, about = "Manage axes")] + Axis(ManageCommands), + // 服务端配置 #[command(about = "Configure the server")] Config(ConfigArgs), @@ -72,10 +83,47 @@ struct RunArgs { debug: bool, } +/// 管理键 +#[derive(Subcommand, Debug)] +enum ManageCommands { + + #[command(about = "Add or rename a key")] + Add(AddKeyArgs), + + #[command(about = "Remove a key")] + Remove(RemoveKeyArgs), + + #[command(about = "List all")] + List +} + +/// 添加键 +#[derive(Args, Debug)] +struct AddKeyArgs{ + + // 添加的键 + #[arg(value_name = "KEY")] + key: u8, + + // 事件编号 + #[arg(value_name = "NAME")] + name: String +} + +/// 移除键 +#[derive(Args, Debug)] +struct RemoveKeyArgs{ + + // 删除的键 + #[arg(value_name = "KEY")] + key: u8, +} + /// 本地存储的配置信息 #[derive(Serialize, Deserialize, PartialEq, Debug)] struct ServerConfig { port: u16, + registered_keys: LayoutKeyRegisters, profile: GameProfile, } @@ -83,6 +131,7 @@ impl Default for ServerConfig { fn default() -> Self { ServerConfig { port: DEFAULT_PORT, + registered_keys: Default::default(), profile: GameProfile::default(), } } @@ -107,12 +156,14 @@ fn main () { // 命令行 let cli = NoGamepadServerCli::parse(); + + // 读取服务端配置 + let mut config = read_config(); + match cli.command { // 服务端配置 Commands::Config(args) => { - // 读取服务端配置 - let mut config = read_config(); // 端口信息配置: // 端口数值被限定在 0 - 65535,但是若端口参数为 0,则会被设置为默认端口 @@ -131,9 +182,6 @@ fn main () { website, email ); - - // 写入配置 - write_config(config); }, // 运行服务端 @@ -148,6 +196,7 @@ fn main () { PadServer::default() .addr(IpAddr::from(Ipv4Addr::new(127, 0, 0, 1)), config.port) .put_profile(config.profile) + .register_keys(config.registered_keys) .enable_console() .build() .start_server(); @@ -156,70 +205,72 @@ fn main () { PadServer::default() .addr(IpAddr::from(Ipv4Addr::new(127, 0, 0, 1)), config.port) .put_profile(config.profile) + .register_keys(config.registered_keys) .build() .start_server(); } } + + Commands::Button(manage) => { + process_manage_command("btn", manage, &mut config.registered_keys.button_keys); + } + + Commands::Direction(manage) => { + process_manage_command("dir", manage, &mut config.registered_keys.direction_keys); + } + + Commands::Axis(manage) => { + process_manage_command("ax", manage, &mut config.registered_keys.axis_keys); + } + } + + // 写入配置 + write_config(config); +} + +fn process_manage_command(prefix: &str, manage: ManageCommands, map: &mut HashMap<u8, String>) { + match manage { + ManageCommands::Add(args) => { + map.entry(args.key) + .or_insert_with(|| args.name.clone()); + println!("Added(Renamed) key {}_{} : \"{}\".", prefix, args.key, args.name); + } + ManageCommands::Remove(args) => { + let removed = map.remove(&args.key); + if removed.is_some() { + println!("Removed key {}_{}.", prefix, removed.is_some()) + } else { + println!("Removed key failed: Cannot found key {}", args.key); + } + } + ManageCommands::List => { + for button_key in map { + println!("{}_{} : \"{}\"", prefix, button_key.0, button_key.1) + } + } } } -/// # 获得配置文件目录地址 -/// -/// ## 参数 - Parameters -/// -/// | Field | Type | Description | -/// | ------ | --------------------- | ----------- | -/// | -> | PathBuf | 地址 | #[allow(dead_code)] fn get_config_folder_path () -> PathBuf { current_dir().unwrap().join(".nogpads") } -/// # 获得配置文件地址 -/// -/// ## 参数 - Parameters -/// -/// | Field | Type | Description | -/// | ------ | --------------------- | ----------- | -/// | -> | PathBuf | 地址 | #[allow(dead_code)] fn get_config_file_path () -> PathBuf { get_config_folder_path().join("config.yaml") } -/// # 获得布局文件地址 -/// -/// ## 参数 - Parameters -/// -/// | Field | Type | Description | -/// | ------ | --------------------- | ----------- | -/// | -> | PathBuf | 地址 | #[allow(dead_code)] fn get_layout_file_path () -> PathBuf { get_config_folder_path().join("layout.yaml") } -/// # 获得皮肤资源地址 -/// -/// ## 参数 - Parameters -/// -/// | Field | Type | Description | -/// | ------ | --------------------- | ----------- | -/// | -> | PathBuf | 地址 | #[allow(dead_code)] fn get_assets_package_path () -> PathBuf { get_config_folder_path().join("assets.zip") } -/// # 读取配置信息 -/// -/// 读取 服务端控制台 的配置信息 -/// -/// ## 参数 - Parameters -/// -/// | Field | Type | Description | -/// | ------ | --------------------- | ----------- | -/// | -> | ServerConfig | 配置信息 | fn read_config () -> ServerConfig { let config_folder_path = get_config_folder_path(); let config_file_path = get_config_file_path(); @@ -240,15 +291,6 @@ fn read_config () -> ServerConfig { } } -/// # 写入配置信息 -/// -/// 将 服务端控制台 的配置信息写入本地 -/// -/// ## 参数 - Parameters -/// -/// | Field | Type | Description | -/// | ------ | --------------------- | ----------- | -/// | config | ServerConfig | 配置信息 | fn write_config (config: ServerConfig) { let config_file_path = get_config_file_path(); diff --git a/core/Cargo.toml b/core/Cargo.toml index e41697e..b4bfdb1 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -5,6 +5,7 @@ homepage = "https://github.com/CatilGrass/NoGamepads" repository = "https://github.com/CatilGrass/NoGamepads" readme = "../README.md" +workspace = "../../NoGamepads" edition = "2024" [dependencies] @@ -17,6 +18,7 @@ serde = { version = "1.0.219", features = ["derive"] } clap = { version = "4.5.38", features = ["derive"] } sha1 = "0.10.6" log = "0.4.27" +prettytable-rs = "0.10.0" [lib] name = "nogamepads_lib_rs" diff --git a/core/examples/start_client_console.rs b/core/examples/start_client_console.rs index 8116299..c4e0126 100644 --- a/core/examples/start_client_console.rs +++ b/core/examples/start_client_console.rs @@ -2,14 +2,14 @@ use std::net::{IpAddr, Ipv4Addr}; use nogamepads_lib_rs::pad_data::pad_player_info::nogamepads_player_info::PlayerInfo; use nogamepads_lib_rs::pad_service::client::nogamepads_client::PadClient; -const PASSWORD : &str = "password"; - fn main() { // 构建玩家信息 let mut player_info = PlayerInfo::new(); - player_info.setup_account_info("juliet", PASSWORD); - player_info.set_nickname("Juliet_Smile"); + player_info.setup_account_info( + env!("TEST_PLAYER_ACCOUNT"), + env!("TEST_PLAYER_PASSWORD")); + player_info.set_nickname(env!("TEST_PLAYER_NICKNAME")); player_info.set_customize_color_hsv(320, 0.5, 1.0); // PINK // 构建客户端 diff --git a/core/examples/start_server_console.rs b/core/examples/start_server_console.rs index 560a378..cbe081f 100644 --- a/core/examples/start_server_console.rs +++ b/core/examples/start_server_console.rs @@ -11,10 +11,11 @@ fn main() { // 构建服务端 let server = PadServer::default() - .addr( - IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), - DEFAULT_PORT - ) + + // 地址 + .addr(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), DEFAULT_PORT) + + // 配置信息 .put_profile( GameProfile::default() .game_name("My Multiplayer Game") @@ -22,6 +23,14 @@ fn main() { .version("0.1 alpha") .to_owned() ) + + // 键位注册 + .register_button(0, "Shoot") + .register_button(1, "Jump") + .register_direction(0, "Walk") + .register_axis(0, "View Yaw") + + // 控制台 .enable_console() // .quiet() .build(); diff --git a/core/src/pad_data/game_layout.rs b/core/src/pad_data/game_layout.rs deleted file mode 100644 index 62afbcc..0000000 --- a/core/src/pad_data/game_layout.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub mod game_layout { - use bincode::{Decode, Encode}; - use serde::{Deserialize, Serialize}; - - #[derive(Encode, Decode, Serialize, Deserialize, PartialEq, Debug)] - pub struct GameLayout { - - } -}
\ No newline at end of file diff --git a/core/src/pad_data/layout.rs b/core/src/pad_data/layout.rs new file mode 100644 index 0000000..4c5f53f --- /dev/null +++ b/core/src/pad_data/layout.rs @@ -0,0 +1,137 @@ +pub mod layout_data { + use std::collections::{HashMap, VecDeque}; + use bincode::{Decode, Encode}; + use serde::{Deserialize, Serialize}; + use crate::pad_data::pad_messages::nogamepads_messages::ControlMessage; + use crate::pad_data::pad_player_info::nogamepads_player_info::PlayerInfo; + use crate::pad_service::server::nogamepads_server::PadServer; + + + #[derive(Encode, Decode, Serialize, Deserialize, PartialEq, Debug, Clone)] + pub struct LayoutKeyRegisters { + pub direction_keys : HashMap<u8, String>, // 注册方向键 + pub axis_keys : HashMap<u8, String>, // 注册轴向键 + pub button_keys : HashMap<u8, String>, // 注册按钮 + } + + impl Default for LayoutKeyRegisters { + fn default() -> LayoutKeyRegisters { + LayoutKeyRegisters { + direction_keys: Default::default(), + axis_keys: Default::default(), + button_keys: Default::default(), + } + } + } + + pub struct LayoutKeyRuntimeData { + directions : HashMap<u8, HashMap<String, (f64, f64)>>, // <键, <玩家Hash, (x, y)>> + axes : HashMap<u8, HashMap<String, f64>>, // <键, <玩家Hash, 轴向>> + button : HashMap<u8, HashMap<String, bool>>, // <键, <玩家Hash, 是否按下>> + + events : VecDeque<(String, ControlMessage)>, // (玩家Hash, 信息) + } + + impl Default for LayoutKeyRuntimeData { + fn default() -> Self { + LayoutKeyRuntimeData { + directions: Default::default(), + axes: Default::default(), + button: Default::default(), + events: Default::default(), + } + } + } + + impl LayoutKeyRuntimeData { + + // 输入控制信息到数据 + pub fn insert_control(&mut self, who: PlayerInfo, msg: ControlMessage) { + match msg { + // 消息放入信息队列待读取 + ControlMessage::Msg(_) => { + self.events.push_back((who.account.player_hash, msg)) + } + + // 按钮更新对应玩家的状态,并且放入信息队列待读取 + ControlMessage::Pressed(button_key) => { + self.button.entry(button_key) + .or_insert_with(HashMap::new) + .insert(who.account.player_hash.clone(), true); + self.events.push_back((who.account.player_hash, msg)) + } + ControlMessage::Released(button_key) => { + self.button.entry(button_key) + .or_insert_with(HashMap::new) + .insert(who.account.player_hash.clone(), false); + self.events.push_back((who.account.player_hash, msg)) + } + + // 轴向更新直接传入玩家状态 + ControlMessage::Axis(axis_key, axis) => { + self.axes.entry(axis_key) + .or_insert_with(HashMap::new) + .insert(who.account.player_hash.clone(), axis); + } + ControlMessage::Dir(dir_key, (x, y)) => { + self.directions.entry(dir_key) + .or_insert_with(HashMap::new) + .insert(who.account.player_hash.clone(), (x, y)); + } + _ => { } + } + } + + pub fn pop_control_event(&mut self, server: &PadServer) -> Option<(PlayerInfo, ControlMessage)> { + let pop = self.events.pop_front(); + if pop.is_some() { + let (hash, msg) = pop.unwrap(); + let info = server.find_online_player(hash); + if info.is_some() { + Some((info.unwrap(), msg)) + } else { + None + } + } else { + None + } + } + + pub fn get_direction(&self, who: &PlayerInfo, key: &u8) -> Option<(f64, f64)> { + Self::get(&self.directions, who, key) + } + + pub fn get_axis(&self, who: &PlayerInfo, key: &u8) -> Option<f64> { + Self::get(&self.axes, who, key) + } + + pub fn get_button_status(&self, who: &PlayerInfo, key: &u8) -> Option<bool> { + Self::get(&self.button, who, key) + } + + fn get<V: Clone>(map: &HashMap<u8, HashMap<String, V>>, who: &PlayerInfo, key: &u8) -> Option<V> { + let key = map.get(key); + if key.is_some() { + let value = key.unwrap().get(&who.account.player_hash); + if value.is_some() { + let result = value.unwrap(); + Some(result.clone()) + } else { None } + } else { None } + } + } +} + +pub mod layout_gamepad { + use bincode::{Decode, Encode}; + use serde::{Deserialize, Serialize}; + + #[derive(Encode, Decode, Serialize, Deserialize, PartialEq, Debug)] + pub struct PadLayout { + + } + + pub trait ButtonArea { + + } +}
\ No newline at end of file diff --git a/core/src/pad_data/mod.rs b/core/src/pad_data/mod.rs index 8ff024a..e041524 100644 --- a/core/src/pad_data/mod.rs +++ b/core/src/pad_data/mod.rs @@ -1,4 +1,4 @@ pub mod pad_messages; pub mod pad_player_info; pub mod game_profile; -mod game_layout;
\ No newline at end of file +pub mod layout;
\ No newline at end of file diff --git a/core/src/pad_service/client.rs b/core/src/pad_service/client.rs index c0b8282..ea0f4ba 100644 --- a/core/src/pad_service/client.rs +++ b/core/src/pad_service/client.rs @@ -21,6 +21,7 @@ pub mod nogamepads_client { use crate::DEFAULT_PORT; use crate::pad_data::game_profile::game_profile::GameProfile; use crate::pad_data::pad_messages::nogamepads_message_encoder::NgpdMessageEncoder; + use crate::pad_data::pad_messages::nogamepads_messages::ControlMessage::{Axis, Dir, Msg, Pressed, Released}; type WriteList = Arc<Mutex<VecDeque<ControlMessage>>>; type ReadList = Arc<Mutex<VecDeque<GameMessage>>>; @@ -129,6 +130,30 @@ pub mod nogamepads_client { // 客户端消息管理 impl PadClient { + pub fn key_press(&self, key_id: u8) { + self.put_msg(Pressed(key_id)); + } + + pub fn key_release(&self, key_id: u8) { + self.put_msg(Released(key_id)); + } + + pub fn change_axis(&self, axis_id: u8, axis: f64) { + self.put_msg(Axis(axis_id, axis)); + } + + pub fn change_direction(&self, direction_id: u8, x: f64, y: f64) { + self.put_msg(Dir(direction_id, (x.clamp(0.0, 1.0), y.clamp(0.0, 1.0)))); + } + + pub fn say_str(&self, msg: &str) { + self.put_msg(Msg(msg.to_owned())); + } + + pub fn say(&self, msg: String) { + self.put_msg(Msg(msg)); + } + pub fn put_msg(&self, msg: ControlMessage) { let mut guard = self.write_list.lock().unwrap(); guard.push_back(msg); diff --git a/core/src/pad_service/server.rs b/core/src/pad_service/server.rs index 66ab56d..eeadb01 100644 --- a/core/src/pad_service/server.rs +++ b/core/src/pad_service/server.rs @@ -5,21 +5,24 @@ pub mod nogamepads_server { use crate::pad_data::pad_messages::nogamepads_messages::{ConnectionCallbackMessage, ConnectionMessage, ControlMessage, GameMessage, LeaveReason}; use log::{error, info, warn}; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; + use std::ops::Deref; use std::process::exit; use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering::SeqCst; use std::sync::{Arc, Mutex, MutexGuard, PoisonError}; use std::time::Duration; use clap::CommandFactory; + use clearscreen::clear; + use prettytable::{Row, Table}; use tokio::io::{AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf}; use tokio::net::{TcpListener, TcpStream}; - use tokio::{io, spawn}; + use tokio::{io, signal, spawn}; use tokio::runtime::Runtime; use nogamepads::console_utils::debug_console::read_cli; - use nogamepads::convert_utils::convert_deque_to_vec; use nogamepads::logger_utils::logger_build; use crate::DEFAULT_PORT; use crate::pad_data::game_profile::game_profile::GameProfile; + use crate::pad_data::layout::layout_data::{LayoutKeyRegisters, LayoutKeyRuntimeData}; use crate::pad_data::pad_messages::nogamepads_messages::ConnectionErrorType::{ContainSamePlayer, GameLocked, PlayerBanned, WhatTheHell}; use crate::pad_data::pad_messages::nogamepads_messages::GameMessage::Leave; use crate::pad_data::pad_messages::nogamepads_messages::LeaveReason::ServerClosed; @@ -28,7 +31,6 @@ pub mod nogamepads_server { type PlayerMap = Arc<Mutex<HashMap<String, PlayerInfo>>>; type WriteList = Arc<Mutex<HashMap<String, VecDeque<GameMessage>>>>; - type ReadList = Arc<Mutex<HashMap<String, VecDeque<ControlMessage>>>>; #[repr(C)] pub struct PadServer { @@ -50,13 +52,17 @@ pub mod nogamepads_server { // 保持安静,不初始化 env_logger quiet: bool, + // 键位表 + keys: LayoutKeyRegisters, + // --- 运行时参数 --- + // 发送信息列表 write_list: WriteList, - // 读取信息列表 - read_list: ReadList, + // 运行环境信息 + control_data: Arc<Mutex<LayoutKeyRuntimeData>>, // 在线玩家 online_players: PlayerMap, @@ -69,6 +75,9 @@ pub mod nogamepads_server { // 是否停止服务器 stop: AtomicBool, + + // 调试模式 - 实时信息显示模式 + monitor_view: AtomicBool, } impl Clone for PadServer { @@ -79,13 +88,15 @@ pub mod nogamepads_server { port: self.port.clone(), enable_console: self.enable_console, quiet: self.quiet, + keys: self.keys.clone(), write_list: self.write_list.clone(), - read_list: self.read_list.clone(), + control_data: self.control_data.clone(), online_players: self.online_players.clone(), banned_players: self.banned_players.clone(), game_locked: AtomicBool::new((&self.game_locked.load(SeqCst)).clone()), stop: AtomicBool::new((&self.stop.load(SeqCst)).clone()), + monitor_view: AtomicBool::new((&self.monitor_view.load(SeqCst)).clone()) } } } @@ -98,13 +109,15 @@ pub mod nogamepads_server { port: DEFAULT_PORT, enable_console: false, quiet: false, + keys: LayoutKeyRegisters::default(), write_list: WriteList::default(), - read_list: ReadList::default(), + control_data: Arc::new(Mutex::new(LayoutKeyRuntimeData::default())), online_players: PlayerMap::default(), banned_players: PlayerMap::default(), game_locked: AtomicBool::new(false), stop: AtomicBool::new(false), + monitor_view: AtomicBool::new(false), } } } @@ -151,10 +164,29 @@ pub mod nogamepads_server { self } + pub fn register_keys(&mut self, keys: LayoutKeyRegisters) -> &mut PadServer { + self.keys = keys; + self + } + + pub fn register_button(&mut self, key: u8, name: &str) -> &mut PadServer { + self.keys.button_keys.insert(key, name.to_string()); + self + } + + pub fn register_axis(&mut self, key: u8, name: &str) -> &mut PadServer { + self.keys.axis_keys.insert(key, name.to_string()); + self + } + + pub fn register_direction(&mut self, key: u8, name: &str) -> &mut PadServer { + self.keys.direction_keys.insert(key, name.to_string()); + self + } + pub fn build(&self) -> Arc<PadServer> { Arc::new(self.clone()) } - } // 服务端消息管理 @@ -189,43 +221,50 @@ pub mod nogamepads_server { } } - pub fn pop_a_msg(&self, player: &PlayerInfo) -> Option<ControlMessage> { - match self.read_list.lock() { + pub fn pop_a_msg(&self) -> Option<(PlayerInfo, ControlMessage)> { + match self.control_data.lock() { Ok(mut guard) => { - match guard.get_mut(&player.account.player_hash) { - None => { None } - Some(queue) => { - if ! queue.is_empty() { - queue.pop_front() - } else { - guard.remove(&player.account.player_hash); - None - } - } - } + guard.pop_control_event(self) + } + Err(_) => { + None + } + } + } + } + + // 操控信息管理 + impl PadServer { + pub fn get_player_direction(&self, player: &PlayerInfo, key: &u8) -> Option<(f64, f64)> { + match self.control_data.lock() { + Ok(guard) => { + guard.get_direction(player, &key) } Err(_) => { - error!("Cannot lock \"{:?}\" in read_list", player.account.player_hash); None } } } - pub fn pop_msg_or(&self, player: &PlayerInfo, or: ControlMessage) -> ControlMessage { - self.pop_a_msg(player).unwrap_or(or) + pub fn get_player_axis(&self, player: &PlayerInfo, key: &u8) -> Option<f64> { + match self.control_data.lock() { + Ok(guard) => { + guard.get_axis(player, &key) + } + Err(_) => { + None + } + } } - pub fn list_received(&self, player: &PlayerInfo) -> Vec<ControlMessage> { - match self.read_list.lock() { + pub fn get_player_button_status(&self, player: &PlayerInfo, key: &u8) -> Option<bool> { + match self.control_data.lock() { Ok(guard) => { - match guard.get_key_value(player.account.player_hash.as_str()) { - None => { Vec::new() } - Some(result) => { - convert_deque_to_vec(result.1) - } - } + guard.get_button_status(player, &key) + } + Err(_) => { + None } - Err(_) => { Vec::new() } } } } @@ -303,6 +342,15 @@ pub mod nogamepads_server { Err(err) => Err(err) } } + + pub fn find_online_player(&self, hash: String) -> Option<PlayerInfo> { + match self.online_players.lock() { + Ok(guard) => { + guard.get(&hash).cloned() + } + Err(_) => None + } + } } // 服务端状态控制 @@ -360,6 +408,13 @@ pub mod nogamepads_server { } }); + let ctrl_c_thread = spawn({ + let client = Arc::clone(&self); + async move { + Self::process_ctrl_c(client).await + } + }); + if debug { let debug_cli = spawn({ let client = Arc::clone(&self); @@ -368,9 +423,9 @@ pub mod nogamepads_server { } }); - let _ = tokio::join!(debug_cli, main_thread, background_thread); + let _ = tokio::join!(ctrl_c_thread, debug_cli, main_thread, background_thread); } else { - let _ = tokio::join!(main_thread, background_thread); + let _ = tokio::join!(ctrl_c_thread, main_thread, background_thread); } } } @@ -387,6 +442,14 @@ pub mod nogamepads_server { self.game_locked.load(SeqCst) } + pub fn enter_monitor(&self) { + self.monitor_view.store(true, SeqCst); + } + + pub fn exit_monitor(&self) { + self.monitor_view.store(false, SeqCst); + } + async fn main_request_thread(self: Arc<Self>) { let addr_str = format!("{}:{}", self.address.to_string(), self.port); @@ -527,19 +590,19 @@ pub mod nogamepads_server { Ok(0) => break, Ok(n) => { let msg = ControlMessage::de(buf[0..n].to_vec()); - { - match self.read_list.lock() { - Ok(mut guard) => { - info!("{:?} from {}({})", &msg, player_info.customize.nickname, player_info.account.id); - guard - .entry(player_hash.clone()) - .or_insert_with(VecDeque::new) - .push_back(msg); - - } - Err(_) => { + match self.control_data.lock() { + Ok(mut guard) => { + info!("{:?} from {}({})", &msg, player_info.customize.nickname, player_info.account.id); + let player_info = self.find_online_player(player_hash.clone()); + if player_info.is_some() { + let player_info = player_info.unwrap(); + guard.insert_control(player_info, msg); + } else { + warn!("Player \"{}\" not found!", player_hash); } } + Err(_) => { + } } } Err(e) => { @@ -620,24 +683,136 @@ pub mod nogamepads_server { } } + async fn process_ctrl_c(self: Arc<Self>) { + loop { + signal::ctrl_c().await.unwrap(); + if self.monitor_view.load(SeqCst) { + self.exit_monitor(); + } else { + self.stop_server(); + info!("Stopping server..."); + break; + } + } + } + async fn process_debug_cli(self: Arc<Self>) { loop { if self.stop.load(SeqCst) { info!("Debug console exited"); return; } - tokio::time::sleep(Duration::from_secs_f64(0.2)).await; - let option: Option<Psc> = read_cli( - format!("SERVER {}> ", self.address.to_string()).as_str(), - "psc".to_string(), - Psc::command() - ).await; - match option { - None => {} - Some(cmd) => { - process_debug_cmd(cmd, Arc::clone(&self)); + + if ! self.monitor_view.load(SeqCst) { + tokio::time::sleep(Duration::from_secs_f64(0.2)).await; + + // 控制台模式 + let option: Option<Psc> = read_cli( + format!("SERVER {}> ", self.address.to_string()).as_str(), + "psc".to_string(), + Psc::command() + ).await; + match option { + None => {} + Some(cmd) => { + process_debug_cmd(cmd, Arc::clone(&self)); + } } + } else { + tokio::time::sleep(Duration::from_secs_f64(0.2)).await; + + // 实时信息模式 + + // 表头文本 + let mut header : Vec<String> = Vec::new(); + header.push("PLAYER \\ KEYS".to_string()); + self.all_keys(|key, name, i|{ + if i == 0 { + header.push(format!("{}(btn:{})", name, key)); + } else if i == 1 { + header.push(format!("{}(dir:{})", name, key)); + } else if i == 2 { + header.push(format!("{}(ax:{})", name, key)); + } + }); + + let mut info_table = Table::new(); + + // 添加表头 + info_table.add_row(Row::from_iter(header)); + + // 玩家 + let players = &self.deref().online_players; + match players.lock() { + Ok(guard) => { + for (_player_hash, player) in guard.iter() { + + // 行 + let mut line = Vec::new(); + line.push(player.account.id.to_string()); + self.all_keys(|key, _, i|{ + if i == 0 { + // 按钮 + let r = self.get_player_button_status(player, key); + if r.is_some() { + let r = r.unwrap(); + if r { + line.push("TRUE".to_string()); + } else { + line.push("FALSE".to_string()); + } + } else { + line.push("UNKNOWN".to_string()); + } + + } else if i == 1 { + // 方向 + let r = self.get_player_direction(player, key); + if r.is_some() { + let r = r.unwrap(); + line.push(format!("{}, {}", r.0, r.1)); + } else { + line.push("UNKNOWN".to_string()); + } + + } else if i == 2 { + // 轴向 + let r = self.get_player_axis(player, key); + if r.is_some() { + let r = r.unwrap(); + line.push(format!("{}", r)); + } else { + line.push("UNKNOWN".to_string()); + } + } + }); + + // 添加行文本 + info_table.add_row(Row::from_iter(line)); + } + } + Err(_) => {} + } + + let result = info_table.to_string(); + let _ = clear(); + println!("[HELP] Ctrl + C to exit monitor.\n{}", result); + } + } + } + + fn all_keys<F>(self: &Arc<Self>, mut f: F) + where F: FnMut(&u8, &String, i32){ + let mut i = 0; + for iter in [ + self.keys.button_keys.iter(), + self.keys.direction_keys.iter(), + self.keys.axis_keys.iter(), + ] { + for (key, name) in iter { + f(key, name, i); } + i += 1; } } } diff --git a/core/src/pad_service/server_debug_cli.rs b/core/src/pad_service/server_debug_cli.rs index ab9e5a5..ac52253 100644 --- a/core/src/pad_service/server_debug_cli.rs +++ b/core/src/pad_service/server_debug_cli.rs @@ -1,8 +1,7 @@ use std::collections::HashMap; -use crate::pad_data::pad_messages::nogamepads_messages::{ControlMessage, GameMessage}; +use crate::pad_data::pad_messages::nogamepads_messages::{GameMessage}; use crate::pad_service::server::nogamepads_server::PadServer; use clap::{Args, Parser, Subcommand}; -use std::ops::{Index}; use std::sync::{Arc, MutexGuard, PoisonError}; use log::{error, info}; use crate::pad_data::pad_player_info::nogamepads_player_info::PlayerInfo; @@ -22,6 +21,9 @@ enum Commands { #[command(about = "Clean the screen")] Clear, + #[command(about = "Enter monitor")] + Monitor, + // 关闭服务器 #[command(about = "Close the server")] Stop, @@ -34,13 +36,9 @@ enum Commands { #[command(about = "List all banned players")] Banned, - // 检查收到的消息 - #[command(about = "Check received")] - Received(ReceivedArgs), - // 取出一条消息 #[command(about = "Pop a message")] - Pop(PlayerArgs), + Pop, // 踢出玩家 #[command(about = "Kick a player")] @@ -54,6 +52,14 @@ enum Commands { #[command(about = "Pardon a player")] Pardon(PlayerArgs), + // 锁定游戏 + #[command(about = "Lock this game")] + Lock, + + // 解锁游戏 + #[command(about = "Unlock this game")] + Unlock, + // 激活事件触发器 #[command(about = "Send SkinEventTrigger")] Event(EventArgs) @@ -98,6 +104,10 @@ pub fn process_debug_cmd (cmd: Psc, server: Arc<PadServer>) { clearscreen::clear().expect("Failed to clear screen"); } + Commands::Monitor => { + server.enter_monitor(); + } + Commands::Stop => { server.stop_server(); } @@ -110,27 +120,11 @@ pub fn process_debug_cmd (cmd: Psc, server: Arc<PadServer>) { print_player_list(server.list_players_banned()); } - Commands::Received(args) => { - let players = server.list_players().unwrap_or(Vec::new()); - let player = players.index(args.player.clamp(0, players.iter().count() -1)); - if args.list { - for msg in server.list_received(player) { - info!("{:?}", msg); - } - } else { - info!("Total {} messsage(s)!", server.list_received(player).iter().count()); - } - } - - Commands::Pop(args) => { - match get_player_by_index(&server, args.index) { - None => { - error!("Pup message failed : Player index \"{}\" not found!", args.index); - } - Some(player) => { - let message = server.pop_msg_or(&player, ControlMessage::Err); - info!("{:?}", message); - } + Commands::Pop => { + let message = server.pop_a_msg(); + if message.is_some() { + let (player, msg) = message.unwrap(); + info!("{:?} from \"{}\"({})", msg, player.customize.nickname, player.account.id); } } @@ -158,6 +152,20 @@ pub fn process_debug_cmd (cmd: Psc, server: Arc<PadServer>) { } } + Commands::Lock => { + if ! server.is_game_locked() { + server.lock_game(); + info!("Game locked"); + } + } + + Commands::Unlock => { + if server.is_game_locked() { + server.unlock_game(); + info!("Game unlocked"); + } + } + Commands::Event(args) => { put_to_list(server, args.index, GameMessage::SkinEventTrigger(args.message)); } diff --git a/core_c/Cargo.toml b/core_c/Cargo.toml deleted file mode 100644 index 8fede0b..0000000 --- a/core_c/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "nogamepads_c" -edition = "2024" - -[dependencies] -nogamepads-core = { path = "../core" } - -[build-dependencies] -cbindgen = "0.29.0" - -[lib] -name = "nogamepads_lib_c" -crate-type = [ "cdylib", "staticlib"]
\ No newline at end of file diff --git a/documents/About Toolchain - 关于 Rust 工具链.md b/documents/About Toolchain - 关于 Rust 工具链.md deleted file mode 100644 index f3e947b..0000000 --- a/documents/About Toolchain - 关于 Rust 工具链.md +++ /dev/null @@ -1,17 +0,0 @@ -# 关于工具链的使用 - -## Core - -| 平台 | 工具链名称 | -| ------- | ----------------------------- | -| Windows | stable-x86_64-pc-windows-msvc | -| Linux | NONE | -| Mac OS | NONE | - -## Console - -| 平台 | 工具链名称 | -| ------- | ----------------------------- | -| Windows | stable-x86_64-pc-windows-msvc | -| Linux | NONE | -| Mac OS | NONE | diff --git a/documents/路线.md b/documents/路线.md deleted file mode 100644 index 6f4481c..0000000 --- a/documents/路线.md +++ /dev/null @@ -1,4 +0,0 @@ -1. 使用 Bevy 完成客户端图形界面的制作 -2. 完善核心层的事件逻辑处理 -3. 完善Csharp的绑定 -4. ...
\ No newline at end of file diff --git a/export/.gitignore b/export/.gitignore new file mode 100644 index 0000000..82235d4 --- /dev/null +++ b/export/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!Cargo.toml +!src/ +!src/**
\ No newline at end of file diff --git a/release/Cargo.toml b/export/Cargo.toml index e43d5fb..2a0cc4f 100644 --- a/release/Cargo.toml +++ b/export/Cargo.toml @@ -1,6 +1,8 @@ [package] -name = "release" +name = "nogamepads_export" authors = [ "CatilGrass" ] + +workspace = "../../NoGamepads" edition = "2024" [dependencies] diff --git a/release/src/bin/release_project.rs b/export/src/bin/export_project.rs index c608ff8..f5e34eb 100644 --- a/release/src/bin/release_project.rs +++ b/export/src/bin/export_project.rs @@ -26,33 +26,33 @@ pub struct ReleaseItem { pub fn main() { let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).parent().unwrap().to_path_buf(); - let toml_config = root.join("Release.toml"); + let toml_config = root.join("./Config_Export.toml"); let config: Config = toml::from_str(fs::read_to_string(toml_config).unwrap().as_str()) .expect("Failed to parse TOML"); - let release_root = - root.join("release"); + let export_root = + root.join("export"); - let release_dir_current_version = - release_root.join(env!("PROJECT_VERSION")); + let export_version_dir = + export_root.join(env!("PROJECT_VERSION")); let target_dir = root.join(".cargo").join("shared").join("target").join("release").join("deps"); // 清理目录 - let _ = remove_dir_all(&release_dir_current_version); + let _ = remove_dir_all(&export_version_dir); for data in config.release.root { println!("Releasing \"{}\" files", data.0); let raw_path = root.join(data.1.raw); - let target_path = release_dir_current_version.join(data.1.target); + let target_path = export_version_dir.join(data.1.target); copy_files(&raw_path, &target_path, data.1.files); } for data in config.release.deps { println!("Releasing \"{}\" files", data.0); let raw_path = target_dir.join(data.1.raw); - let target_path = release_dir_current_version.join(data.1.target); + let target_path = export_version_dir.join(data.1.target); copy_files(&raw_path, &target_path, data.1.files); } } diff --git a/release/0.1.0/LICENSE-LGPL-2 b/release/0.1.0/LICENSE-LGPL-2 deleted file mode 100644 index a00e7d8..0000000 --- a/release/0.1.0/LICENSE-LGPL-2 +++ /dev/null @@ -1,464 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - NoGamePads - Connect everyone's phones to the game! - Copyright (C) 2025-2026 Zewen Pan - - Contact information : - - Email: catil_grass@qq.com
\ No newline at end of file diff --git a/release/0.1.0/LICENSE-THIRD-PARTY b/release/0.1.0/LICENSE-THIRD-PARTY deleted file mode 100644 index a607e52..0000000 --- a/release/0.1.0/LICENSE-THIRD-PARTY +++ /dev/null @@ -1,649 +0,0 @@ -THIRD-PARTY LICENSES -===================== - -This project uses third-party components with the following licenses: - -[MIT License Dependencies] ------------------------------------------------------------------------ -* bincode -* tokio -* chrono (original license: Apache-2.0 OR MIT) -* clap (original license: Apache-2.0 OR MIT) -* clearscreen (original license: Apache-2.0 OR MIT) -* env_logger (original license: Apache-2.0 OR MIT) -* hex (original license: Apache-2.0 OR MIT) -* log (original license: Apache-2.0 OR MIT) -* rand (original license: Apache-2.0 OR MIT) -* serde (original license: Apache-2.0 OR MIT) -* serde_yaml (original license: Apache-2.0 OR MIT) -* sha1 (original license: Apache-2.0 OR MIT) -* shell-words (original license: Apache-2.0 OR MIT) -* toml (original license: Apache-2.0 OR MIT) - -MIT License - -Copyright (c) 2009-2014 Mozilla Foundation -Copyright (c) 2013-2014 The Rust Project Developers. - -* tokio - Copyright (c) Tokio Contributors. -* chrono - Copyright (c) 2014, Kang Seonghoon. -* clap - Copyright (c) The clap Project Developer(s). -* clearscreen - Copyright (c) The clearscreen Project Developer(s). -* env_logger - Copyright (c) The env_logger Project Developer(s). -* hex - Copyright (c) 2015-2020 The rust-hex Developers. -* log - Copyright (c) The log Project Developer(s). -* rand - Copyright 2018 Developers of the Rand project. -* serde - Copyright (c) The serde Project Developer(s). -* serde_yaml - Copyright (c) The serde_yaml Project Developer(s). - -* sha1 - - Copyright (c) 2006-2009 Graydon Hoare - Copyright (c) 2016 Artyom Pavlov - -* shell-words - Copyright (c) 2016 Tomasz Miąsko -* toml - Copyright (c) Individual contributors. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the “Software”), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -[Apache-2.0 License Dependencies] ------------------------------------------------------------------------ -* rpassword - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - -[BSD-3-Clause License Dependencies] ------------------------------------------------------------------------ -* prettytable-rs - -Copyright (c) 2022, Pierre-Henri Symoneaux -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of prettytable-rs nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -[Mozilla Public License Version 2.0 Dependencies] -* cbindgen - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/release/0.1.0/bin/nogpadc.exe b/release/0.1.0/bin/nogpadc.exe Binary files differdeleted file mode 100644 index 5fea05c..0000000 --- a/release/0.1.0/bin/nogpadc.exe +++ /dev/null diff --git a/release/0.1.0/bin/nogpads.exe b/release/0.1.0/bin/nogpads.exe Binary files differdeleted file mode 100644 index 9774267..0000000 --- a/release/0.1.0/bin/nogpads.exe +++ /dev/null diff --git a/release/0.1.0/bridge/nogamepads.h b/release/0.1.0/bridge/nogamepads.h deleted file mode 100644 index 997b73d..0000000 --- a/release/0.1.0/bridge/nogamepads.h +++ /dev/null @@ -1,202 +0,0 @@ -/* NoGamepads C Bindings. */ - -#include <stdarg.h> -#include <stdbool.h> -#include <stdint.h> -#include <stdlib.h> - -typedef enum CtrlMsgCTag { - Msg, - Pressed, - Released, - Axis, - Dir, - Exit, - Err, -} CtrlMsgCTag; - -typedef enum GameMsgCTag { - SkinEventTrigger, - DisableKey, - EnableKey, - Leave, - Err, -} GameMsgCTag; - -typedef enum LeaveReasonData { - GameOver, - ServerClosed, - YouAreKicked, - YouAreBanned, -} LeaveReasonData; - -typedef struct GameProfileC { - const char *game_name; - const char *game_description; - const char *organization; - const char *version; - const char *website; - const char *email; -} GameProfileC; - -typedef struct PlayerInfoC { - const char *account_id; - const char *account_hash; - const char *customize_nickname; - int32_t customize_color_hue; - double customize_color_saturation; - double customize_color_value; -} PlayerInfoC; - -typedef struct PadClientC { - const char *target_address; - uint16_t target_port; - struct PlayerInfoC bind_player; - bool enable_console; - bool quiet; -} PadClientC; - -typedef struct KeyData { - uint8_t key; -} KeyData; - -typedef struct AxisData { - uint8_t key; - double ax; -} AxisData; - -typedef struct DirData { - uint8_t key; - double x; - double y; -} DirData; - -typedef struct StrData { - const char *str; -} StrData; - -typedef union CtrlMsgCUnion { - void *nul; - struct KeyData key; - struct AxisData axis; - struct DirData dir; - struct StrData str; -} CtrlMsgCUnion; - -typedef struct ControlMessageC { - enum CtrlMsgCTag tag; - union CtrlMsgCUnion data; -} ControlMessageC; - -typedef union GameMsgCUnion { - void *nul; - struct KeyData key; - enum LeaveReasonData reason; -} GameMsgCUnion; - -typedef struct GameMessageC { - enum GameMsgCTag tag; - union GameMsgCUnion data; -} GameMessageC; - -typedef struct PlayerList { - struct PlayerInfoC *players; - uintptr_t len; - uintptr_t capacity; -} PlayerList; - -struct GameProfileC init_game_profile(void); - -struct GameProfileC set_game_profile_name(struct GameProfileC game_profile, const char *value); - -struct GameProfileC set_game_profile_description(struct GameProfileC game_profile, - const char *value); - -struct GameProfileC set_game_profile_organization(struct GameProfileC game_profile, - const char *value); - -struct GameProfileC set_game_profile_version(struct GameProfileC game_profile, const char *value); - -struct GameProfileC set_game_profile_website(struct GameProfileC game_profile, const char *value); - -struct GameProfileC set_game_profile_email(struct GameProfileC game_profile, const char *value); - -struct PlayerInfoC init_player_info(void); - -struct PlayerInfoC set_player_info_account(struct PlayerInfoC info, - const char *id, - const char *password); - -struct PlayerInfoC set_player_info_color(struct PlayerInfoC info, int32_t h, double s, double v); - -struct PlayerInfoC set_player_info_nickname(struct PlayerInfoC info, const char *nickname); - -uint16_t get_default_port(void); - -struct PadClientC init_client(const char *address); - -struct PadClientC init_client_with_port(const char *address, uint16_t port); - -struct PadClientC set_client_quiet(struct PadClientC client); - -struct PadClientC enable_client_console(struct PadClientC client); - -struct PadClientC bind_player_to_client(struct PadClientC client, struct PlayerInfoC info); - -PadClient *complete(struct PadClientC client); - -void connect_client_to_server(PadClient *client); - -void exit_client_from_server(const PadClient *client); - -void put_a_msg_to_server(const PadClient *client, struct ControlMessageC msg); - -struct GameMessageC pop_a_msg_from_server(const PadClient *client); - -struct GameMessageC pop_msg_from_server_or(const PadClient *client, struct GameMessageC or); - -PadServer *init_server(const char *address); - -PadServer *init_server_with_port(const char *address, uint16_t port); - -void set_server_quiet(PadServer *server); - -void enable_server_console(PadServer *server); - -void bind_profile_to_server(PadServer *server, const struct GameProfileC *profile); - -void start_server(PadServer *server); - -void stop_server(PadServer *server); - -void lock_game_on_server(PadServer *server); - -void unlock_game_on_server(PadServer *server); - -bool is_server_game_locked(PadServer *server); - -void put_a_msg_to_player(PadServer *server, - struct GameMessageC msg, - const struct PlayerInfoC *player); - -void put_msg_to_all_players(PadServer *server, struct GameMessageC msg); - -struct ControlMessageC pop_a_msg_from_player(PadServer *server, const struct PlayerInfoC *player); - -struct ControlMessageC pop_msg_from_player_or(PadServer *server, - const struct PlayerInfoC *player, - struct ControlMessageC or); - -bool is_player_online(PadServer *server, const struct PlayerInfoC *player); - -bool is_player_banned(PadServer *server, const struct PlayerInfoC *player); - -void kick_player(PadServer *server, const struct PlayerInfoC *player); - -void ban_player(PadServer *server, const struct PlayerInfoC *player); - -void pardon_player(PadServer *server, const struct PlayerInfoC *player); - -struct PlayerList list_online_players(PadServer *server); - -struct PlayerList list_banned_players(PadServer *server); diff --git a/release/0.1.0/bridge/nogamepads_cpp.h b/release/0.1.0/bridge/nogamepads_cpp.h deleted file mode 100644 index 77469fb..0000000 --- a/release/0.1.0/bridge/nogamepads_cpp.h +++ /dev/null @@ -1,207 +0,0 @@ -/* NoGamepads C++ Bindings. */ - -/* Generated with cbindgen:0.29.0 */ - -#include <cstdarg> -#include <cstdint> -#include <cstdlib> -#include <ostream> -#include <new> - -namespace nogamepads { - -enum class CtrlMsgCTag { - Msg, - Pressed, - Released, - Axis, - Dir, - Exit, - Err, -}; - -enum class GameMsgCTag { - SkinEventTrigger, - DisableKey, - EnableKey, - Leave, - Err, -}; - -enum class LeaveReasonData { - GameOver, - ServerClosed, - YouAreKicked, - YouAreBanned, -}; - -struct GameProfileC { - const char *game_name; - const char *game_description; - const char *organization; - const char *version; - const char *website; - const char *email; -}; - -struct PlayerInfoC { - const char *account_id; - const char *account_hash; - const char *customize_nickname; - int32_t customize_color_hue; - double customize_color_saturation; - double customize_color_value; -}; - -struct PadClientC { - const char *target_address; - uint16_t target_port; - PlayerInfoC bind_player; - bool enable_console; - bool quiet; -}; - -struct KeyData { - uint8_t key; -}; - -struct AxisData { - uint8_t key; - double ax; -}; - -struct DirData { - uint8_t key; - double x; - double y; -}; - -struct StrData { - const char *str; -}; - -union CtrlMsgCUnion { - void *nul; - KeyData key; - AxisData axis; - DirData dir; - StrData str; -}; - -struct ControlMessageC { - CtrlMsgCTag tag; - CtrlMsgCUnion data; -}; - -union GameMsgCUnion { - void *nul; - KeyData key; - LeaveReasonData reason; -}; - -struct GameMessageC { - GameMsgCTag tag; - GameMsgCUnion data; -}; - -struct PlayerList { - PlayerInfoC *players; - uintptr_t len; - uintptr_t capacity; -}; - -extern "C" { - -GameProfileC init_game_profile(); - -GameProfileC set_game_profile_name(GameProfileC game_profile, const char *value); - -GameProfileC set_game_profile_description(GameProfileC game_profile, const char *value); - -GameProfileC set_game_profile_organization(GameProfileC game_profile, const char *value); - -GameProfileC set_game_profile_version(GameProfileC game_profile, const char *value); - -GameProfileC set_game_profile_website(GameProfileC game_profile, const char *value); - -GameProfileC set_game_profile_email(GameProfileC game_profile, const char *value); - -PlayerInfoC init_player_info(); - -PlayerInfoC set_player_info_account(PlayerInfoC info, const char *id, const char *password); - -PlayerInfoC set_player_info_color(PlayerInfoC info, int32_t h, double s, double v); - -PlayerInfoC set_player_info_nickname(PlayerInfoC info, const char *nickname); - -uint16_t get_default_port(); - -PadClientC init_client(const char *address); - -PadClientC init_client_with_port(const char *address, uint16_t port); - -PadClientC set_client_quiet(PadClientC client); - -PadClientC enable_client_console(PadClientC client); - -PadClientC bind_player_to_client(PadClientC client, PlayerInfoC info); - -PadClient *complete(PadClientC client); - -void connect_client_to_server(PadClient *client); - -void exit_client_from_server(const PadClient *client); - -void put_a_msg_to_server(const PadClient *client, ControlMessageC msg); - -GameMessageC pop_a_msg_from_server(const PadClient *client); - -GameMessageC pop_msg_from_server_or(const PadClient *client, GameMessageC or); - -PadServer *init_server(const char *address); - -PadServer *init_server_with_port(const char *address, uint16_t port); - -void set_server_quiet(PadServer *server); - -void enable_server_console(PadServer *server); - -void bind_profile_to_server(PadServer *server, const GameProfileC *profile); - -void start_server(PadServer *server); - -void stop_server(PadServer *server); - -void lock_game_on_server(PadServer *server); - -void unlock_game_on_server(PadServer *server); - -bool is_server_game_locked(PadServer *server); - -void put_a_msg_to_player(PadServer *server, GameMessageC msg, const PlayerInfoC *player); - -void put_msg_to_all_players(PadServer *server, GameMessageC msg); - -ControlMessageC pop_a_msg_from_player(PadServer *server, const PlayerInfoC *player); - -ControlMessageC pop_msg_from_player_or(PadServer *server, - const PlayerInfoC *player, - ControlMessageC or); - -bool is_player_online(PadServer *server, const PlayerInfoC *player); - -bool is_player_banned(PadServer *server, const PlayerInfoC *player); - -void kick_player(PadServer *server, const PlayerInfoC *player); - -void ban_player(PadServer *server, const PlayerInfoC *player); - -void pardon_player(PadServer *server, const PlayerInfoC *player); - -PlayerList list_online_players(PadServer *server); - -PlayerList list_banned_players(PadServer *server); - -} // extern "C" - -} // namespace nogamepads diff --git a/release/0.1.0/bridge/nogamepads_lib_c.dll b/release/0.1.0/bridge/nogamepads_lib_c.dll Binary files differdeleted file mode 100644 index 1dcd807..0000000 --- a/release/0.1.0/bridge/nogamepads_lib_c.dll +++ /dev/null diff --git a/src/console_utils.rs b/src/console_utils.rs index 3e673fc..75e9483 100644 --- a/src/console_utils.rs +++ b/src/console_utils.rs @@ -61,4 +61,4 @@ pub mod debug_console { } } } -} +}
\ No newline at end of file |
