Skip to content

Commit 614c467

Browse files
committed
Allowed to launch the game without Nvidia and AMD graphic adapter (there's Intel, you know)
Removed constant double GPU rendering GetATIGpuNum() will return 0 if initialization failed
1 parent b5b2b75 commit 614c467

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/Layers/xrRender/HWCaps.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ u32 GetNVGpuNum()
6161
}
6262

6363
if (iGpuNum > 1)
64-
{
6564
Msg("* NVidia MGPU: %d-Way SLI detected.", iGpuNum);
66-
}
6765

6866
return iGpuNum;
6967
}
@@ -75,8 +73,8 @@ u32 GetATIGpuNum()
7573
AGSReturnCode status = agsInit(&ags, &gpuInfo);
7674
if (status != AGS_SUCCESS)
7775
{
78-
Msg("! AGS: Initialization failed (%d)", status);
79-
return 1;
76+
Msg("* AGS: Initialization failed (%d)", status);
77+
return 0;
8078
}
8179
int crossfireGpuCount = 1;
8280
status = agsGetCrossfireGPUCount(ags, &crossfireGpuCount);
@@ -94,16 +92,14 @@ u32 GetATIGpuNum()
9492
u32 GetGpuNum()
9593
{
9694
u32 res = GetNVGpuNum();
97-
9895
res = _max(res, GetATIGpuNum());
99-
100-
res = _max(res, 2);
101-
10296
res = _min(res, CHWCaps::MAX_GPUS);
10397

104-
// It's vital to have at least one GPU, else
105-
// code will fail.
106-
VERIFY(res > 0);
98+
if (res == 0)
99+
{
100+
Log("! Cannot find graphic adapter. Assuming that you have one...");
101+
res = 1;
102+
}
107103

108104
Msg("* Starting rendering as %d-GPU.", res);
109105

0 commit comments

Comments
 (0)