Android: Fix the logic for getting the Riivolution path

There is a Load path setting, so the Load part can't just be hardcoded.
This commit is contained in:
JosJuice 2022-02-09 21:42:45 +01:00
parent b4c7f2b1e8
commit 5dd07f73d4
1 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import androidx.recyclerview.widget.RecyclerView;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.activities.EmulationActivity;
import org.dolphinemu.dolphinemu.features.riivolution.model.RiivolutionPatches;
import org.dolphinemu.dolphinemu.features.settings.model.StringSetting;
import org.dolphinemu.dolphinemu.utils.DirectoryInitialization;
public class RiivolutionBootActivity extends AppCompatActivity
@ -51,9 +52,12 @@ public class RiivolutionBootActivity extends AppCompatActivity
int revision = intent.getIntExtra(ARG_REVISION, -1);
int discNumber = intent.getIntExtra(ARG_DISC_NUMBER, -1);
String loadPath = StringSetting.MAIN_LOAD_PATH.getStringGlobal();
if (loadPath.isEmpty())
loadPath = DirectoryInitialization.getUserDirectory() + "/Load";
TextView textSdRoot = findViewById(R.id.text_sd_root);
String riivolutionPath = DirectoryInitialization.getUserDirectory() + "/Load/Riivolution";
textSdRoot.setText(getString(R.string.riivolution_sd_root, riivolutionPath));
textSdRoot.setText(getString(R.string.riivolution_sd_root, loadPath + "/Riivolution"));
Button buttonStart = findViewById(R.id.button_start);
buttonStart.setOnClickListener((v) ->