Merge branch 'master' into android-core-control

This commit is contained in:
Ryan Houdek
2013-09-23 00:47:57 -05:00
2008 changed files with 27429 additions and 23764 deletions

View File

@ -7,10 +7,10 @@
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />
android:targetSdkVersion="18" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:glEsVersion="0x00020000" >
</uses-feature>
<uses-feature android:name="android.hardware.screen.landscape" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
@ -18,7 +18,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@drawable/launcher"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name="org.dolphinemu.dolphinemu.DolphinEmulator"
@ -40,8 +40,8 @@
<activity
android:name="org.dolphinemu.dolphinemu.settings.PrefsActivity"
android:label="@string/settings" >
</activity>
android:label="@string/settings" />
</application>
</manifest>

View File

@ -10,7 +10,7 @@ CPUCore = 3
CPUThread = False
GFXBackend = Software Renderer
HLE_BS2 = False
Fastmem = True
Fastmem = False
DSPThread = False
DSPHLE = True
SkipIdle = True
@ -56,7 +56,7 @@ ShowStatusbar = True
ShowLogWindow = False
ShowLogConfigWindow = False
ShowConsole = False
ThemeName = Boomy
ThemeName40 = Clean
[Hotkeys]
Open = 79
OpenModifier = 2

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

View File

@ -2,22 +2,23 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="6dp">
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical">
<TextView
android:id="@+id/AboutItemTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginTop="5dip"
android:layout_marginLeft="15dip"
android:layout_marginTop="6dip"
android:singleLine="true"
android:textStyle="bold" />
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="@+id/AboutItemSubTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip" />
android:layout_marginLeft="15dip"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>

View File

@ -1,7 +1,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/saveStateRoot"
android:showAsAction="always"
android:showAsAction="ifRoom"
android:title="@string/overlay_savestate">
<menu>
<item android:id="@+id/saveSlot1"
@ -22,8 +22,8 @@
</item>
<item
android:id="@+id/loadtateRoot"
android:showAsAction="always"
android:id="@+id/loadStateRoot"
android:showAsAction="ifRoom"
android:title="@string/overlay_loadstate">
<menu>
<item android:id="@+id/loadSlot1"

View File

@ -9,13 +9,12 @@
<string name="drawer_close">ナビゲーションウィンドウを閉じる</string>
<!-- About Fragment -->
<string name="build_revision">ビルドのバージョン</string>
<string name="supports_gles3">サポートのOpenGL ES 3</string>
<string name="build_revision">ビルドのバージョン</string>
<string name="supports_gles3">サポートのOpenGL ES 3</string>
<!-- Folder Browser -->
<string name="current_dir">現在のディレクトリ: </string>
<string name="parent_directory">親ディレクトリ</string>
<string name="folder">フォルダ</string>
<string name="file_size">ファイルサイズ: </string>
<!-- Game List Activity -->
@ -24,7 +23,6 @@
<string name="game_list">ゲームリスト</string>
<string name="browse_folder">フォルダの参照</string>
<string name="settings">設定</string>
<string name="gamepad_config">ゲームパッド設定</string>
<string name="about">について</string>
<!-- Game List Fragment -->
@ -42,9 +40,9 @@
<string name="overlay_slot5">スロット 5</string>
<!-- Input Config Fragment -->
<string name="input_settings">入力設定</string>
<string name="input_settings">入力</string>
<string name="input_binding">入力バインディング</string>
<string name="input_binding_descrip">このコントロールにバインドするための入力を移動または押してください。</string>
<string name="input_binding_descrip">%1$sにバインドするための入力を移動または押してください。</string>
<string name="button_a">Aボタン</string>
<string name="button_b">Bボタン</string>
<string name="button_start">スタートボタン</string>
@ -65,7 +63,6 @@
<string name="c_stick_right">C-スティック: →</string>
<string name="trigger_left">左のトリガー</string>
<string name="trigger_right">右のトリガー</string>
<string name="press_button_to_config">%1$sを設定するにはボタンを押して</string>
<!-- Prefs Fragment -->
<string name="interpreter">Interpreter</string>
@ -73,11 +70,13 @@
<string name="jitil_recompiler">JITIL Recompiler</string>
<string name="jit_arm_recompiler">JIT ARM Recompiler</string>
<string name="cpu_core">CPUコア</string>
<string name="cpu_settings">CPU設定</string>
<string name="cpu_settings">CPU</string>
<string name="emu_core_to_use">使用するエミュレーションコア</string>
<string name="dual_core">デュアルコア</string>
<string name="dual_core_descrip">処理のための2つのCPUコアを使用して。速度が向上します。</string>
<string name="video_settings">ビデオ設定</string>
<string name="fastmem">Fastmem</string>
<string name="fastmem_desc">メモリアクセスのために潜在的に危険な最適化を使用して。</string>
<string name="video_settings">ビデオ</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES 3</string>
<string name="video_backend">ビデオレンダラ</string>
@ -89,6 +88,8 @@
<string name="enhancements">画質向上の設定</string>
<string name="internal_resolution">内部解像度の変更</string>
<string name="internal_resolution_descrip">内部解像度の計算方式を設定します。高解像度に設定することで大きく 画質が向上します。 しかし、ゲームによっては非常に重くなったり描画バグの原因となります。 【ゲーム解像度の倍数】は【ウィンドウサイズに拡大】より少し重くなり ますが、描画バグは発生しにくくなります。 また一般的に内部解像度が低いほど、動作速度は向上します。</string>
<string name="FSAA">フルシーンアンチエイリアシング</string>
<string name="FSAA_descrip">3Dグラフィックスをラスタライズによって生じるエイリアシングの量が減少。 レンダリングされた画像はあまりギザギザになります。 抽選でエミュレーション速度を下げます。問題を引き起こす可能性があります。</string>
<string name="anisotropic_filtering">異方性フィルタリング</string>
<string name="anisotropic_filtering_descrip">異方性フィルタリングを適用します。 奥行きのあるテクスチャをより精細に描画することが出来ます。 特定のゲームでは描画バグの原因になることがあります。</string>
<string name="scaled_efb_copy">Scaled EFB Copy</string>

