メッセージ

2011年12月26日の記事

2011/12/26(Mon)Direct 3D の Device の Reset に失敗する。

はてブ数 2011/12/26 19:49 プログラミング::SlimDX つーさ

ウィンドウモードで起動したアプリはAlt+Enterで何度でも切り替えられるのに、フルスクリーンで起動したアプリをウィンドウモードにしてからフルスクリーンにしようとすると、IDirect3DDevice9::ResetでD3DERR_DEVICELOST が出て復帰できない。

>> スクリーンモードを変更します。
Direct3D9: (ERROR) :Exclusive Mode has been taken by other app or other device on the same adapter. SetCooperativeLevel returns D3DERR_DEVICELOST.
Direct3D9: (ERROR) :SetCooperativeLevel returned failure. CreateDevice/Reset Failed
Direct3D9: (ERROR) :Reset failed and Reset/TestCooperativeLevel/Release are the only legal APIs to be called subsequently
Direct3D9: :Window has been subclassed; cannot restore!
Direct3D9: (ERROR) :Exclusive Mode has been taken by other app or other device on the same adapter. SetCooperativeLevel returns D3DERR_DEVICELOST.

がんばってググった結果は、Direct Inputがウィンドウをサブクラス化してしまうせいだとわかった。
Direct3Dより、DirectInputを先に初期化するだけで、この不具合は直った。

覚えておくといいなのっ