summaryrefslogtreecommitdiff
path: root/Source/Android/src/org
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-09-23 00:47:57 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-09-23 00:47:57 -0500
commitbab91494d53f15d804834ba5d11730b0e855ebd8 (patch)
treea86cd67ea34aa3497955dceb501794275e4e7f04 /Source/Android/src/org
parentd84312c799816e8835e6bed562f216bf19725761 (diff)
parent1da6469c62fa1b4fd669a48cb583e161d5cb2713 (diff)
Merge branch 'master' into android-core-control
Diffstat (limited to 'Source/Android/src/org')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java7
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java11
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/EmulationActivity.java34
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/NativeGLSurfaceView.java4
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java2
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java59
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java2
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java11
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java6
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java13
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/settings/PrefsActivity.java8
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java12
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/settings/VideoSettingsFragment.java32
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/sidemenu/SideMenuItem.java10
14 files changed, 106 insertions, 105 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
index a94a22a964..8b29e607d7 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
@@ -7,7 +7,7 @@
package org.dolphinemu.dolphinemu;
import android.app.Activity;
-import android.app.Fragment;
+import android.app.ListFragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
@@ -25,7 +25,7 @@ import org.dolphinemu.dolphinemu.settings.VideoSettingsFragment;
/**
* Represents the about screen.
*/
-public final class AboutFragment extends Fragment
+public final class AboutFragment extends ListFragment
{
private static Activity m_activity;
@@ -44,6 +44,7 @@ public final class AboutFragment extends Fragment
AboutFragmentAdapter adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
mMainList.setAdapter(adapter);
+ mMainList.setEnabled(false); // Makes the list view non-clickable.
return mMainList;
}
@@ -108,7 +109,7 @@ public final class AboutFragment extends Fragment
View v = convertView;
if (v == null)
{
- LayoutInflater vi = (LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ LayoutInflater vi = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(id, parent, false);
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java b/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java
index 6703c5710c..9c27615b14 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java
@@ -58,16 +58,15 @@ public final class DolphinEmulator extends Activity
super.onCreate(savedInstanceState);
if (savedInstanceState == null)
{
- Intent ListIntent = new Intent(this, GameListActivity.class);
- startActivityForResult(ListIntent, 1);
+ Intent GameListIntent = new Intent(this, GameListActivity.class);
+ startActivity(GameListIntent);
String BaseDir = Environment.getExternalStorageDirectory()+File.separator+"dolphin-emu";
String ConfigDir = BaseDir + File.separator + "Config";
String GCDir = BaseDir + File.separator + "GC";
- String WiiDir = BaseDir + File.separator + "Wii";
// Copy assets if needed
- File file = new File(WiiDir + File.separator + "setting-usa.txt");
+ File file = new File(GCDir + File.separator + "font_sjis.bin");
if(!file.exists())
{
NativeLibrary.CreateUserFolders();
@@ -81,10 +80,6 @@ public final class DolphinEmulator extends Activity
CopyAsset("dsp_rom.bin", GCDir + File.separator + "dsp_rom.bin");
CopyAsset("font_ansi.bin", GCDir + File.separator + "font_ansi.bin");
CopyAsset("font_sjis.bin", GCDir + File.separator + "font_sjis.bin");
- CopyAsset("setting-eur.txt", WiiDir + File.separator + "setting-eur.txt");
- CopyAsset("setting-jpn.txt", WiiDir + File.separator + "setting-jpn.txt");
- CopyAsset("setting-kor.txt", WiiDir + File.separator + "setting-kor.txt");
- CopyAsset("setting-usa.txt", WiiDir + File.separator + "setting-usa.txt");
}
// Load the configuration keys set in the Dolphin ini and gfx ini files
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/EmulationActivity.java b/Source/Android/src/org/dolphinemu/dolphinemu/EmulationActivity.java
index f982f9871c..d41d13eee8 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/EmulationActivity.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/EmulationActivity.java
@@ -1,28 +1,23 @@
package org.dolphinemu.dolphinemu;
-import java.util.List;
-
-import org.dolphinemu.dolphinemu.settings.InputConfigFragment;
-
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
+import android.preference.PreferenceManager;
import android.util.DisplayMetrics;
-import android.view.InputDevice;
-import android.view.KeyEvent;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.Window;
-import android.view.WindowManager;
+import android.view.*;
import android.view.WindowManager.LayoutParams;
+import org.dolphinemu.dolphinemu.settings.InputConfigFragment;
+import org.dolphinemu.dolphinemu.settings.VideoSettingsFragment;
+
+import java.util.List;
/**
* This is the activity where all of the emulation handling happens.
@@ -63,7 +58,18 @@ public final class EmulationActivity extends Activity
// and set on the native side of the code so the emulator can actually
// load the game.
Intent gameToEmulate = getIntent();
- NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
+
+ // Due to a bug in Adreno, it renders the screen rotated 90 degrees when using OpenGL
+ // Flip the width and height when on Adreno to work around this.
+ // Mali isn't affected by this bug.
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+ if (prefs.getString("gpuPref", "Software Rendering").equals("OGL")
+ && VideoSettingsFragment.SupportsGLES3()
+ && VideoSettingsFragment.m_GLVendor.equals("Qualcomm"))
+ NativeLibrary.SetDimensions((int)screenHeight, (int)screenWidth);
+ else
+ NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
+
NativeLibrary.SetFilename(gameToEmulate.getStringExtra("SelectedGame"));
Running = true;
@@ -224,7 +230,7 @@ public final class EmulationActivity extends Activity
}
default:
- return super.onOptionsItemSelected( item );
+ return super.onMenuItemSelected(itemId, item);
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/NativeGLSurfaceView.java b/Source/Android/src/org/dolphinemu/dolphinemu/NativeGLSurfaceView.java
index 4551e5b94c..c508b1f810 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/NativeGLSurfaceView.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/NativeGLSurfaceView.java
@@ -51,12 +51,12 @@ public final class NativeGLSurfaceView extends SurfaceView
}
}
- public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3)
+ public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
{
// TODO Auto-generated method stub
}
- public void surfaceDestroyed(SurfaceHolder arg0)
+ public void surfaceDestroyed(SurfaceHolder holder)
{
// TODO Auto-generated method stub
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
index 7dbec2daf7..d52532fb2e 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
@@ -148,7 +148,7 @@ public final class NativeLibrary
}
catch (UnsatisfiedLinkError ex)
{
- Log.w("NativeLibrary", ex.toString());
+ Log.e("NativeLibrary", ex.toString());
}
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
index 890c43f347..e28f30206d 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java
@@ -7,14 +7,13 @@
package org.dolphinemu.dolphinemu.folderbrowser;
import android.app.Activity;
-import android.app.Fragment;
+import android.app.ListFragment;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.AdapterView;
import android.widget.ListView;
import java.io.File;
@@ -33,16 +32,15 @@ import org.dolphinemu.dolphinemu.gamelist.GameListActivity;
* the game list for easy browsing the next time the
* application is used.
* <p>
- * Note that invalid items will be shown in the color red. <br/>
- * Also note that this file browser does not display files
+ * Note that this file browser does not display files
* or directories that are hidden
*/
-public final class FolderBrowser extends Fragment
+public final class FolderBrowser extends ListFragment
{
private Activity m_activity;
private FolderBrowserAdapter adapter;
- private ListView mDrawerList;
- private View rootView;
+ private ListView mFolderBrowserList;
+ private ListView rootView;
private static File currentDir = null;
// Populates the FolderView with the given currDir's contents.
@@ -54,7 +52,7 @@ public final class FolderBrowser extends Fragment
List<FolderBrowserItem>fls = new ArrayList<FolderBrowserItem>();
// Supported extensions to filter by
- Set<String> validExts = new HashSet<String>(Arrays.asList(".gcm", ".iso", ".wbfs", ".gcz", ".dol", ".elf", ".dff", ".wad"));
+ Set<String> validExts = new HashSet<String>(Arrays.asList(".dff", ".dol", ".elf", ".gcm", ".gcz", ".iso", ".wad", ".wbfs"));
// Search for any directories or files within the current dir.
for(File entry : dirs)
@@ -65,7 +63,7 @@ public final class FolderBrowser extends Fragment
boolean hasExtension = (entryName.lastIndexOf(".") != -1);
// Skip hidden folders/files.
- if (entryName.charAt(0) != '.')
+ if (!entry.isHidden())
{
if(entry.isDirectory())
{
@@ -82,7 +80,7 @@ public final class FolderBrowser extends Fragment
}
catch (Exception ex)
{
- Log.e("Exception-FolderBrowser", ex.toString());
+ Log.e("FolderBrowser", ex.toString());
}
}
@@ -95,9 +93,23 @@ public final class FolderBrowser extends Fragment
dir.add(0, new FolderBrowserItem("..", getString(R.string.parent_directory), currDir.getParent()));
adapter = new FolderBrowserAdapter(m_activity, R.layout.gamelist_folderbrowser_list, dir);
- mDrawerList = (ListView) rootView.findViewById(R.id.gamelist);
- mDrawerList.setAdapter(adapter);
- mDrawerList.setOnItemClickListener(mMenuItemClickListener);
+ mFolderBrowserList = (ListView) rootView.findViewById(R.id.gamelist);
+ mFolderBrowserList.setAdapter(adapter);
+ }
+
+ @Override
+ public void onListItemClick(ListView lv, View v, int position, long id)
+ {
+ FolderBrowserItem item = adapter.getItem(position);
+ if(item.isDirectory())
+ {
+ currentDir = new File(item.getPath());
+ Fill(currentDir);
+ }
+ else
+ {
+ FolderSelected();
+ }
}
@Override
@@ -106,29 +118,12 @@ public final class FolderBrowser extends Fragment
if(currentDir == null)
currentDir = new File(Environment.getExternalStorageDirectory().getPath());
- rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
+ rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
Fill(currentDir);
- return mDrawerList;
+ return mFolderBrowserList;
}
- private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
- {
- public void onItemClick(AdapterView<?> parent, View view, int position, long id)
- {
- FolderBrowserItem item = adapter.getItem(position);
- if(item.isDirectory())
- {
- currentDir = new File(item.getPath());
- Fill(currentDir);
- }
- else
- {
- FolderSelected();
- }
- }
- };
-
@Override
public void onAttach(Activity activity)
{
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java
index e081c061fe..c2b2723664 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java
@@ -104,6 +104,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
if(name != null)
return name.toLowerCase().compareTo(other.getName().toLowerCase());
else
- throw new IllegalArgumentException();
+ throw new NullPointerException("The name of this FolderBrowserItem is null");
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
index d96a3f8f99..c4665e0556 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java
@@ -70,7 +70,7 @@ public final class GameListFragment extends Fragment
int intDirectories = Integer.parseInt(Directories);
// Extensions to filter by.
- Set<String> exts = new HashSet<String>(Arrays.asList(".gcm", ".iso", ".wbfs", ".gcz", ".dol", ".elf", ".dff", ".wad"));
+ Set<String> exts = new HashSet<String>(Arrays.asList(".dff", ".dol", ".elf", ".gcm", ".gcz", ".iso", ".wad", ".wbfs"));
for (int a = 0; a < intDirectories; ++a)
{
@@ -83,13 +83,10 @@ public final class GameListFragment extends Fragment
{
String entryName = entry.getName();
- if (entryName.charAt(0) != '.')
+ if (!entry.isHidden() && !entry.isDirectory())
{
- if (!entry.isDirectory())
- {
- if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
- fls.add(new GameListItem(mMe.getApplicationContext(), entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath()));
- }
+ if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
+ fls.add(new GameListItem(mMe, entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath()));
}
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java
index a84b901bdd..67d61256d4 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java
@@ -42,7 +42,7 @@ public final class GameListItem implements Comparable<GameListItem>
this.path = path;
File file = new File(path);
- if (!file.isDirectory() && !path.equals(""))
+ if (!file.isDirectory() && !path.isEmpty())
{
int[] Banner = NativeLibrary.GetBanner(path);
if (Banner[0] == 0)
@@ -60,7 +60,7 @@ public final class GameListItem implements Comparable<GameListItem>
}
catch (IOException e)
{
- Log.e("Exception-GameListItem", e.toString());
+ Log.e("GameListItem", e.toString());
}
}
else
@@ -117,7 +117,7 @@ public final class GameListItem implements Comparable<GameListItem>
if (name != null)
return name.toLowerCase().compareTo(o.getName().toLowerCase());
else
- throw new IllegalArgumentException();
+ throw new NullPointerException("The name of this GameListItem is null");
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java
index 985fb6d45e..26e89f412d 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java
@@ -183,7 +183,7 @@ public final class InputConfigFragment extends PreferenceFragment
// Set the title and description message.
dialog.setTitle(R.string.input_binding);
- dialog.setMessage(getString(R.string.input_binding_descrip));
+ dialog.setMessage(String.format(getString(R.string.input_binding_descrip), pref.getTitle()));
// Don't allow the dialog to close when a user taps
// outside of it. They must press cancel or provide an input.
@@ -208,7 +208,7 @@ public final class InputConfigFragment extends PreferenceFragment
* to be set anonymously, so the creation of an explicit class for
* providing functionality is not necessary.
*/
- protected static final class MotionAlertDialog extends AlertDialog
+ private static final class MotionAlertDialog extends AlertDialog
{
private OnMotionEventListener motionListener;
@@ -229,6 +229,13 @@ public final class InputConfigFragment extends PreferenceFragment
*/
public interface OnMotionEventListener
{
+ /**
+ * Denotes the behavior that should happen when a motion event occurs.
+ *
+ * @param event Reference to the {@link MotionEvent} that occurred.
+ *
+ * @return true if the {@link MotionEvent} is consumed in this call; false otherwise.
+ */
boolean onMotion(MotionEvent event);
}
@@ -245,7 +252,7 @@ public final class InputConfigFragment extends PreferenceFragment
@Override
public boolean dispatchKeyEvent(KeyEvent event)
{
- if (this.onKeyDown(event.getKeyCode(), event))
+ if (onKeyDown(event.getKeyCode(), event))
return true;
return super.dispatchKeyEvent(event);
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/PrefsActivity.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/PrefsActivity.java
index dc75de2550..486110f6c9 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/PrefsActivity.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/PrefsActivity.java
@@ -76,7 +76,7 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
actionBar.addTab(actionBar.newTab().setText(R.string.video_settings).setTabListener(this));
}
- public void onTabReselected(Tab arg0, FragmentTransaction arg1)
+ public void onTabReselected(Tab tab, FragmentTransaction ft)
{
// Do nothing.
}
@@ -135,13 +135,13 @@ public final class PrefsActivity extends Activity implements ActionBar.TabListen
switch(position)
{
case 0:
- return getString(R.string.cpu_settings).toUpperCase();
+ return getString(R.string.cpu_settings);
case 1:
- return getString(R.string.input_settings).toUpperCase();
+ return getString(R.string.input_settings);
case 2:
- return getString(R.string.video_settings).toUpperCase();
+ return getString(R.string.video_settings);
default: // Should never happen.
return null;
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java
index 08d6ee2021..eadd95bde4 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/UserPreferences.java
@@ -36,12 +36,14 @@ public final class UserPreferences
// Add the settings.
editor.putString("cpuCorePref", getConfig("Dolphin.ini", "Core", "CPUCore", "3"));
editor.putBoolean("dualCorePref", getConfig("Dolphin.ini", "Core", "CPUThread", "False").equals("True"));
+ editor.putBoolean("fastmemPref", getConfig("Dolphin.ini", "Core", "Fastmem", "False").equals("True"));
- editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer"));
+ editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend", "Software Renderer"));
editor.putBoolean("showFPS", getConfig("gfx_opengl.ini", "Settings", "ShowFPS", "False").equals("True"));
editor.putBoolean("drawOnscreenControls", getConfig("Dolphin.ini", "Android", "ScreenControls", "True").equals("True"));
editor.putString("internalResolution", getConfig("gfx_opengl.ini", "Settings", "EFBScale", "2") );
+ editor.putString("FSAA", getConfig("gfx_opengl.ini", "Settings", "MSAA", "0"));
editor.putString("anisotropicFiltering", getConfig("gfx_opengl.ini", "Enhancements", "MaxAnisotropy", "0"));
editor.putBoolean("scaledEFBCopy", getConfig("gfx_opengl.ini", "Hacks", "EFBScaleCopy", "True").equals("True"));
editor.putBoolean("perPixelLighting", getConfig("gfx_opengl.ini", "Settings", "EnablePixelLighting", "False").equals("True"));
@@ -118,6 +120,9 @@ public final class UserPreferences
// Current CPU core being used. Falls back to interpreter upon error.
String currentEmuCore = prefs.getString("cpuCorePref", "0");
+ // Fastmem JIT core usage
+ boolean isUsingFastmem = prefs.getBoolean("fastmemPref", false);
+
// Current video backend being used. Falls back to software rendering upon error.
String currentVideoBackend = prefs.getString("gpuPref", "Software Rendering");
@@ -154,6 +159,9 @@ public final class UserPreferences
// Internal resolution. Falls back to 1x Native upon error.
String internalResolution = prefs.getString("internalResolution", "2");
+ // FSAA Level. Falls back to 1x upon error.
+ String FSAALevel = prefs.getString("FSAA", "0");
+
// Anisotropic Filtering Level. Falls back to 1x upon error.
String anisotropicFiltLevel = prefs.getString("anisotropicFiltering", "0");
@@ -173,6 +181,7 @@ public final class UserPreferences
// CPU related Settings
NativeLibrary.SetConfig("Dolphin.ini", "Core", "CPUCore", currentEmuCore);
NativeLibrary.SetConfig("Dolphin.ini", "Core", "CPUThread", isUsingDualCore ? "True" : "False");
+ NativeLibrary.SetConfig("Dolphin.ini", "Core", "Fastmem", isUsingFastmem ? "True" : "False");
// General Video Settings
NativeLibrary.SetConfig("Dolphin.ini", "Core", "GFXBackend", currentVideoBackend);
@@ -231,6 +240,7 @@ public final class UserPreferences
//-- Enhancement Settings --//
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "EFBScale", internalResolution);
+ NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "MSAA", FSAALevel);
NativeLibrary.SetConfig("gfx_opengl.ini", "Enhancements", "MaxAnisotropy", anisotropicFiltLevel);
NativeLibrary.SetConfig("gfx_opengl.ini", "Hacks", "EFBScaledCopy", usingScaledEFBCopy ? "True" : "False");
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "EnablePixelLighting", usingPerPixelLighting ? "True" : "False");
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/VideoSettingsFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/VideoSettingsFragment.java
index fdaec5df01..498e6607b1 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/VideoSettingsFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/VideoSettingsFragment.java
@@ -6,15 +6,6 @@
package org.dolphinemu.dolphinemu.settings;
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.egl.EGLSurface;
-import javax.microedition.khronos.opengles.GL10;
-
-import org.dolphinemu.dolphinemu.R;
-
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
@@ -23,12 +14,19 @@ import android.preference.ListPreference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
+import org.dolphinemu.dolphinemu.R;
+
+import javax.microedition.khronos.egl.*;
+import javax.microedition.khronos.opengles.GL10;
/**
* Responsible for handling the loading of the video preferences.
*/
public final class VideoSettingsFragment extends PreferenceFragment
{
+ public static String m_GLVersion;
+ public static String m_GLVendor;
+ public static String m_GLRenderer;
private Activity m_activity;
/**
@@ -138,9 +136,9 @@ public final class VideoSettingsFragment extends PreferenceFragment
public static boolean SupportsGLES3()
{
VersionCheck mbuffer = new VersionCheck();
- String m_GLVersion = mbuffer.getVersion();
- String m_GLVendor = mbuffer.getVendor();
- String m_GLRenderer = mbuffer.getRenderer();
+ m_GLVersion = mbuffer.getVersion();
+ m_GLVendor = mbuffer.getVendor();
+ m_GLRenderer = mbuffer.getRenderer();
boolean mSupportsGLES3 = false;
@@ -207,7 +205,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
// denotes the placement on the UI. So if more elements are
// added to the video settings, these may need to change.
//
- final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
+ final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(m_activity);
final PreferenceScreen mainScreen = getPreferenceScreen();
if (videoBackends.getValue().equals("Software Renderer"))
@@ -215,14 +213,14 @@ public final class VideoSettingsFragment extends PreferenceFragment
mainScreen.getPreference(0).setEnabled(false);
mainScreen.getPreference(1).setEnabled(false);
mainScreen.getPreference(3).setEnabled(false);
- mainScreen.getPreference(4).setEnabled(false);
+ //mainScreen.getPreference(4).setEnabled(true);
}
else if (videoBackends.getValue().equals("OGL"))
{
mainScreen.getPreference(0).setEnabled(true);
mainScreen.getPreference(1).setEnabled(true);
mainScreen.getPreference(3).setEnabled(true);
- mainScreen.getPreference(4).setEnabled(true);
+ //mainScreen.getPreference(4).setEnabled(false);
}
// Also set a listener, so that if someone changes the video backend, it will disable
@@ -239,14 +237,14 @@ public final class VideoSettingsFragment extends PreferenceFragment
mainScreen.getPreference(0).setEnabled(false);
mainScreen.getPreference(1).setEnabled(false);
mainScreen.getPreference(3).setEnabled(false);
- mainScreen.getPreference(4).setEnabled(false);
+ //mainScreen.getPreference(4).setEnabled(true);
}
else if (preference.getString(key, "Software Renderer").equals("OGL"))
{
mainScreen.getPreference(0).setEnabled(true);
mainScreen.getPreference(1).setEnabled(true);
mainScreen.getPreference(3).setEnabled(true);
- mainScreen.getPreference(4).setEnabled(true);
+ //mainScreen.getPreference(4).setEnabled(false);
}
}
}
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/sidemenu/SideMenuItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/sidemenu/SideMenuItem.java
index 334e1058a6..402fad094c 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/sidemenu/SideMenuItem.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/sidemenu/SideMenuItem.java
@@ -10,7 +10,7 @@ package org.dolphinemu.dolphinemu.sidemenu;
/**
* Represents an item that goes in the sidemenu of the app.
*/
-public final class SideMenuItem implements Comparable<SideMenuItem>
+public final class SideMenuItem
{
private final String name;
private final int id;
@@ -46,13 +46,5 @@ public final class SideMenuItem implements Comparable<SideMenuItem>
{
return id;
}
-
- public int compareTo(SideMenuItem o)
- {
- if (name != null)
- return name.toLowerCase().compareTo(o.getName().toLowerCase());
- else
- throw new IllegalArgumentException();
- }
}