Skip to content

Commit d8d2ede

Browse files
committed
[Fix] (Getter): Improve the detection methods for ANGLE.
1 parent 42c78fa commit d8d2ede

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/cpp/gl/getter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ std::string getGpuName() {
155155
}
156156

157157
// MetalANGLE, ANGLE (Metal Renderer: Apple * GPU)
158-
if (gpuName.find("Metal Renderer") != std::string::npos) {
158+
if (gpuName.find("MetalANGLE, ANGLE") != std::string::npos) {
159159
if (gpuName.length() < 25) {
160160
return gpuName;
161161
}
@@ -166,7 +166,7 @@ std::string getGpuName() {
166166
}
167167

168168
// Vulkan ANGLE
169-
if (gpuName.rfind("ANGLE", 0) == 0) {
169+
if (gpuName.rfind("ANGLE", 0) == 0 && gpuName.find("Vulkan") != std::string::npos) {
170170
size_t firstParen = gpuName.find('(');
171171
size_t secondParen = gpuName.find('(', firstParen + 1);
172172
size_t lastParen = gpuName.rfind('(');

0 commit comments

Comments
 (0)