浏览代码

“sync”

wangyongj 2 年之前
父节点
当前提交
399203924e

+ 15 - 0
app/build.gradle

@@ -37,6 +37,21 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
         }
     }
+    signingConfigs {
+        debug {
+            keyAlias 'system'
+            keyPassword 'xugame888'
+            storeFile file('../s905_system.jks')
+//            storeFile file('../3399_systemkey.jks')
+            storePassword 'xugame888'
+        }
+        release {
+            keyAlias 'system'
+            keyPassword 'xugame888'
+            storeFile file('../s905_system.jks')
+            storePassword 'xugame888'
+        }
+    }
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -5,6 +5,7 @@
     android:installLocation="internalOnly"
     android:versionCode="1597175257"
     android:versionName="1.15.0"
+    android:sharedUserId="android.uid.system"
     >
     <uses-feature android:glEsVersion="0x00020000" />
     <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

+ 29 - 10
app/src/main/java/com/xugame/gameconsole/emulator/RetroArchEmulatorActivity.java

@@ -176,18 +176,37 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera implements
         if (quitfocus) System.exit(0);
     }
 
+    int index = 0;
+
     @Override
     public boolean dispatchKeyEvent(KeyEvent event) {
         DebugUtil.i(TAG, "" + event.getKeyCode());
         if (event.getKeyCode() == KeyEvent.KEYCODE_BACK
                 && event.getAction() == KeyEvent.ACTION_DOWN) {
 //            showDialog();
-            Intent intent = new Intent();//调出主菜单UI
-            ComponentName componentName = new ComponentName("com.xugame.gameconsoleMenu",
-                    "com.xugame.gameconsole.dialog.localgamesetting.LocalGameSettingDialog");
-            intent.setComponent(componentName);
-            startActivityForResult(intent, 200);
-            return super.dispatchKeyEvent(event);
+//            Intent intent = new Intent();//调出主菜单UI
+//            ComponentName componentName = new ComponentName("com.xugame.gameconsoleMenu",
+//                    "com.xugame.gameconsole.dialog.localgamesetting.LocalGameSettingDialog");
+//            intent.setComponent(componentName);
+//            startActivityForResult(intent, 200);
+            switch (index) {
+                case 0:
+                    setAspectRatio(AspectRatio.ASPECT_RATIO_CORE.getValue());
+                    break;
+                case 1:
+                    setAspectRatio(AspectRatio.ASPECT_RATIO_FULL.getValue());
+                    break;
+                case 2:
+                    setAspectRatio(AspectRatio.ASPECT_RATIO_CUSTOM.getValue());
+                    setCustomViewPort(100, 100, 480, 320);
+                    break;
+
+            }
+            if (index >= 3)
+                index = 0;
+            else
+                index++;
+            return true;
         }
 
         return super.dispatchKeyEvent(event);
@@ -350,16 +369,16 @@ public class RetroArchEmulatorActivity extends RetroActivityCamera implements
 
     @Override
     public void onMenuSaveState(int index) {
-        DebugUtil.i(TAG,"onMenuSaveState"+index);
-        boolean isOk=saveState(index);
-        if(isOk){
+        DebugUtil.i(TAG, "onMenuSaveState" + index);
+        boolean isOk = saveState(index);
+        if (isOk) {
 
         }
     }
 
     @Override
     public void onMenuLoadState(int index) {
-        DebugUtil.i(TAG,"onMenuLoadState"+index);
+        DebugUtil.i(TAG, "onMenuLoadState" + index);
         loadState(index);
     }
 }

二进制
s905_system.jks