diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-09-23 00:47:57 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-09-23 00:47:57 -0500 |
| commit | bab91494d53f15d804834ba5d11730b0e855ebd8 (patch) | |
| tree | a86cd67ea34aa3497955dceb501794275e4e7f04 /Source/Android | |
| parent | d84312c799816e8835e6bed562f216bf19725761 (diff) | |
| parent | 1da6469c62fa1b4fd669a48cb583e161d5cb2713 (diff) | |
Merge branch 'master' into android-core-control
Diffstat (limited to 'Source/Android')
31 files changed, 176 insertions, 145 deletions
diff --git a/Source/Android/AndroidManifest.xml b/Source/Android/AndroidManifest.xml index 70bc5c1275..d3a0ddaf5a 100644 --- a/Source/Android/AndroidManifest.xml +++ b/Source/Android/AndroidManifest.xml @@ -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> diff --git a/Source/Android/assets/Dolphin.ini b/Source/Android/assets/Dolphin.ini index 1ccac4d26e..944bbf75bb 100644 --- a/Source/Android/assets/Dolphin.ini +++ b/Source/Android/assets/Dolphin.ini @@ -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 diff --git a/Source/Android/res/drawable-hdpi/ic_launcher.png b/Source/Android/res/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000000..3b9af56e5d --- /dev/null +++ b/Source/Android/res/drawable-hdpi/ic_launcher.png diff --git a/Source/Android/res/drawable-hdpi/launcher.png b/Source/Android/res/drawable-hdpi/launcher.png Binary files differdeleted file mode 100644 index da35bbad81..0000000000 --- a/Source/Android/res/drawable-hdpi/launcher.png +++ /dev/null diff --git a/Source/Android/res/drawable-mdpi/ic_launcher.png b/Source/Android/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000000..065f08541d --- /dev/null +++ b/Source/Android/res/drawable-mdpi/ic_launcher.png diff --git a/Source/Android/res/drawable-mdpi/launcher.png b/Source/Android/res/drawable-mdpi/launcher.png Binary files differdeleted file mode 100644 index 03e5eea949..0000000000 --- a/Source/Android/res/drawable-mdpi/launcher.png +++ /dev/null diff --git a/Source/Android/res/drawable-xhdpi/ic_launcher.png b/Source/Android/res/drawable-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000000..06fdfa1d92 --- /dev/null +++ b/Source/Android/res/drawable-xhdpi/ic_launcher.png diff --git a/Source/Android/res/drawable-xhdpi/launcher.png b/Source/Android/res/drawable-xhdpi/launcher.png Binary files differdeleted file mode 100644 index 28770da81f..0000000000 --- a/Source/Android/res/drawable-xhdpi/launcher.png +++ /dev/null diff --git a/Source/Android/res/drawable-xxhdpi/ic_launcher.png b/Source/Android/res/drawable-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000000..1f7e577295 --- /dev/null +++ b/Source/Android/res/drawable-xxhdpi/ic_launcher.png diff --git a/Source/Android/res/drawable-xxhdpi/launcher.png b/Source/Android/res/drawable-xxhdpi/launcher.png Binary files differdeleted file mode 100644 index 7cb72b57bb..0000000000 --- a/Source/Android/res/drawable-xxhdpi/launcher.png +++ /dev/null diff --git a/Source/Android/res/layout/about_layout.xml b/Source/Android/res/layout/about_layout.xml index 390d7d0de9..9c5b84e9ed 100644 --- a/Source/Android/res/layout/about_layout.xml +++ b/Source/Android/res/layout/about_layout.xml @@ -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>
\ No newline at end of file diff --git a/Source/Android/res/menu/emuwindow_overlay.xml b/Source/Android/res/menu/emuwindow_overlay.xml index 4acfb5b087..d1c480c284 100644 --- a/Source/Android/res/menu/emuwindow_overlay.xml +++ b/Source/Android/res/menu/emuwindow_overlay.xml @@ -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" diff --git a/Source/Android/res/values-ja/strings.xml b/Source/Android/res/values-ja/strings.xml index 515c127a9e..cceb520733 100644 --- a/Source/Android/res/values-ja/strings.xml +++ b/Source/Android/res/values-ja/strings.xml @@ -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> diff --git a/Source/Android/res/values/arrays.xml b/Source/Android/res/values/arrays.xml index 2144440a33..8e75554384 100644 --- a/Source/Android/res/values/arrays.xml +++ b/Source/Android/res/values/arrays.xml @@ -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> diff --git a/Source/Android/res/values/strings.xml b/Source/Android/res/values/strings.xml index 86aa8bedb8..720ce8ef4e 100644 --- a/Source/Android/res/values/strings.xml +++ b/Source/Android/res/values/strings.xml @@ -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> diff --git a/Source/Android/res/xml/cpu_prefs.xml b/Source/Android/res/xml/cpu_prefs.xml index 83dc830791..4316e1fcc5 100644 --- a/Source/Android/res/xml/cpu_prefs.xml +++ b/Source/Android/res/xml/cpu_prefs.xml @@ -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>
\ No newline at end of file diff --git a/Source/Android/res/xml/video_prefs.xml b/Source/Android/res/xml/video_prefs.xml index 6ec29c13a0..72a50c4f3a 100644 --- a/Source/Android/res/xml/video_prefs.xml +++ b/Source/Android/res/xml/video_prefs.xml @@ -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>
\ No newline at end of file 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(); - } } |
