Im-dex / xray-162

XRay engine 1.6.2 (S.T.A.L.K.E.R: Call of Pripyat) evolution
Apache License 2.0
46 stars 11 forks source link

Fix in-game flickering #14

Closed revolucas closed 7 years ago

revolucas commented 7 years ago

Resolves Issue: https://github.com/Im-dex/xray-162/issues/11

See commit: https://github.com/Im-dex/xray-162/pull/14/commits/8e0d9d7ffc369e0785fea03bf206d0c83424164b Fix in-game flickering of screen caused by incorrect GPU count being detected due to u32 GetATIGpuNum() returning -1

Due to this, res = std::max(1, -1); caused res to equal -1 and res = std::min(-1,8) to return 8. I'd sure like to know why, as that is very odd behavior and wonder if there are other cases like this.