Skip to content

Commit

Permalink
Android: Don't allow INI editing for DOL/ELF files
Browse files Browse the repository at this point in the history
  • Loading branch information
JosJuice committed Jun 6, 2018
1 parent 1c027bc commit f0f8ca2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ public boolean onLongClick(View view)
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ public boolean onLongClick(View view)
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() {
Expand Down

0 comments on commit f0f8ca2

Please sign in to comment.