Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[DX8] Fullscreen to DX8 Had Trouble Init


WiseRock
 Share

Recommended Posts

Hello All,

I was using an advanced version of Prospekt Source when I tabbed out of the game in fullscreen and it gave me an error that states _"DirectX8 had trouble initiating. Please make sure your graphics card can support DirectX8 and/or is installed."_
The game runs well just that doesn't work. This is the Line i edited to make fullscreen.

```

Private Function InitD3DDevice(D3DCREATEFLAGS As CONST_D3DCREATEFLAGS) As Boolean
On Error GoTo ERRORMSG

D3D8.GetAdapterDisplayMode D3DADAPTER_DEFAULT, DispMode

ScreenWidth = InternalWidth
ScreenHeight = InternalHeight

DispMode.Format = D3DFMT_X8R8G8B8
D3DWindow.SwapEffect = D3DSWAPEFFECT_COPY
DispMode.Width = ScreenWidth
DispMode.Height = ScreenHeight
D3DWindow.BackBufferCount = 1
D3DWindow.BackBufferFormat = DispMode.Format
D3DWindow.BackBufferWidth = ScreenWidth
D3DWindow.BackBufferHeight = ScreenHeight
D3DWindow.hDeviceWindow = frmMain.hwnd
D3DWindow.Windowed = False - THIS IS THE LINE I made to work fullscreen.

If Not D3DDevice8 Is Nothing Then Set D3DDevice8 = Nothing
Set D3DDevice8 = D3D8.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.hwnd, D3DCREATEFLAGS, D3DWindow)
InitD3DDevice = True
Exit Function

ERRORMSG:
Set D3DDevice8 = Nothing
InitD3DDevice = False
End Function
```
Link to comment
Share on other sites

That's because nobody here has figured out how to properly handle losing focus on a device yet. Although, the guys over at Nin seem to have it fixed.

Anyhow, the same thing should happen if you manage to get a UAC warning or hit Control Alt Delete while a game is up. It's just something we've never solved.
Link to comment
Share on other sites

disabling the keys will just make things weird, you need the Tab key to use the char creation and every other rendered text box in prospekt as it has no mouse input. If i was playing a game and my tab key did not work i'd be puzzled why and is not really fixing it. Obviously the full screen is messing something up as ctrl alt and del should re-create the error and some people have managed to "fix" or bodge it. If CTRL, ALT and DEL do not cause the error then look further.
Link to comment
Share on other sites

> That's because nobody here has figured out how to properly handle losing focus on a device yet. Although, the guys over at Nin seem to have it fixed.
>
>  
>
> Anyhow, the same thing should happen if you manage to get a UAC warning or hit Control Alt Delete while a game is up. It's just something we've never solved.

It's clearly stated in the DIrectX8 SDK. What you do is check for focus lost and if so reinitialize DirectX.

@OP I believe changing a single Display.Windowed to false won't solve this. Check [this](http://directx4vb.vbgamer.com/DirectX4VB/TUT_DX8_DG.asp) out!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...