Android: Don't allow INI editing for DOL/ELF files

This commit is contained in:
JosJuice 2018-06-05 15:09:29 +02:00
parent 1c027bc148
commit f0f8ca2172
2 changed files with 12 additions and 0 deletions

View File

@ -139,6 +139,12 @@ public final class GameAdapter extends RecyclerView.Adapter<GameViewHolder> impl
GameViewHolder holder = (GameViewHolder) view.getTag();
String gameId = holder.gameFile.getGameId();
if (gameId.isEmpty())
{
// We can't make a game-specific INI file if there is no game ID
return true;
}
FragmentActivity activity = (FragmentActivity) view.getContext();
AlertDialog.Builder builder = new AlertDialog.Builder(activity);

View File

@ -87,6 +87,12 @@ public final class GameRowPresenter extends Presenter
FragmentActivity activity = (FragmentActivity) view.getContext();
String gameId = gameFile.getGameId();
if (gameId.isEmpty())
{
// We can't make a game-specific INI file if there is no game ID
return true;
}
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Game Settings")
.setItems(R.array.gameSettingsMenus, new DialogInterface.OnClickListener() {