[Android] Add ability to take screenshots into the emulation menu.

This commit is contained in:
Lioncash 2013-11-15 22:21:50 -05:00
parent 3a13dfdd9b
commit 23c84c220f
4 changed files with 13 additions and 2 deletions

View File

@ -1,7 +1,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item <item
android:id="@+id/saveStateRoot" android:id="@+id/takeScreenshot"
android:showAsAction="ifRoom" android:showAsAction="ifRoom"
android:title="@string/overlay_screenshot"/>
<item
android:id="@+id/saveStateRoot"
android:showAsAction="never"
android:title="@string/overlay_savestate"> android:title="@string/overlay_savestate">
<menu> <menu>
<item android:id="@+id/saveSlot1" <item android:id="@+id/saveSlot1"
@ -23,7 +27,7 @@
<item <item
android:id="@+id/loadStateRoot" android:id="@+id/loadStateRoot"
android:showAsAction="ifRoom" android:showAsAction="never"
android:title="@string/overlay_loadstate"> android:title="@string/overlay_loadstate">
<menu> <menu>
<item android:id="@+id/loadSlot1" <item android:id="@+id/loadSlot1"

View File

@ -34,6 +34,7 @@
<string name="file_clicked">クリックされたファイル: %1$s</string> <string name="file_clicked">クリックされたファイル: %1$s</string>
<!-- Emulation Window Overlay --> <!-- Emulation Window Overlay -->
<string name="overlay_screenshot">スクリーンショットを撮る</string>
<string name="overlay_savestate">ステートセーブ</string> <string name="overlay_savestate">ステートセーブ</string>
<string name="overlay_loadstate">ステートロード</string> <string name="overlay_loadstate">ステートロード</string>
<string name="overlay_exit_emulation">終了</string> <string name="overlay_exit_emulation">終了</string>

View File

@ -34,6 +34,7 @@
<string name="file_clicked">File clicked: %1$s</string> <string name="file_clicked">File clicked: %1$s</string>
<!-- Emulation Overlay --> <!-- Emulation Overlay -->
<string name="overlay_screenshot">Take Screenshot</string>
<string name="overlay_savestate">Save State</string> <string name="overlay_savestate">Save State</string>
<string name="overlay_loadstate">Load State</string> <string name="overlay_loadstate">Load State</string>
<string name="overlay_exit_emulation">Exit</string> <string name="overlay_exit_emulation">Exit</string>

View File

@ -175,6 +175,11 @@ public final class EmulationActivity extends Activity
{ {
switch(item.getItemId()) switch(item.getItemId())
{ {
// Screenshot capturing
case R.id.takeScreenshot:
NativeLibrary.SaveScreenShot();
return true;
// Save state slots // Save state slots
case R.id.saveSlot1: case R.id.saveSlot1:
NativeLibrary.SaveState(0); NativeLibrary.SaveState(0);