{\r
internal class CDTXMania : Game\r
{\r
- // プロパティ\r
+ [DllImport( "kernel32.dll" )]\r
+ extern static ExecutionState SetThreadExecutionState( ExecutionState esFlags );\r
+ [FlagsAttribute]\r
+ public enum ExecutionState : uint\r
+ {\r
+ Null = 0, // 関数が失敗した時の戻り値\r
+ SystemRequired = 1, // スタンバイを抑止\r
+ DisplayRequired = 2, // 画面OFFを抑止\r
+ Continuous = 0x80000000, // 効果を永続させる。ほかオプションと併用する。\r
+ }\r
\r
+ // プロパティ\r
public static readonly string VERSION = "094(120610)";\r
public static readonly string SLIMDXDLL = "c_net20x86_Jun2010";\r
public static readonly string D3DXDLL = "d3dx9_43.dll"; // June 2010\r
}\r
protected override void OnExiting( EventArgs e )\r
{\r
+ SetThreadExecutionState( ExecutionState.Continuous ); // スリープ抑止状態を解除\r
this.t終了処理();\r
base.OnExiting( e );\r
}\r
if( this.Device == null )\r
return;\r
\r
+ if ( this.bApplicationActive ) // DTXMania本体起動中の本体/モニタの省電力モード移行を抑止\r
+ SetThreadExecutionState( ExecutionState.SystemRequired | ExecutionState.DisplayRequired );\r
+\r
this.Device.BeginScene();\r
this.Device.Clear( ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0 );\r
\r