[DataMember(Order = 114)]
public STInstValue<COptionInteger> cdForceScaledMovieH; // #38362 2018.1.8 add yyagi
+ /// <summary>
+ /// 旧AVIを強制的にウインドウ全体に表示するときの、Y座標
+ /// (114で...FullMovieYから...ScalewdMovieYに改名)
+ /// </summary>
+ [DataMember(Order = 115)]
+ public COptionBool bWarnMIDI20USB; // #37961 2019.1.21 add yyagi
+
public int GetLaneX(ELane e)
{
bLoadDTXDetail = new COptionBool( false );
bShowSongPath = new COptionBool( false );
+ bWarnMIDI20USB = new COptionBool(true);
+
// string
strSongDataPath = new COptionString(@".\");
strFontSongSelect = new COptionString("MS PGothic");
{
bool bUseMIDIIn = !DTXVmode.Enabled;
Input管理 = new CInput管理(base.Window.Handle, bUseMIDIIn);
+
+ // If the users uses MIDI2.0-USB cable, then warn it
+ if (bUseMIDIIn && CDTXMania.Instance.ConfigIni.bWarnMIDI20USB.Value)
+ {
+ foreach (IInputDevice device in Input管理.list入力デバイス)
+ {
+ if ((device.e入力デバイス種別 == E入力デバイス種別.MidiIn) && (device.strDeviceName == "USB2.0-MIDI"))
+ {
+ string strWarnMes = CDTXMania.Instance.Resources.Explanation("strWarnMIDI20USB");
+ var ret = MessageBox.Show(strWarnMes, "DTXMania Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
+ if (ret == DialogResult.OK)
+ {
+ CDTXMania.Instance.ConfigIni.bWarnMIDI20USB.Value = false;
+ }
+ }
+ }
+ }
+
+
+
foreach (IInputDevice device in Input管理.list入力デバイス)
{
if ((device.e入力デバイス種別 == E入力デバイス種別.Joystick) && !ConfigIni.dicJoystick.Value.ContainsValue(device.GUID))
this.devJoystick.SetCooperativeLevel( hWnd, CooperativeLevel.Foreground | CooperativeLevel.Exclusive );
this.devJoystick.Properties.BufferSize = 32;
Trace.TraceInformation( this.devJoystick.Information.InstanceName + "を生成しました。" );
+ this.strDeviceName = this.devJoystick.Information.InstanceName;
}
catch
{
get;
private set;
}
+ public string strDeviceName
+ {
+ get;
+ set;
+ }
public void tポーリング( bool bWindowがアクティブ中, bool bバッファ入力を使用する )
{
this.devKeyboard.SetCooperativeLevel( hWnd, CooperativeLevel.NoWinKey | CooperativeLevel.Foreground | CooperativeLevel.NonExclusive );
this.devKeyboard.Properties.BufferSize = 32;
Trace.TraceInformation( this.devKeyboard.Information.ProductName.Trim(new char[] { '\0' } ) + " を生成しました。" ); // なぜか0x00のゴミが出るので削除
+ this.strDeviceName = this.devKeyboard.Information.ProductName.Trim(new char[] { '\0' });
}
catch
{
public string GUID { get; private set; }
public int ID { get; private set; }
public List<STInputEvent> list入力イベント { get; private set; }
+ public string strDeviceName { get; set; }
public void tポーリング( bool bWindowがアクティブ中, bool bバッファ入力を使用する )
{
public uint hMidiIn;
public List<STInputEvent> listEventBuffer;
-
// コンストラクタ
public CInputMIDI( uint nID )
this.e入力デバイス種別 = E入力デバイス種別.MidiIn;
this.GUID = "";
this.ID = (int) nID;
+ this.strDeviceName = ""; // CInput管理で初期化する
}
public string GUID { get; private set; }
public int ID { get; private set; }
public List<STInputEvent> list入力イベント { get; private set; }
+ public string strDeviceName { get; set; }
public void tポーリング( bool bWindowがアクティブ中, bool bバッファ入力を使用する )
{
// コンストラクタ
- public CInputMouse( IntPtr hWnd, DirectInput directInput )
+ public CInputMouse(IntPtr hWnd, DirectInput directInput)
{
this.e入力デバイス種別 = E入力デバイス種別.Mouse;
this.GUID = "";
this.ID = 0;
try
{
- this.devMouse = new Mouse( directInput );
- this.devMouse.SetCooperativeLevel( hWnd, CooperativeLevel.Foreground | CooperativeLevel.NonExclusive );
+ this.devMouse = new Mouse(directInput);
+ this.devMouse.SetCooperativeLevel(hWnd, CooperativeLevel.Foreground | CooperativeLevel.NonExclusive);
this.devMouse.Properties.BufferSize = 0x20;
- Trace.TraceInformation( this.devMouse.Information.ProductName.Trim(new char[] { '\0' }) + " を生成しました。" ); // なぜか0x00のゴミが出るので削除
+ Trace.TraceInformation(this.devMouse.Information.ProductName.Trim(new char[] { '\0' }) + " を生成しました。"); // なぜか0x00のゴミが出るので削除
+ this.strDeviceName = this.devMouse.Information.ProductName.Trim(new char[] { '\0' });
}
catch
{
- if( this.devMouse != null )
+ if (this.devMouse != null)
{
this.devMouse.Dispose();
this.devMouse = null;
}
- Trace.TraceWarning( "Mouse デバイスの生成に失敗しました。" );
+ Trace.TraceWarning("Mouse デバイスの生成に失敗しました。");
throw;
}
try
{
}
- for( int i = 0; i < this.bMouseState.Length; i++ )
- this.bMouseState[ i ] = false;
+ for (int i = 0; i < this.bMouseState.Length; i++)
+ this.bMouseState[i] = false;
//this.timer = new CTimer( CTimer.E種別.MultiMedia );
- this.list入力イベント = new List<STInputEvent>( 32 );
+ this.list入力イベント = new List<STInputEvent>(32);
}
public string GUID { get; private set; }
public int ID { get; private set; }
public List<STInputEvent> list入力イベント { get; private set; }
+ public string strDeviceName {get; set; }
public void tポーリング( bool bWindowがアクティブ中, bool bバッファ入力を使用する )
{
for ( uint i = 0; i < nMidiDevices; i++ )
{
CInputMIDI item = new CInputMIDI( i );
- this.list入力デバイス.Add( item );
CWin32.MIDIINCAPS lpMidiInCaps = new CWin32.MIDIINCAPS();
uint num3 = CWin32.midiInGetDevCaps( i, ref lpMidiInCaps, (uint) Marshal.SizeOf( lpMidiInCaps ) );
if ( num3 != 0 )
{
Trace.TraceError( "MIDI In: [{0}] \"{1}\" の入力受付の開始に失敗しました。", i, lpMidiInCaps.szPname );
}
+ item.strDeviceName = lpMidiInCaps.szPname;
+ this.list入力デバイス.Add(item);
}
}
else
{
get;
}
-
+ string strDeviceName
+ {
+ get;
+ }
// メソッドインターフェース