mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -04:00
(Android 6+) Default control json now will be saved after user grant storage permission
This commit is contained in:
parent
21eb5c0aa5
commit
a871fb1e48
@ -37,10 +37,6 @@ public class PojavApplication extends Application
|
||||
specialButtons[2].name = getString(R.string.control_primary);
|
||||
specialButtons[3].name = getString(R.string.control_secondary);
|
||||
specialButtons[4].name = getString(R.string.control_mouse);
|
||||
|
||||
new File(Tools.CTRLMAP_PATH).mkdirs();
|
||||
new CustomControls(this).save(Tools.CTRLDEF_FILE);
|
||||
|
||||
} catch (Throwable th) {
|
||||
Intent ferrorIntent = new Intent(this, FatalErrorActivity.class);
|
||||
ferrorIntent.putExtra("throwable", th);
|
||||
|
@ -22,6 +22,7 @@ import android.system.*;
|
||||
import android.net.*;
|
||||
import static android.view.ViewGroup.LayoutParams.*;
|
||||
import net.kdt.pojavlaunch.update.*;
|
||||
import net.kdt.pojavlaunch.value.customcontrols.*;
|
||||
|
||||
public class PojavLoginActivity extends MineActivity
|
||||
{
|
||||
@ -304,10 +305,13 @@ public class PojavLoginActivity extends MineActivity
|
||||
try {
|
||||
file3.createNewFile();
|
||||
} catch (IOException e){}
|
||||
|
||||
|
||||
try {
|
||||
mkdirs(Tools.MAIN_PATH);
|
||||
|
||||
mkdirs(Tools.CTRLMAP_PATH);
|
||||
new CustomControls(this).save(Tools.CTRLDEF_FILE);
|
||||
|
||||
Tools.copyAssetFile(this, "options.txt", Tools.MAIN_PATH, false);
|
||||
|
||||
// Extract launcher_profiles.json
|
||||
|
Loading…
x
Reference in New Issue
Block a user