View File

@ -108,7 +108,19 @@
<item>6</item>
<item>7</item>
</string-array>
<!-- FSAA Preference -->
<string-array name="FSAAEntries" translatable="false">
<item>1x</item>
<item>2x</item>
<item>4x</item>
</string-array>
<string-array name="FSAAValues" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<!-- Anisotropic Filtering Preference -->
<string-array name="anisotropicFilteringEntries" translatable="false">
<item>1x</item>

View File

@ -9,13 +9,12 @@
<string name="drawer_close">Close navigation drawer</string>
<!-- About Fragment -->
<string name="build_revision">Build Revision:</string>
<string name="supports_gles3">Supports OpenGL ES 3:</string>
<string name="build_revision">Build Revision</string>
<string name="supports_gles3">Supports OpenGL ES 3</string>
<!-- Folder Browser -->
<string name="current_dir">Current Dir: </string>
<string name="parent_directory">Parent Directory</string>
<string name="folder">Folder</string>
<string name="file_size">File Size: </string>
<!-- Game List Activity -->
@ -24,7 +23,6 @@
<string name="game_list">Game List</string>
<string name="browse_folder">Browse Folder</string>
<string name="settings">Settings</string>
<string name="gamepad_config">Gamepad Config</string>
<string name="about">About</string>
<!-- Game List Fragment -->
@ -44,7 +42,7 @@
<!-- Input Config Fragment -->
<string name="input_settings">Input</string>
<string name="input_binding">Input Binding</string>
<string name="input_binding_descrip">Press or move an input to bind it to this control.</string>
<string name="input_binding_descrip">Press or move an input to bind it to %1$s.</string>
<string name="button_a">Button A</string>
<string name="button_b">Button B</string>
<string name="button_start">Button Start</string>
@ -65,7 +63,6 @@
<string name="c_stick_right">C Stick Right</string>
<string name="trigger_left">Trigger L</string>
<string name="trigger_right">Trigger R</string>
<string name="press_button_to_config">Press button to configure %1$s</string>
<!-- Preference Related -->
<string name="interpreter">Interpreter</string>
@ -77,6 +74,8 @@
<string name="emu_core_to_use">Emulation core to use</string>
<string name="dual_core">Dual Core</string>
<string name="dual_core_descrip">Split workload to two CPU cores instead of one. Increases speed.</string>
<string name="fastmem">Fastmem</string>
<string name="fastmem_desc">Uses potentially unsafe optimizations for memory access.</string>
<string name="video_settings">Video</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES 3</string>
@ -89,6 +88,8 @@
<string name="enhancements">Enhancements</string>
<string name="internal_resolution">Internal Resolution</string>
<string name="internal_resolution_descrip">Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain games.</string>
<string name="FSAA">Full-scene Anti-aliasing</string>
<string name="FSAA_descrip">Reduces the amount of aliasing caused by rasterizing 3D graphics. This makes the rendered picture look less blocky. Heavily decreases emulation speed and sometimes causes issues.</string>
<string name="anisotropic_filtering">Anisotropic Filtering</string>
<string name="anisotropic_filtering_descrip">Enhances visual quality of textures that are at oblique viewing angles. Might cause issues in a small number of games.</string>
<string name="scaled_efb_copy">Scaled EFB Copy</string>

View File

@ -1,14 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<!-- CPU Settings -->
<!-- CPU Settings -->
<CheckBoxPreference
android:key="dualCorePref"
android:summary="@string/dual_core_descrip"
android:title="@string/dual_core" />
android:defaultValue="false"
android:key="dualCorePref"
android:summary="@string/dual_core_descrip"
android:title="@string/dual_core" />
<ListPreference
android:key="cpuCorePref"
android:summary="@string/emu_core_to_use"
android:title="@string/cpu_core" />
<CheckBoxPreference
android:defaultValue="false"
android:key="fastmemPref"
android:summary="@string/fastmem_desc"
android:title="@string/fastmem" />
</PreferenceScreen>

View File

@ -14,6 +14,13 @@
android:summary="@string/internal_resolution_descrip"
android:title="@string/internal_resolution"/>
<ListPreference
android:entries="@array/FSAAEntries"
android:entryValues="@array/FSAAValues"
android:key="FSAA"
android:summary="@string/FSAA_descrip"
android:title="@string/FSAA"/>
<ListPreference
android:entries="@array/anisotropicFilteringEntries"
android:entryValues="@array/anisotropicFilteringValues"
@ -129,9 +136,10 @@
android:key="showFPS"
android:summary="@string/show_fps_descrip"
android:title="@string/show_fps"/>
<!--
<CheckBoxPreference
android:defaultValue="true"
android:key="drawOnscreenControls"
android:title="@string/draw_onscreen_controls"/>
-->
</PreferenceScreen>

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}
}

View File

@ -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
}

View File

@ -148,7 +148,7 @@ public final class NativeLibrary
}
catch (UnsatisfiedLinkError ex)
{
Log.w("NativeLibrary", ex.toString());
Log.e("NativeLibrary", ex.toString());
}
}
}

View File

@ -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)
{

View File

@ -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");
}
}

View File

@ -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()));
}
}
}

View File

@ -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");
}
}

View File

@ -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);

View File

@ -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;

View File

@ -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");

View File

@ -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);
}
}
}

View File

@ -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();
}
}