Skip to main content
gamedev.net
🔒 Locked

d3d device reset problem

Started by radiationz 0 replies 2k views
Original Post
radiationz
radiationz
I am using c# with direct3d. I am trying to reset my device, this pops at Application.DoEvents(); and i dont know how to deal with it. Any help will be appreciated, thnx. Error in the application. -2005530520 (D3DERR_DEVICELOST) at Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[] presentationParameters) at Microsoft.DirectX.Direct3D.Device.OnParentResized(Object sender, EventArgs e) at System.Windows.Forms.Control.OnResize(EventArgs e) at System.Windows.Forms.Form.OnResize(EventArgs e) at System.Windows.Forms.Control.OnSizeChanged(EventArgs e) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) at System.Windows.Forms.Control.UpdateBounds() at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Evil Steve
Evil Steve
What does your call to Reset() and the surrounding code look like?
You can't reset the device when it's lost. you need to wait for D3DERR_DEVICENOTRESET. You can call TestCooperativeLevel() every frame to find out when the device can be reset.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.