mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Fix] (MG_Backend/DirectGLES): patches for Photon (cont.)
This commit is contained in:
@@ -893,17 +893,19 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
String findStr = "if (distance_weight_sum == 0.0)";
|
||||
String replaceStr = "if (distance_weight_sum <= 0.0001)";
|
||||
auto pos = source.find(findStr);
|
||||
if (pos != String::npos) {
|
||||
while (pos != String::npos) {
|
||||
MGLOG_D("Applying patch #1 to Photon...");
|
||||
source.replace(pos, findStr.length(), replaceStr);
|
||||
pos = source.find(findStr, pos);
|
||||
}
|
||||
|
||||
findStr = "1000000.0";
|
||||
replaceStr = "65500.0";
|
||||
pos = source.find(findStr);
|
||||
if (pos != String::npos) {
|
||||
while (pos != String::npos) {
|
||||
MGLOG_D("Applying patch #2 to Photon...");
|
||||
source.replace(pos, findStr.length(), replaceStr);
|
||||
pos = source.find(findStr, pos);
|
||||
}
|
||||
|
||||
const char* sourceCStr = source.c_str();
|
||||
|
||||
Reference in New Issue
Block a user