hotfix: Hide Windows-only settings from config menu on Linux (#788)
This commit is contained in:
parent
251100db3e
commit
bff30597f8
@ -1993,9 +1993,11 @@ 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.");
|
||||||
string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();
|
if (OperatingSystem.IsWindows()) {
|
||||||
for (int i = 0; i < asiodev.Length; i++) {
|
string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();
|
||||||
sw.WriteLine("; {0}: {1}", i, asiodev[i]);
|
for (int i = 0; i < asiodev.Length; i++) {
|
||||||
|
sw.WriteLine("; {0}: {1}", i, asiodev[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sw.WriteLine("ASIODevice={0}", (int)this.nASIODevice);
|
sw.WriteLine("ASIODevice={0}", (int)this.nASIODevice);
|
||||||
@ -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": {
|
||||||
string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();
|
if (OperatingSystem.IsWindows()) {
|
||||||
this.nASIODevice = CConversion.ParseIntInRange(value, 0, asiodev.Length - 1, this.nASIODevice);
|
string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();
|
||||||
|
this.nASIODevice = CConversion.ParseIntInRange(value, 0, asiodev.Length - 1, this.nASIODevice);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.nASIODevice = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "SoundTimerType":
|
case "SoundTimerType":
|
||||||
|
@ -233,16 +233,18 @@ 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);
|
||||||
|
|
||||||
// #24820 2013.1.15 yyagi
|
if (OperatingSystem.IsWindows()) {
|
||||||
this.iSystemWASAPIBufferSizeMs = new CItemInteger(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER"), 0, 99999, OpenTaiko.ConfigIni.nWASAPIBufferSizeMs,
|
// #24820 2013.1.15 yyagi
|
||||||
CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER_DESC"));
|
this.iSystemWASAPIBufferSizeMs = new CItemInteger(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER"), 0, 99999, OpenTaiko.ConfigIni.nWASAPIBufferSizeMs,
|
||||||
this.list項目リスト.Add(this.iSystemWASAPIBufferSizeMs);
|
CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_WASAPIBUFFER_DESC"));
|
||||||
|
this.list項目リスト.Add(this.iSystemWASAPIBufferSizeMs);
|
||||||
|
|
||||||
// #24820 2013.1.17 yyagi
|
// #24820 2013.1.17 yyagi
|
||||||
this.iSystemASIODevice = new CItemList(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_ASIOPLAYBACK"), CItemList.EPanelType.Normal, OpenTaiko.ConfigIni.nASIODevice,
|
this.iSystemASIODevice = new CItemList(CLangManager.LangInstance.GetString("SETTINGS_SYSTEM_ASIOPLAYBACK"), CItemList.EPanelType.Normal, OpenTaiko.ConfigIni.nASIODevice,
|
||||||
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脱出時にこの値から変更されているようなら
|
||||||
this.iSystemWASAPIBufferSizeMs_initial = this.iSystemWASAPIBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら
|
if (OperatingSystem.IsWindows()) {
|
||||||
this.iSystemASIODevice_initial = this.iSystemASIODevice.n現在選択されている項目番号;
|
this.iSystemSoundType_initial = this.iSystemSoundType.n現在選択されている項目番号; // CONFIGに入ったときの値を保持しておく
|
||||||
|
this.iSystemWASAPIBufferSizeMs_initial = this.iSystemWASAPIBufferSizeMs.n現在の値; // CONFIG脱出時にこの値から変更されているようなら
|
||||||
|
this.iSystemASIODevice_initial = this.iSystemASIODevice.n現在選択されている項目番号;
|
||||||
|
}
|
||||||
this.iSystemSoundTimerType_initial = this.iSystemSoundTimerType.GetIndex();
|
this.iSystemSoundTimerType_initial = this.iSystemSoundTimerType.GetIndex();
|
||||||
base.Activate();
|
base.Activate();
|
||||||
}
|
}
|
||||||
@ -1048,37 +1052,50 @@ 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 (this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 ||
|
if (OperatingSystem.IsWindows()) {
|
||||||
|
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現在の値 ||
|
||||||
this.iSystemASIODevice_initial != this.iSystemASIODevice.n現在選択されている項目番号 ||
|
this.iSystemASIODevice_initial != this.iSystemASIODevice.n現在選択されている項目番号 ||
|
||||||
this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex()) {
|
this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex()) {
|
||||||
ESoundDeviceType soundDeviceType;
|
ESoundDeviceType soundDeviceType;
|
||||||
switch (this.iSystemSoundType.n現在選択されている項目番号) {
|
switch (this.iSystemSoundType.n現在選択されている項目番号) {
|
||||||
case 0:
|
case 0:
|
||||||
soundDeviceType = ESoundDeviceType.Bass;
|
soundDeviceType = ESoundDeviceType.Bass;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
soundDeviceType = ESoundDeviceType.ASIO;
|
soundDeviceType = ESoundDeviceType.ASIO;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
soundDeviceType = ESoundDeviceType.ExclusiveWASAPI;
|
soundDeviceType = ESoundDeviceType.ExclusiveWASAPI;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
soundDeviceType = ESoundDeviceType.SharedWASAPI;
|
soundDeviceType = ESoundDeviceType.SharedWASAPI;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
soundDeviceType = ESoundDeviceType.Unknown;
|
soundDeviceType = ESoundDeviceType.Unknown;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
OpenTaiko.SoundManager.tInitialize(soundDeviceType,
|
||||||
|
this.iSystemBassBufferSizeMs.n現在の値,
|
||||||
|
this.iSystemWASAPIBufferSizeMs.n現在の値,
|
||||||
|
0,
|
||||||
|
this.iSystemASIODevice.n現在選択されている項目番号,
|
||||||
|
this.iSystemSoundTimerType.bON);
|
||||||
|
OpenTaiko.app.ShowWindowTitle();
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
OpenTaiko.SoundManager.tInitialize(soundDeviceType,
|
|
||||||
this.iSystemBassBufferSizeMs.n現在の値,
|
|
||||||
this.iSystemWASAPIBufferSizeMs.n現在の値,
|
|
||||||
0,
|
|
||||||
this.iSystemASIODevice.n現在選択されている項目番号,
|
|
||||||
this.iSystemSoundTimerType.bON);
|
|
||||||
OpenTaiko.app.ShowWindowTitle();
|
|
||||||
OpenTaiko.Skin.ReloadSkin();// 音声の再読み込みをすることによって、音量の初期化を防ぐ
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region [ サウンドのタイムストレッチモード変更 ]
|
#region [ サウンドのタイムストレッチモード変更 ]
|
||||||
@ -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
|
||||||
OpenTaiko.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値; // #24820 2013.1.15 yyagi
|
if (OperatingSystem.IsWindows()) {
|
||||||
// CDTXMania.ConfigIni.nASIOBufferSizeMs = this.iSystemASIOBufferSizeMs.n現在の値; // #24820 2013.1.3 yyagi
|
OpenTaiko.ConfigIni.nSoundDeviceType = this.iSystemSoundType.n現在選択されている項目番号; // #24820 2013.1.3 yyagi
|
||||||
OpenTaiko.ConfigIni.nASIODevice = this.iSystemASIODevice.n現在選択されている項目番号; // #24820 2013.1.17 yyagi
|
OpenTaiko.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値; // #24820 2013.1.15 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user