diff --git a/.gitignore b/.gitignore index a712af08..f8db7371 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,14 @@ /Test/bassenc.dll /Test/bassmix.dll /Test/basswasapi.dll + +/Test/dll/bass_fx.dll +/Test/dll/bass.dll +/Test/dll/bassasio.dll +/Test/dll/bassenc.dll +/Test/dll/bassmix.dll +/Test/dll/basswasapi.dll + /Test/System/0.JpnNijiiro /Test/System/BasicStyle /Test/System/OpenSkin diff --git a/TJAPlayer3/Common/CConfigIni.cs b/TJAPlayer3/Common/CConfigIni.cs index fcf92349..19d71c91 100644 --- a/TJAPlayer3/Common/CConfigIni.cs +++ b/TJAPlayer3/Common/CConfigIni.cs @@ -2532,7 +2532,7 @@ namespace TJAPlayer3 #region [ WASAPI/ASIO関係 ] else if ( str3.Equals( "SoundDeviceType" ) ) { - this.nSoundDeviceType = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 3, this.nSoundDeviceType ); + this.nSoundDeviceType = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, Environment.Is64BitProcess ? 1 : 0, 3, this.nSoundDeviceType ); } else if ( str3.Equals( "WASAPIBufferSizeMs" ) ) { diff --git a/TJAPlayer3/Common/Discord.cs b/TJAPlayer3/Common/Discord.cs index 4d00cc54..50640619 100644 --- a/TJAPlayer3/Common/Discord.cs +++ b/TJAPlayer3/Common/Discord.cs @@ -47,17 +47,26 @@ namespace TJAPlayer3 [DllImport("discord-rpc", EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)] public static extern void Initialize(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId); + [DllImport("discord-rpc-x64", EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)] + public static extern void Initialize_x64(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId); + [DllImport("discord-rpc", EntryPoint = "Discord_Shutdown", CallingConvention = CallingConvention.Cdecl)] public static extern void Shutdown(); + [DllImport("discord-rpc-x64", EntryPoint = "Discord_Shutdown", CallingConvention = CallingConvention.Cdecl)] + public static extern void Shutdown_x64(); + /* [DllImport("discord-rpc", EntryPoint = "Discord_RunCallbacks", CallingConvention = CallingConvention.Cdecl)] public static extern void RunCallbacks(); - */ - + */ + [DllImport("discord-rpc", EntryPoint = "Discord_UpdatePresence", CallingConvention = CallingConvention.Cdecl)] public static extern void UpdatePresence(ref RichPresence presence); + [DllImport("discord-rpc-x64", EntryPoint = "Discord_UpdatePresence", CallingConvention = CallingConvention.Cdecl)] + public static extern void UpdatePresence_x64(ref RichPresence presence); + /* [DllImport("discord-rpc", EntryPoint = "Discord_ClearPresence", CallingConvention = CallingConvention.Cdecl)] public static extern void ClearPresence(); @@ -101,7 +110,14 @@ namespace TJAPlayer3 handlers.disconnectedCallback += DisconnectedCallback; handlers.errorCallback += ErrorCallback; - DiscordRpc.Initialize(clientId, ref handlers, true, null); + if (Environment.Is64BitProcess) + { + DiscordRpc.Initialize_x64(clientId, ref handlers, true, null); + } + else + { + DiscordRpc.Initialize(clientId, ref handlers, true, null); + } } @@ -125,9 +141,16 @@ namespace TJAPlayer3 presence.largeImageKey = StrToPtr("logo".ToLowerInvariant()); presence.largeImageText = StrToPtr(TJAPlayer3.AppDisplayThreePartVersion); if (!string.IsNullOrEmpty(smallImageKey)) presence.smallImageKey = StrToPtr(smallImageKey); - if (!string.IsNullOrEmpty(smallImageText)) presence.smallImageText = StrToPtr(smallImageText); - - DiscordRpc.UpdatePresence(ref presence); + if (!string.IsNullOrEmpty(smallImageText)) presence.smallImageText = StrToPtr(smallImageText); + + if (Environment.Is64BitProcess) + { + DiscordRpc.UpdatePresence_x64(ref presence); + } + else + { + DiscordRpc.UpdatePresence(ref presence); + } FreeMem(); } @@ -136,8 +159,15 @@ namespace TJAPlayer3 /// 終了時に必ず呼び出す必要があります。 /// public static void Shutdown() - { - DiscordRpc.Shutdown(); + { + if (Environment.Is64BitProcess) + { + DiscordRpc.Shutdown_x64(); + } + else + { + DiscordRpc.Shutdown(); + } Trace.TraceInformation("[Discord] Shutdowned."); } diff --git a/TJAPlayer3/Common/TJAPlayer3.cs b/TJAPlayer3/Common/TJAPlayer3.cs index e16b83ba..f61bf37f 100644 --- a/TJAPlayer3/Common/TJAPlayer3.cs +++ b/TJAPlayer3/Common/TJAPlayer3.cs @@ -2437,7 +2437,8 @@ for (int i = 0; i < 3; i++) { try { ESoundDeviceType soundDeviceType; - switch ( TJAPlayer3.ConfigIni.nSoundDeviceType ) + switch (Environment.Is64BitProcess ? TJAPlayer3.ConfigIni.nSoundDeviceType + 1 : + TJAPlayer3.ConfigIni.nSoundDeviceType) { case 0: soundDeviceType = ESoundDeviceType.DirectSound; diff --git a/TJAPlayer3/Stages/04.Config/CActConfigList.cs b/TJAPlayer3/Stages/04.Config/CActConfigList.cs index 7134658c..ceb9fe68 100644 --- a/TJAPlayer3/Stages/04.Config/CActConfigList.cs +++ b/TJAPlayer3/Stages/04.Config/CActConfigList.cs @@ -200,12 +200,22 @@ namespace TJAPlayer3 this.list項目リスト.Add( this.iSystemBufferedInput ); this.iLogOutputLog = new CItemToggle(CLangManager.LangInstance.GetString(10042), TJAPlayer3.ConfigIni.bログ出力, CLangManager.LangInstance.GetString(42)); - this.list項目リスト.Add( this.iLogOutputLog ); - - // #24820 2013.1.3 yyagi - this.iSystemSoundType = new CItemList(CLangManager.LangInstance.GetString(10043), CItemList.Eパネル種別.通常, TJAPlayer3.ConfigIni.nSoundDeviceType, + this.list項目リスト.Add( this.iLogOutputLog ); + + // #24820 2013.1.3 yyagi + + if (Environment.Is64BitProcess) + { + this.iSystemSoundType = new CItemList(CLangManager.LangInstance.GetString(10043), CItemList.Eパネル種別.通常, TJAPlayer3.ConfigIni.nSoundDeviceType, CLangManager.LangInstance.GetString(43), - new string[] { "DSound", "ASIO", "WASAPI Exclusive", "WASAPI Shared" }); + new string[] { "ASIO", "WASAPI Exclusive", "WASAPI Shared" }); + } + else + { + this.iSystemSoundType = new CItemList(CLangManager.LangInstance.GetString(10043), CItemList.Eパネル種別.通常, TJAPlayer3.ConfigIni.nSoundDeviceType, + CLangManager.LangInstance.GetString(43), + new string[] { "DSound", "ASIO", "WASAPI Exclusive", "WASAPI Shared" }); + } this.list項目リスト.Add(this.iSystemSoundType); // #24820 2013.1.15 yyagi @@ -834,7 +844,8 @@ namespace TJAPlayer3 this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex() ) { ESoundDeviceType soundDeviceType; - switch ( this.iSystemSoundType.n現在選択されている項目番号 ) + switch (Environment.Is64BitProcess ? this.iSystemSoundType.n現在選択されている項目番号 + 1 : + this.iSystemSoundType.n現在選択されている項目番号) { case 0: soundDeviceType = ESoundDeviceType.DirectSound; diff --git a/TJAPlayer3/TJAPlayer3.csproj b/TJAPlayer3/TJAPlayer3.csproj index 7cb06e12..53c9001e 100644 --- a/TJAPlayer3/TJAPlayer3.csproj +++ b/TJAPlayer3/TJAPlayer3.csproj @@ -73,7 +73,7 @@ true - bin\x64\Debug\ + ..\Test\ TRACE;DEBUG;_TEST_ENGLISH TEST_Direct3D9Ex_ _WindowedFullscreen MemoryRenderer true 0219 @@ -84,7 +84,7 @@ prompt - bin\x64\Release\ + ..\Test\ TRACE;TEST_ENGLISH_ TEST_Direct3D9Ex_ _WindowedFullscreen true 0219 @@ -454,10 +454,21 @@ move /y "$(TargetDir)KeraLua.dll" "$(SolutionDir)Test\dll\" move /y "$(TargetDir)liblua54.dylib" "$(SolutionDir)Test\dll\" +move /y "$(TargetDir)liblua54.so" "$(SolutionDir)Test\dll\" + move /y "$(TargetDir)CSharpTest.Net.Collections.*" "$(SolutionDir)Test\dll\" move /y "$(TargetDir)System.*" "$(SolutionDir)Test\dll\" + +if "$(PlatformName)" == "x86" ( + +copy /y "$(TargetDir)dll\x86\*.dll" "$(SolutionDir)Test\dll\" +) else ( + +copy /y "$(TargetDir)dll\x64\*.dll" "$(SolutionDir)Test\dll\" +) + copy /y "$(SolutionDir)Readme.txt" "$(SolutionDir)Test\" diff --git a/Test/discord-rpc-x64.dll b/Test/discord-rpc-x64.dll new file mode 100644 index 00000000..8493c549 Binary files /dev/null and b/Test/discord-rpc-x64.dll differ diff --git a/Test/dll/liblua54.so b/Test/dll/liblua54.so new file mode 100644 index 00000000..c442a28f Binary files /dev/null and b/Test/dll/liblua54.so differ diff --git a/Test/dll/lua54.dll b/Test/dll/lua54.dll index e38d2972..175e0def 100644 Binary files a/Test/dll/lua54.dll and b/Test/dll/lua54.dll differ diff --git a/Test/dll/x64/bass.dll b/Test/dll/x64/bass.dll new file mode 100644 index 00000000..84298be2 Binary files /dev/null and b/Test/dll/x64/bass.dll differ diff --git a/Test/dll/x64/bass_fx.dll b/Test/dll/x64/bass_fx.dll new file mode 100644 index 00000000..23e3a6e1 Binary files /dev/null and b/Test/dll/x64/bass_fx.dll differ diff --git a/Test/dll/x64/bassasio.dll b/Test/dll/x64/bassasio.dll new file mode 100644 index 00000000..688ac996 Binary files /dev/null and b/Test/dll/x64/bassasio.dll differ diff --git a/Test/dll/x64/bassenc.dll b/Test/dll/x64/bassenc.dll new file mode 100644 index 00000000..0894acae Binary files /dev/null and b/Test/dll/x64/bassenc.dll differ diff --git a/Test/dll/x64/bassmix.dll b/Test/dll/x64/bassmix.dll new file mode 100644 index 00000000..65b8dcd8 Binary files /dev/null and b/Test/dll/x64/bassmix.dll differ diff --git a/Test/dll/x64/basswasapi.dll b/Test/dll/x64/basswasapi.dll new file mode 100644 index 00000000..7d30222f Binary files /dev/null and b/Test/dll/x64/basswasapi.dll differ diff --git a/Test/dll/bass.dll b/Test/dll/x86/bass.dll similarity index 100% rename from Test/dll/bass.dll rename to Test/dll/x86/bass.dll diff --git a/Test/dll/bass_fx.dll b/Test/dll/x86/bass_fx.dll similarity index 100% rename from Test/dll/bass_fx.dll rename to Test/dll/x86/bass_fx.dll diff --git a/Test/dll/bassasio.dll b/Test/dll/x86/bassasio.dll similarity index 100% rename from Test/dll/bassasio.dll rename to Test/dll/x86/bassasio.dll diff --git a/Test/dll/bassenc.dll b/Test/dll/x86/bassenc.dll similarity index 100% rename from Test/dll/bassenc.dll rename to Test/dll/x86/bassenc.dll diff --git a/Test/dll/bassmix.dll b/Test/dll/x86/bassmix.dll similarity index 100% rename from Test/dll/bassmix.dll rename to Test/dll/x86/bassmix.dll diff --git a/Test/dll/basswasapi.dll b/Test/dll/x86/basswasapi.dll similarity index 100% rename from Test/dll/basswasapi.dll rename to Test/dll/x86/basswasapi.dll diff --git a/build-x64.bat b/build-x64.bat new file mode 100644 index 00000000..b41ef1f7 --- /dev/null +++ b/build-x64.bat @@ -0,0 +1,24 @@ +@echo off +setlocal enabledelayedexpansion + +if defined ProgramFiles(x86) ( + set VSWHERE="!ProgramFiles(x86)!\Microsoft Visual Studio\Installer\vswhere.exe" +) else ( + set VSWHERE="!ProgramFiles!\Microsoft Visual Studio\Installer\vswhere.exe" +) + +if exist !VSWHERE! ( + for /f "usebackq delims=" %%i in (`!VSWHERE! -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do ( + set MSBUILD="%%i" + ) + + if exist !MSBUILD! ( + !MSBUILD! TJAPlayer3.sln /t:build -restore /p:configuration=release /p:platform=x64 + ) else ( + echo MSBuild is not installed. Please read: https://github.com/l1m0n3/OpenTaiko/wiki/How-to-build-OpenTaiko-without-using-Visual-Studio-^(on-Windows^) + ) +) else ( + echo Visual Studio Installer is not installed. Please read: https://github.com/l1m0n3/OpenTaiko/wiki/How-to-build-OpenTaiko-without-using-Visual-Studio-^(on-Windows^) +) + +pause