Jump to content

Resolution Bug for Some Laptops - NO_APPROPRIATE_DEVICE


Exygo

Recommended Posts

  • Bronze

I found this bug at a player on my server and I managed to do some tests in his computer to find the problem.

 

He couldn't open the client because of an error NO_APPROPRIATE_DEVICE

binary/source/EterLib/GrpDevice.cpp

int CGraphicDevice::Create(HWND hWnd, int iHres, int iVres, bool Windowed, int /*iBit*/, int iReflashRate)
{
	int iRet = CREATE_OK;

	Destroy();

	ms_iWidth	= iHres;
	ms_iHeight	= iVres;

	ms_hWnd		= hWnd;
	ms_hDC		= GetDC(hWnd);
	ms_lpd3d	= Direct3DCreate8(D3D_SDK_VERSION);

	if (!ms_lpd3d)
	{
		TraceError("Start error: CREATE_NO_DIRECTX");
		return CREATE_NO_DIRECTX;
	}

	if (!ms_kD3DDetector.Build(*ms_lpd3d, EL3D_ConfirmDevice))
	{
		TraceError("Start error: CREATE_ENUM");
		return CREATE_ENUM;
	}

	// exygo 27 iulie 2017 fix laptop
	//if (!ms_kD3DDetector.Find(800, 600, 32, TRUE, &ms_iD3DModeInfo, &ms_iD3DDevInfo, &ms_iD3DAdapterInfo))
	//	return CREATE_DETECT;

	std::string stDevList;
	ms_kD3DDetector.GetString(&stDevList);
  
  [...]

 

If you have a better solution please share it with the community.

Note: The player had a laptop with 1360x768 resolution and this was his minimum resolution (he didn't even have 800x600)

  • Love 7
Link to comment
Share on other sites

  • 1 year later...
  • Bronze

binary/source/EterLib/GrpDevice.cpp

 

int CGraphicDevice::Create(HWND hWnd, int iHres, int iVres, bool Windowed, int /*iBit*/, int iReflashRate)
{
	int iRet = CREATE_OK;

	Destroy();

	ms_iWidth	= iHres;
	ms_iHeight	= iVres;

	ms_hWnd		= hWnd;
	ms_hDC		= GetDC(hWnd);
	ms_lpd3d	= Direct3DCreate8(D3D_SDK_VERSION);

	if (!ms_lpd3d)
	{
		TraceError("Start error: CREATE_NO_DIRECTX");
		return CREATE_NO_DIRECTX;
	}

	if (!ms_kD3DDetector.Build(*ms_lpd3d, EL3D_ConfirmDevice))
	{
		TraceError("Start error: CREATE_ENUM");
		return CREATE_ENUM;
	}

	// exygo 27 iulie 2017 fix laptop
	//if (!ms_kD3DDetector.Find(800, 600, 32, TRUE, &ms_iD3DModeInfo, &ms_iD3DDevInfo, &ms_iD3DAdapterInfo))
	//	return CREATE_DETECT;

	std::string stDevList;
	ms_kD3DDetector.GetString(&stDevList);
  
  [...]

 

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.