1
0
mirror of synced 2025-02-13 01:04:32 +01:00

hotfix: Hide Windows-only settings from config menu on Linux (#788)

This commit is contained in:
DragonRatTiger / リュウコ 2025-02-01 15:34:44 -06:00 committed by GitHub
parent 251100db3e
commit bff30597f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 72 additions and 47 deletions

View File

@ -1993,10 +1993,12 @@ internal class CConfigIni : INotifyPropertyChanged {
sw.WriteLine("; 存在しないデバイスを指定すると、DTXManiaが起動しないことがあります。"); sw.WriteLine("; 存在しないデバイスを指定すると、DTXManiaが起動しないことがあります。");
sw.WriteLine("; Sound device used by ASIO."); sw.WriteLine("; Sound device used by ASIO.");
sw.WriteLine("; Don't specify unconnected device, as the DTXMania may not bootup."); sw.WriteLine("; Don't specify unconnected device, as the DTXMania may not bootup.");
if (OperatingSystem.IsWindows()) {
string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices(); string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();
for (int i = 0; i < asiodev.Length; i++) { for (int i = 0; i < asiodev.Length; i++) {
sw.WriteLine("; {0}: {1}", i, asiodev[i]); sw.WriteLine("; {0}: {1}", i, asiodev[i]);
} }
}
sw.WriteLine("ASIODevice={0}", (int)this.nASIODevice); sw.WriteLine("ASIODevice={0}", (int)this.nASIODevice);
sw.WriteLine(); sw.WriteLine();
@ -2797,8 +2799,13 @@ internal class CConfigIni : INotifyPropertyChanged {
this.nWASAPIBufferSizeMs = CConversion.ParseIntInRange(value, 0, 9999, this.nWASAPIBufferSizeMs); this.nWASAPIBufferSizeMs = CConversion.ParseIntInRange(value, 0, 9999, this.nWASAPIBufferSizeMs);
break; break;
case "ASIODevice": { case "ASIODevice": {
if (OperatingSystem.IsWindows()) {
string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices(); string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();
this.nASIODevice = CConversion.ParseIntInRange(value, 0, asiodev.Length - 1, this.nASIODevice); this.nASIODevice = CConversion.ParseIntInRange(value, 0, asiodev.Length - 1, this.nASIODevice);
}
else {
this.nASIODevice = 0;
}
break; break;
} }
case "SoundTimerType": case "SoundTimerType":

View File

@ -233,6 +233,7 @@ internal class CActConfigList : CActivity {
CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_BASSBUFFER_DESC")); CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_BASSBUFFER_DESC"));
this.list項目リスト.Add(this.iSystemBassBufferSizeMs); this.list項目リスト.Add(this.iSystemBassBufferSizeMs);
if (OperatingSystem.IsWindows()) {
// #24820 2013.1.15 yyagi // #24820 2013.1.15 yyagi
this.iSystemWASAPIBufferSizeMs = new CItemInteger(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER"), 0, 99999, OpenTaiko.ConfigIni.nWASAPIBufferSizeMs, this.iSystemWASAPIBufferSizeMs = new CItemInteger(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER"), 0, 99999, OpenTaiko.ConfigIni.nWASAPIBufferSizeMs,
CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER_DESC")); CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER_DESC"));
@ -243,6 +244,7 @@ internal class CActConfigList : CActivity {
CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_ASIOPLAYBACK_DESC"), CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_ASIOPLAYBACK_DESC"),
CEnumerateAllAsioDevices.GetAllASIODevices()); CEnumerateAllAsioDevices.GetAllASIODevices());
this.list項目リスト.Add(this.iSystemASIODevice); this.list項目リスト.Add(this.iSystemASIODevice);
}
// #33689 2014.6.17 yyagi // #33689 2014.6.17 yyagi
this.iSystemSoundTimerType = new CItemToggle(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_OSTIMER"), OpenTaiko.ConfigIni.bUseOSTimer, this.iSystemSoundTimerType = new CItemToggle(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_OSTIMER"), OpenTaiko.ConfigIni.bUseOSTimer,
@ -1015,10 +1017,12 @@ internal class CActConfigList : CActivity {
this.nスクロール用タイマ値 = -1; this.nスクロール用タイマ値 = -1;
this.ct三角矢印アニメ = new CCounter(); this.ct三角矢印アニメ = new CCounter();
this.iSystemSoundType_initial = this.iSystemSoundType.n現在選択されている項目番号; // CONFIGに入ったときの値を保持しておく
this.iSystemBassBufferSizeMs_initial = this.iSystemBassBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら this.iSystemBassBufferSizeMs_initial = this.iSystemBassBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら
if (OperatingSystem.IsWindows()) {
this.iSystemSoundType_initial = this.iSystemSoundType.n現在選択されている項目番号; // CONFIGに入ったときの値を保持しておく
this.iSystemWASAPIBufferSizeMs_initial = this.iSystemWASAPIBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら this.iSystemWASAPIBufferSizeMs_initial = this.iSystemWASAPIBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら
this.iSystemASIODevice_initial = this.iSystemASIODevice.n現在選択されている項目番号; this.iSystemASIODevice_initial = this.iSystemASIODevice.n現在選択されている項目番号;
}
this.iSystemSoundTimerType_initial = this.iSystemSoundTimerType.GetIndex(); this.iSystemSoundTimerType_initial = this.iSystemSoundTimerType.GetIndex();
base.Activate(); base.Activate();
} }
@ -1048,6 +1052,7 @@ internal class CActConfigList : CActivity {
// #24820 2013.1.22 yyagi CONFIGでWASAPI/ASIO/DirectSound関連の設定を変更した場合、サウンドデバイスを再構築する。 // #24820 2013.1.22 yyagi CONFIGでWASAPI/ASIO/DirectSound関連の設定を変更した場合、サウンドデバイスを再構築する。
// #33689 2014.6.17 yyagi CONFIGでSoundTimerTypeの設定を変更した場合も、サウンドデバイスを再構築する。 // #33689 2014.6.17 yyagi CONFIGでSoundTimerTypeの設定を変更した場合も、サウンドデバイスを再構築する。
#region [ ] #region [ ]
if (OperatingSystem.IsWindows()) {
if (this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 || if (this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 ||
this.iSystemBassBufferSizeMs_initial != this.iSystemBassBufferSizeMs.n現在の値 || this.iSystemBassBufferSizeMs_initial != this.iSystemBassBufferSizeMs.n現在の値 ||
this.iSystemWASAPIBufferSizeMs_initial != this.iSystemWASAPIBufferSizeMs.n現在の値 || this.iSystemWASAPIBufferSizeMs_initial != this.iSystemWASAPIBufferSizeMs.n現在の値 ||
@ -1080,6 +1085,18 @@ internal class CActConfigList : CActivity {
OpenTaiko.app.ShowWindowTitle(); OpenTaiko.app.ShowWindowTitle();
OpenTaiko.Skin.ReloadSkin();// 音声の再読み込みをすることによって、音量の初期化を防ぐ OpenTaiko.Skin.ReloadSkin();// 音声の再読み込みをすることによって、音量の初期化を防ぐ
} }
}
else {
if (this.iSystemBassBufferSizeMs_initial != this.iSystemBassBufferSizeMs.n現在の値 ||
this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex()) {
OpenTaiko.SoundManager.tInitialize(ESoundDeviceType.Bass,
this.iSystemBassBufferSizeMs.n現在の値,
0,
0,
0,
this.iSystemSoundTimerType.bON);
}
}
#endregion #endregion
#region [ ] #region [ ]
FDK.SoundManager.bIsTimeStretch = this.iSystemTimeStretch.bON; FDK.SoundManager.bIsTimeStretch = this.iSystemTimeStretch.bON;
@ -1687,11 +1704,12 @@ internal class CActConfigList : CActivity {
OpenTaiko.ConfigIni.strSystemSkinSubfolderFullName = skinSubFolders[nSkinIndex]; // #28195 2012.5.2 yyagi OpenTaiko.ConfigIni.strSystemSkinSubfolderFullName = skinSubFolders[nSkinIndex]; // #28195 2012.5.2 yyagi
OpenTaiko.Skin.SetCurrentSkinSubfolderFullName(OpenTaiko.ConfigIni.strSystemSkinSubfolderFullName, true); OpenTaiko.Skin.SetCurrentSkinSubfolderFullName(OpenTaiko.ConfigIni.strSystemSkinSubfolderFullName, true);
OpenTaiko.ConfigIni.nSoundDeviceType = this.iSystemSoundType.n現在選択されている項目番号; // #24820 2013.1.3 yyagi
OpenTaiko.ConfigIni.nBassBufferSizeMs = this.iSystemBassBufferSizeMs.n現在の値; // #24820 2013.1.15 yyagi OpenTaiko.ConfigIni.nBassBufferSizeMs = this.iSystemBassBufferSizeMs.n現在の値; // #24820 2013.1.15 yyagi
if (OperatingSystem.IsWindows()) {
OpenTaiko.ConfigIni.nSoundDeviceType = this.iSystemSoundType.n現在選択されている項目番号; // #24820 2013.1.3 yyagi
OpenTaiko.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値; // #24820 2013.1.15 yyagi OpenTaiko.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値; // #24820 2013.1.15 yyagi
// CDTXMania.ConfigIni.nASIOBufferSizeMs = this.iSystemASIOBufferSizeMs.n現在の値; // #24820 2013.1.3 yyagi
OpenTaiko.ConfigIni.nASIODevice = this.iSystemASIODevice.n現在選択されている項目番号; // #24820 2013.1.17 yyagi OpenTaiko.ConfigIni.nASIODevice = this.iSystemASIODevice.n現在選択されている項目番号; // #24820 2013.1.17 yyagi
}
OpenTaiko.ConfigIni.bUseOSTimer = this.iSystemSoundTimerType.bON; // #33689 2014.6.17 yyagi OpenTaiko.ConfigIni.bUseOSTimer = this.iSystemSoundTimerType.bON; // #33689 2014.6.17 yyagi
OpenTaiko.ConfigIni.bTimeStretch = this.iSystemTimeStretch.bON; // #23664 2013.2.24 yyagi OpenTaiko.ConfigIni.bTimeStretch = this.iSystemTimeStretch.bON; // #23664 2013.2.24 yyagi