mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-03-06 14:27:44 +00:00
Android: Fix a possible crash when main recreates
This commit is contained in:
parent
1a63edec27
commit
3bc34d40a1
android/app/src/main/java/com/github/stenzek/duckstation
|
@ -41,6 +41,10 @@ public class AndroidHostInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setContext(Context context) {
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
static public native String getScmVersion();
|
static public native String getScmVersion();
|
||||||
|
|
||||||
static public native String getFullScmVersion();
|
static public native String getFullScmVersion();
|
||||||
|
|
|
@ -175,6 +175,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
throw new RuntimeException("Failed to create host interface");
|
throw new RuntimeException("Failed to create host interface");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AndroidHostInterface.getInstance().setContext(this);
|
||||||
mGameList.refresh(false, false, this);
|
mGameList.refresh(false, false, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue