summaryrefslogtreecommitdiff
path: root/Source/Android/src/org
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-08-23 09:43:55 -0400
committerLioncash <mathew1800@gmail.com>2013-08-23 09:50:00 -0400
commit654b0dbfa813e913fa56f8125cd3a79806c8b11d (patch)
treef4672e9d5c758875321c742b9cd6da95eab78f61 /Source/Android/src/org
parent23ff31451fdbff600e02b7279f9e54061cfad9d7 (diff)
[Android] Fix the removal of duplicate items from the gamelist.
This should have initially been a nested loop since it now guarantees every item in the list is checked. Also, removed some unused code and documented some things.
Diffstat (limited to 'Source/Android/src/org')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java3
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java13
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java9
3 files changed, 9 insertions, 16 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java b/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java
index b708b756b5..a616df609a 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java
@@ -128,6 +128,8 @@ public final class DolphinEmulator<MainActivity> extends Activity
CopyAsset("setting-usa.txt", WiiDir + File.separator + "setting-usa.txt");
}
+ // Load the configuration keys set in the Dolphin ini and gfx ini files
+ // into the application's shared preferences.
UserPreferences.LoadDolphinConfigToPrefs(this);
}
}
@@ -148,7 +150,6 @@ public final class DolphinEmulator<MainActivity> extends Activity
String FileName = data.getStringExtra("Select");
GLview = new NativeGLSurfaceView(this);
this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- String backend = NativeLibrary.GetConfig("Dolphin.ini", "Core", "GFXBackend", "Software Renderer");
NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
NativeLibrary.SetFilename(FileName);
setContentView(GLview);
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
index 92a360ca25..26e170c6e0 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
@@ -132,17 +132,8 @@ public final class FolderBrowser extends Fragment
{
super.onAttach(activity);
- // This makes sure that the container activity has implemented
- // the callback interface. If not, it throws an exception
- try
- {
- m_activity = activity;
- }
- catch (ClassCastException e)
- {
- throw new ClassCastException(activity.toString()
- + " must implement OnGameListZeroListener");
- }
+ // Cache the activity instance.
+ m_activity = activity;
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
index d77741016b..5b42fe73c9 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
@@ -95,11 +95,12 @@ public final class GameListFragment extends Fragment
// so there should be no worries about accidentally removing a valid game.
for (int i = 0; i < fls.size(); i++)
{
- int indexNext = i+1;
-
- if (indexNext < fls.size() && fls.get(indexNext).getPath().contains(fls.get(i).getPath()))
+ for (int j = i+1; j < fls.size(); j++)
{
- fls.remove(indexNext);
+ if (fls.get(j).getPath().equals(fls.get(i).getPath()))
+ {
+ fls.remove(j);
+ }
}
}