mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fix crash in buffer corruption workaround
This commit is contained in:
parent
1ff560a18b
commit
05267a7100
1 changed files with 12 additions and 3 deletions
|
@ -37,7 +37,9 @@ import org.qtproject.qt5.android.QtSurface;
|
|||
import org.qtproject.qt5.android.bindings.QtActivity;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import io.highfidelity.hifiinterface.fragment.WebViewFragment;
|
||||
|
||||
|
@ -202,9 +204,16 @@ public class InterfaceActivity extends QtActivity implements WebViewFragment.OnW
|
|||
FrameLayout fl = findViewById(android.R.id.content);
|
||||
if (fl.getChildCount() > 0) {
|
||||
QtLayout qtLayout = (QtLayout) fl.getChildAt(0);
|
||||
if (qtLayout.getChildCount() > 1) {
|
||||
QtSurface s1 = (QtSurface) qtLayout.getChildAt(0);
|
||||
QtSurface s2 = (QtSurface) qtLayout.getChildAt(1);
|
||||
List<QtSurface> surfaces = new ArrayList<>();
|
||||
for (int i=0; i < qtLayout.getChildCount(); i++) {
|
||||
Object ch = qtLayout.getChildAt(i);
|
||||
if (ch instanceof QtSurface) {
|
||||
surfaces.add((QtSurface) ch);
|
||||
}
|
||||
}
|
||||
if (surfaces.size() > 1) {
|
||||
QtSurface s1 = surfaces.get(0);
|
||||
QtSurface s2 = surfaces.get(1);
|
||||
Integer subLayer1 = 0;
|
||||
Integer subLayer2 = 0;
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue