SDL: fixed a crash in SDL2 Java code
This commit is contained in:
@@ -204,6 +204,15 @@ public class Settings
|
|||||||
|
|
||||||
static boolean LoadConfig( final MainActivity p )
|
static boolean LoadConfig( final MainActivity p )
|
||||||
{
|
{
|
||||||
|
Globals.OptionalDataDownload = new boolean[Globals.DataDownloadUrl.length];
|
||||||
|
for( int i = 0; i < Globals.DataDownloadUrl.length; i++ )
|
||||||
|
{
|
||||||
|
if( Globals.DataDownloadUrl[i].indexOf("!") == 0 )
|
||||||
|
{
|
||||||
|
Globals.OptionalDataDownload[i] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ObjectInputStream settingsFile = new ObjectInputStream(new FileInputStream( p.getFilesDir().getAbsolutePath() + "/" + SettingsFileName ));
|
ObjectInputStream settingsFile = new ObjectInputStream(new FileInputStream( p.getFilesDir().getAbsolutePath() + "/" + SettingsFileName ));
|
||||||
if( settingsFile.readInt() != SETTINGS_FILE_VERSION )
|
if( settingsFile.readInt() != SETTINGS_FILE_VERSION )
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ public class MainActivity extends org.libsdl.app.SDLActivity {
|
|||||||
if (ret.size() >= 1) {
|
if (ret.size() >= 1) {
|
||||||
ret.remove(0);
|
ret.remove(0);
|
||||||
}
|
}
|
||||||
|
Log.i("SDL", "Commandline arguments: '" + String.join("', '", ret) + "'");
|
||||||
return ret.toArray(new String[0]);
|
return ret.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user