| 450 |
st.plugin.OnManagedリソースの作成(); |
st.plugin.OnManagedリソースの作成(); |
| 451 |
Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ ); |
Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ ); |
| 452 |
} |
} |
| 453 |
} |
#if GPUFlushAfterPresent |
| 454 |
protected override void LoadContent() |
FrameEnd += dtxmania_FrameEnd; |
| 455 |
|
#endif |
| 456 |
|
} |
| 457 |
|
#if GPUFlushAfterPresent |
| 458 |
|
void dtxmania_FrameEnd( object sender, EventArgs e ) // GraphicsDeviceManager.game_FrameEnd()後に実行される |
| 459 |
|
{ // → Present()直後にGPUをFlushする |
| 460 |
|
// → 画面のカクツキが頻発したため、ここでのFlushは行わない |
| 461 |
|
actFlushGPU.On進行描画(); // Flush GPU |
| 462 |
|
} |
| 463 |
|
#endif |
| 464 |
|
protected override void LoadContent() |
| 465 |
{ |
{ |
| 466 |
if ( ConfigIni.bウィンドウモード ) |
if ( ConfigIni.bウィンドウモード ) |
| 467 |
{ |
{ |
| 588 |
if (this.bApplicationActive) // DTXMania本体起動中の本体/モニタの省電力モード移行を抑止 |
if (this.bApplicationActive) // DTXMania本体起動中の本体/モニタの省電力モード移行を抑止 |
| 589 |
CPowerManagement.tDisableMonitorSuspend(); |
CPowerManagement.tDisableMonitorSuspend(); |
| 590 |
|
|
| 591 |
|
// #xxxxx 2013.4.8 yyagi; sleepの挿入位置を、EndScnene~Present間から、BeginScene前に移動。描画遅延を小さくするため。 |
| 592 |
|
#region [ スリープ ] |
| 593 |
|
if ( ConfigIni.nフレーム毎スリープms >= 0 ) // #xxxxx 2011.11.27 yyagi |
| 594 |
|
{ |
| 595 |
|
Thread.Sleep( ConfigIni.nフレーム毎スリープms ); |
| 596 |
|
} |
| 597 |
|
#endregion |
| 598 |
|
|
| 599 |
this.Device.BeginScene(); |
this.Device.BeginScene(); |
| 600 |
this.Device.Clear(ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0); |
this.Device.Clear(ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0); |
| 601 |
|
|
| 1439 |
this.txCredit.t2D描画(this.Device, (1280 - this.txCredit.sz画像サイズ.Width) - 20, 700); |
this.txCredit.t2D描画(this.Device, (1280 - this.txCredit.sz画像サイズ.Width) - 20, 700); |
| 1440 |
} |
} |
| 1441 |
} |
} |
| 1442 |
this.Device.EndScene(); |
this.Device.EndScene(); // Present()は game.csのOnFrameEnd()に登録された、GraphicsDeviceManager.game_FrameEnd() 内で実行されるので不要 |
| 1443 |
//actFlushGPU.On進行描画(); // Flush GPU |
// (つまり、Present()は、Draw()完了後に実行される) |
| 1444 |
|
#if !GPUFlushAfterPresent |
| 1445 |
|
actFlushGPU.On進行描画(); // Flush GPU // EndScene()~Present()間 (つまりVSync前) でFlush実行 |
| 1446 |
|
#endif |
| 1447 |
#region [ 全画面・ウインドウ切り替え ] |
#region [ 全画面・ウインドウ切り替え ] |
| 1448 |
if ( this.b次のタイミングで全画面・ウィンドウ切り替えを行う ) |
if ( this.b次のタイミングで全画面・ウィンドウ切り替えを行う ) |
| 1449 |
{ |
{ |
| 1468 |
} |
} |
| 1469 |
} |
} |
| 1470 |
#endregion |
#endregion |
|
#region [ スリープ ] |
|
|
if ( ConfigIni.nフレーム毎スリープms >= 0 ) // #xxxxx 2011.11.27 yyagi |
|
|
{ |
|
|
Thread.Sleep( ConfigIni.nフレーム毎スリープms ); |
|
|
} |
|
|
#endregion |
|
| 1471 |
} |
} |
| 1472 |
|
|
| 1473 |
|
|
| 1722 |
#endregion |
#endregion |
| 1723 |
#region [ Direct3D9 デバイスの生成 ] |
#region [ Direct3D9 デバイスの生成 ] |
| 1724 |
//--------------------- |
//--------------------- |
|
//2013.03.09.kairera0467 |
|
|
//おそらくこれがSSTでいう「tDirect3Dデバイスを生成・変更・リセットする」へ渡す設定に相当しているのだと思われ。 |
|
| 1725 |
DeviceSettings settings = new DeviceSettings(); |
DeviceSettings settings = new DeviceSettings(); |
| 1726 |
#if WindowedFullscreen |
#if WindowedFullscreen |
| 1727 |
settings.Windowed = true; // #30666 2013.2.2 yyagi: Fullscreenmode is "Maximized window" mode |
settings.Windowed = true; // #30666 2013.2.2 yyagi: Fullscreenmode is "Maximized window" mode |