Просмотр исходного кода

android: Replace old buttons with vectors

german77 3 лет назад
Родитель
Сommit
7dd02363a3
100 измененных файлов с 72 добавлено и 67 удалено
  1. 71 66
      src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.java
  2. 1 1
      src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlayDrawableDpad.java
  3. BIN
      src/android/app/src/main/res/drawable-hdpi/button_a.png
  4. BIN
      src/android/app/src/main/res/drawable-hdpi/button_a_pressed.png
  5. BIN
      src/android/app/src/main/res/drawable-hdpi/button_b.png
  6. BIN
      src/android/app/src/main/res/drawable-hdpi/button_b_pressed.png
  7. BIN
      src/android/app/src/main/res/drawable-hdpi/button_l.png
  8. BIN
      src/android/app/src/main/res/drawable-hdpi/button_l_pressed.png
  9. BIN
      src/android/app/src/main/res/drawable-hdpi/button_r.png
  10. BIN
      src/android/app/src/main/res/drawable-hdpi/button_r_pressed.png
  11. BIN
      src/android/app/src/main/res/drawable-hdpi/button_select.png
  12. BIN
      src/android/app/src/main/res/drawable-hdpi/button_select_pressed.png
  13. BIN
      src/android/app/src/main/res/drawable-hdpi/button_start.png
  14. BIN
      src/android/app/src/main/res/drawable-hdpi/button_start_pressed.png
  15. BIN
      src/android/app/src/main/res/drawable-hdpi/button_x.png
  16. BIN
      src/android/app/src/main/res/drawable-hdpi/button_x_pressed.png
  17. BIN
      src/android/app/src/main/res/drawable-hdpi/button_y.png
  18. BIN
      src/android/app/src/main/res/drawable-hdpi/button_y_pressed.png
  19. BIN
      src/android/app/src/main/res/drawable-hdpi/button_zl.png
  20. BIN
      src/android/app/src/main/res/drawable-hdpi/button_zl_pressed.png
  21. BIN
      src/android/app/src/main/res/drawable-hdpi/button_zr.png
  22. BIN
      src/android/app/src/main/res/drawable-hdpi/button_zr_pressed.png
  23. BIN
      src/android/app/src/main/res/drawable-hdpi/dpad.png
  24. BIN
      src/android/app/src/main/res/drawable-hdpi/dpad_pressed_one_direction.png
  25. BIN
      src/android/app/src/main/res/drawable-hdpi/dpad_pressed_two_directions.png
  26. BIN
      src/android/app/src/main/res/drawable-hdpi/stick_c.png
  27. BIN
      src/android/app/src/main/res/drawable-hdpi/stick_c_pressed.png
  28. BIN
      src/android/app/src/main/res/drawable-hdpi/stick_c_range.png
  29. BIN
      src/android/app/src/main/res/drawable-hdpi/stick_main.png
  30. BIN
      src/android/app/src/main/res/drawable-hdpi/stick_main_pressed.png
  31. BIN
      src/android/app/src/main/res/drawable-hdpi/stick_main_range.png
  32. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_a.png
  33. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_a_pressed.png
  34. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_b.png
  35. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_b_pressed.png
  36. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_l.png
  37. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_l_pressed.png
  38. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_r.png
  39. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_r_pressed.png
  40. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_select.png
  41. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_select_pressed.png
  42. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_start.png
  43. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_start_pressed.png
  44. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_x.png
  45. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_x_pressed.png
  46. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_y.png
  47. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_y_pressed.png
  48. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_zl.png
  49. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_zl_pressed.png
  50. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_zr.png
  51. BIN
      src/android/app/src/main/res/drawable-xhdpi/button_zr_pressed.png
  52. BIN
      src/android/app/src/main/res/drawable-xhdpi/dpad.png
  53. BIN
      src/android/app/src/main/res/drawable-xhdpi/dpad_pressed_one_direction.png
  54. BIN
      src/android/app/src/main/res/drawable-xhdpi/dpad_pressed_two_directions.png
  55. BIN
      src/android/app/src/main/res/drawable-xhdpi/stick_c.png
  56. BIN
      src/android/app/src/main/res/drawable-xhdpi/stick_c_pressed.png
  57. BIN
      src/android/app/src/main/res/drawable-xhdpi/stick_c_range.png
  58. BIN
      src/android/app/src/main/res/drawable-xhdpi/stick_main.png
  59. BIN
      src/android/app/src/main/res/drawable-xhdpi/stick_main_pressed.png
  60. BIN
      src/android/app/src/main/res/drawable-xhdpi/stick_main_range.png
  61. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_a.png
  62. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_a_pressed.png
  63. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_b.png
  64. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_b_pressed.png
  65. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_l.png
  66. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_l_pressed.png
  67. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_r.png
  68. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_r_pressed.png
  69. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_select.png
  70. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_select_pressed.png
  71. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_start.png
  72. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_start_pressed.png
  73. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_x.png
  74. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_x_pressed.png
  75. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_y.png
  76. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_y_pressed.png
  77. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_zl.png
  78. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_zl_pressed.png
  79. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_zr.png
  80. BIN
      src/android/app/src/main/res/drawable-xxhdpi/button_zr_pressed.png
  81. BIN
      src/android/app/src/main/res/drawable-xxhdpi/dpad.png
  82. BIN
      src/android/app/src/main/res/drawable-xxhdpi/dpad_pressed_one_direction.png
  83. BIN
      src/android/app/src/main/res/drawable-xxhdpi/dpad_pressed_two_directions.png
  84. BIN
      src/android/app/src/main/res/drawable-xxhdpi/stick_c.png
  85. BIN
      src/android/app/src/main/res/drawable-xxhdpi/stick_c_pressed.png
  86. BIN
      src/android/app/src/main/res/drawable-xxhdpi/stick_c_range.png
  87. BIN
      src/android/app/src/main/res/drawable-xxhdpi/stick_main.png
  88. BIN
      src/android/app/src/main/res/drawable-xxhdpi/stick_main_pressed.png
  89. BIN
      src/android/app/src/main/res/drawable-xxhdpi/stick_main_range.png
  90. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_a.png
  91. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_a_pressed.png
  92. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_b.png
  93. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_b_pressed.png
  94. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_l.png
  95. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_l_pressed.png
  96. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_r.png
  97. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_r_pressed.png
  98. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_select.png
  99. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_select_pressed.png
  100. BIN
      src/android/app/src/main/res/drawable-xxxhdpi/button_start.png

+ 71 - 66
src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.java

@@ -15,7 +15,9 @@ import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.graphics.Canvas;
 import android.graphics.Rect;
 import android.graphics.Rect;
+import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Drawable;
+import android.graphics.drawable.VectorDrawable;
 import android.hardware.Sensor;
 import android.hardware.Sensor;
 import android.hardware.SensorEvent;
 import android.hardware.SensorEvent;
 import android.hardware.SensorEventListener;
 import android.hardware.SensorEventListener;
@@ -29,6 +31,8 @@ import android.view.SurfaceView;
 import android.view.View;
 import android.view.View;
 import android.view.View.OnTouchListener;
 import android.view.View.OnTouchListener;
 
 
+import androidx.core.content.ContextCompat;
+
 import org.yuzu.yuzu_emu.NativeLibrary;
 import org.yuzu.yuzu_emu.NativeLibrary;
 import org.yuzu.yuzu_emu.NativeLibrary.ButtonType;
 import org.yuzu.yuzu_emu.NativeLibrary.ButtonType;
 import org.yuzu.yuzu_emu.NativeLibrary.StickType;
 import org.yuzu.yuzu_emu.NativeLibrary.StickType;
@@ -103,21 +107,28 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
     /**
     /**
      * Resizes a {@link Bitmap} by a given scale factor
      * Resizes a {@link Bitmap} by a given scale factor
      *
      *
-     * @param context The current {@link Context}
-     * @param bitmap  The {@link Bitmap} to scale.
-     * @param scale   The scale factor for the bitmap.
+     * @param vectorDrawable The {@link Bitmap} to scale.
+     * @param scale          The scale factor for the bitmap.
      * @return The scaled {@link Bitmap}
      * @return The scaled {@link Bitmap}
      */
      */
-    public static Bitmap resizeBitmap(Context context, Bitmap bitmap, float scale) {
-        // Determine the button size based on the smaller screen dimension.
-        // This makes sure the buttons are the same size in both portrait and landscape.
-        DisplayMetrics dm = context.getResources().getDisplayMetrics();
-        int minDimension = Math.min(dm.widthPixels, dm.heightPixels);
-
-        return Bitmap.createScaledBitmap(bitmap,
-                (int) (minDimension * scale),
-                (int) (minDimension * scale),
-                true);
+    private static Bitmap getBitmap(VectorDrawable vectorDrawable, float scale) {
+        Bitmap bitmap = Bitmap.createBitmap((int) (vectorDrawable.getIntrinsicWidth() * scale),
+                (int) (vectorDrawable.getIntrinsicHeight() * scale), Bitmap.Config.ARGB_8888);
+        Canvas canvas = new Canvas(bitmap);
+        vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
+        vectorDrawable.draw(canvas);
+        return bitmap;
+    }
+
+    private static Bitmap getBitmap(Context context, int drawableId, float scale) {
+        Drawable drawable = ContextCompat.getDrawable(context, drawableId);
+        if (drawable instanceof BitmapDrawable) {
+            return BitmapFactory.decodeResource(context.getResources(), drawableId);
+        } else if (drawable instanceof VectorDrawable) {
+            return getBitmap((VectorDrawable) drawable, scale);
+        } else {
+            throw new IllegalArgumentException("unsupported drawable type");
+        }
     }
     }
 
 
     /**
     /**
@@ -166,16 +177,16 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
             case ButtonType.BUTTON_CAPTURE:
             case ButtonType.BUTTON_CAPTURE:
             case ButtonType.BUTTON_PLUS:
             case ButtonType.BUTTON_PLUS:
             case ButtonType.BUTTON_MINUS:
             case ButtonType.BUTTON_MINUS:
-                scale = 0.08f;
+                scale = 0.35f;
                 break;
                 break;
             case ButtonType.TRIGGER_L:
             case ButtonType.TRIGGER_L:
             case ButtonType.TRIGGER_R:
             case ButtonType.TRIGGER_R:
             case ButtonType.TRIGGER_ZL:
             case ButtonType.TRIGGER_ZL:
             case ButtonType.TRIGGER_ZR:
             case ButtonType.TRIGGER_ZR:
-                scale = 0.18f;
+                scale = 0.38f;
                 break;
                 break;
             default:
             default:
-                scale = 0.11f;
+                scale = 0.40f;
                 break;
                 break;
         }
         }
 
 
@@ -183,10 +194,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
         scale /= 100;
         scale /= 100;
 
 
         // Initialize the InputOverlayDrawableButton.
         // Initialize the InputOverlayDrawableButton.
-        final Bitmap defaultStateBitmap =
-                resizeBitmap(context, BitmapFactory.decodeResource(res, defaultResId), scale);
-        final Bitmap pressedStateBitmap =
-                resizeBitmap(context, BitmapFactory.decodeResource(res, pressedResId), scale);
+        final Bitmap defaultStateBitmap = getBitmap(context, defaultResId, scale);
+        final Bitmap pressedStateBitmap = getBitmap(context, pressedResId, scale);
         final InputOverlayDrawableButton overlayDrawable =
         final InputOverlayDrawableButton overlayDrawable =
                 new InputOverlayDrawableButton(res, defaultStateBitmap, pressedStateBitmap, buttonId);
                 new InputOverlayDrawableButton(res, defaultStateBitmap, pressedStateBitmap, buttonId);
 
 
@@ -243,20 +252,17 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
         final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
         final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
 
 
         // Decide scale based on button ID and user preference
         // Decide scale based on button ID and user preference
-        float scale = 0.23f;
+        float scale = 0.40f;
 
 
         scale *= (sPrefs.getInt("controlScale", 50) + 50);
         scale *= (sPrefs.getInt("controlScale", 50) + 50);
         scale /= 100;
         scale /= 100;
 
 
         // Initialize the InputOverlayDrawableDpad.
         // Initialize the InputOverlayDrawableDpad.
-        final Bitmap defaultStateBitmap =
-                resizeBitmap(context, BitmapFactory.decodeResource(res, defaultResId), scale);
-        final Bitmap pressedOneDirectionStateBitmap =
-                resizeBitmap(context, BitmapFactory.decodeResource(res, pressedOneDirectionResId),
-                        scale);
-        final Bitmap pressedTwoDirectionsStateBitmap =
-                resizeBitmap(context, BitmapFactory.decodeResource(res, pressedTwoDirectionsResId),
-                        scale);
+        final Bitmap defaultStateBitmap = getBitmap(context, defaultResId, scale);
+        final Bitmap pressedOneDirectionStateBitmap = getBitmap(context, pressedOneDirectionResId,
+                scale);
+        final Bitmap pressedTwoDirectionsStateBitmap = getBitmap(context, pressedTwoDirectionsResId,
+                scale);
         final InputOverlayDrawableDpad overlayDrawable =
         final InputOverlayDrawableDpad overlayDrawable =
                 new InputOverlayDrawableDpad(res, defaultStateBitmap,
                 new InputOverlayDrawableDpad(res, defaultStateBitmap,
                         pressedOneDirectionStateBitmap, pressedTwoDirectionsStateBitmap,
                         pressedOneDirectionStateBitmap, pressedTwoDirectionsStateBitmap,
@@ -300,15 +306,14 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
         final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
         final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(context);
 
 
         // Decide scale based on user preference
         // Decide scale based on user preference
-        float scale = 0.275f;
+        float scale = 0.35f;
         scale *= (sPrefs.getInt("controlScale", 50) + 50);
         scale *= (sPrefs.getInt("controlScale", 50) + 50);
         scale /= 100;
         scale /= 100;
 
 
         // Initialize the InputOverlayDrawableJoystick.
         // Initialize the InputOverlayDrawableJoystick.
-        final Bitmap bitmapOuter =
-                resizeBitmap(context, BitmapFactory.decodeResource(res, resOuter), scale);
-        final Bitmap bitmapInnerDefault = BitmapFactory.decodeResource(res, defaultResInner);
-        final Bitmap bitmapInnerPressed = BitmapFactory.decodeResource(res, pressedResInner);
+        final Bitmap bitmapOuter = getBitmap(context, resOuter, scale);
+        final Bitmap bitmapInnerDefault = getBitmap(context, defaultResInner, 1.0f);
+        final Bitmap bitmapInnerPressed = getBitmap(context, pressedResInner, 1.0f);
 
 
         // The X and Y coordinates of the InputOverlayDrawableButton on the InputOverlay.
         // The X and Y coordinates of the InputOverlayDrawableButton on the InputOverlay.
         // These were set in the input overlay configuration menu.
         // These were set in the input overlay configuration menu.
@@ -320,7 +325,7 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
         // Now set the bounds for the InputOverlayDrawableJoystick.
         // Now set the bounds for the InputOverlayDrawableJoystick.
         // This will dictate where on the screen (and the what the size) the InputOverlayDrawableJoystick will be.
         // This will dictate where on the screen (and the what the size) the InputOverlayDrawableJoystick will be.
         int outerSize = bitmapOuter.getWidth();
         int outerSize = bitmapOuter.getWidth();
-        Rect outerRect = new Rect(drawableX, drawableY, drawableX + (int) (outerSize / outerScale), drawableY + (int) (outerSize / outerScale));
+        Rect outerRect = new Rect(drawableX, drawableY, drawableX + outerSize, drawableY + outerSize);
         Rect innerRect = new Rect(0, 0, (int) (outerSize / outerScale), (int) (outerSize / outerScale));
         Rect innerRect = new Rect(0, 0, (int) (outerSize / outerScale), (int) (outerSize / outerScale));
 
 
         // Send the drawableId to the joystick so it can be referenced when saving control position.
         // Send the drawableId to the joystick so it can be referenced when saving control position.
@@ -476,68 +481,68 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener,
 
 
     private void addOverlayControls(String orientation) {
     private void addOverlayControls(String orientation) {
         if (mPreferences.getBoolean("buttonToggle0", true)) {
         if (mPreferences.getBoolean("buttonToggle0", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_a,
-                    R.drawable.button_a_pressed, ButtonType.BUTTON_A, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_a,
+                    R.drawable.facebutton_a_depressed, ButtonType.BUTTON_A, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle1", true)) {
         if (mPreferences.getBoolean("buttonToggle1", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_b,
-                    R.drawable.button_b_pressed, ButtonType.BUTTON_B, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_b,
+                    R.drawable.facebutton_b_depressed, ButtonType.BUTTON_B, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle2", true)) {
         if (mPreferences.getBoolean("buttonToggle2", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_x,
-                    R.drawable.button_x_pressed, ButtonType.BUTTON_X, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_x,
+                    R.drawable.facebutton_x_depressed, ButtonType.BUTTON_X, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle3", true)) {
         if (mPreferences.getBoolean("buttonToggle3", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_y,
-                    R.drawable.button_y_pressed, ButtonType.BUTTON_Y, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_y,
+                    R.drawable.facebutton_y_depressed, ButtonType.BUTTON_Y, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle4", true)) {
         if (mPreferences.getBoolean("buttonToggle4", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_l,
-                    R.drawable.button_l_pressed, ButtonType.TRIGGER_L, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.l_shoulder,
+                    R.drawable.l_shoulder_depressed, ButtonType.TRIGGER_L, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle5", true)) {
         if (mPreferences.getBoolean("buttonToggle5", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_r,
-                    R.drawable.button_r_pressed, ButtonType.TRIGGER_R, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.r_shoulder,
+                    R.drawable.r_shoulder_depressed, ButtonType.TRIGGER_R, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle6", true)) {
         if (mPreferences.getBoolean("buttonToggle6", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_zl,
-                    R.drawable.button_zl_pressed, ButtonType.TRIGGER_ZL, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.zl_trigger,
+                    R.drawable.zl_trigger_depressed, ButtonType.TRIGGER_ZL, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle7", true)) {
         if (mPreferences.getBoolean("buttonToggle7", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_zr,
-                    R.drawable.button_zr_pressed, ButtonType.TRIGGER_ZR, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.zr_trigger,
+                    R.drawable.zr_trigger_depressed, ButtonType.TRIGGER_ZR, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle8", true)) {
         if (mPreferences.getBoolean("buttonToggle8", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_start,
-                    R.drawable.button_start_pressed, ButtonType.BUTTON_PLUS, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_plus,
+                    R.drawable.facebutton_plus_depressed, ButtonType.BUTTON_PLUS, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle9", true)) {
         if (mPreferences.getBoolean("buttonToggle9", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_select,
-                    R.drawable.button_select_pressed, ButtonType.BUTTON_MINUS, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_minus,
+                    R.drawable.facebutton_minus_depressed, ButtonType.BUTTON_MINUS, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle10", true)) {
         if (mPreferences.getBoolean("buttonToggle10", true)) {
-            overlayDpads.add(initializeOverlayDpad(getContext(), R.drawable.dpad,
-                    R.drawable.dpad_pressed_one_direction,
-                    R.drawable.dpad_pressed_two_directions,
+            overlayDpads.add(initializeOverlayDpad(getContext(), R.drawable.dpad_standard,
+                    R.drawable.dpad_standard_cardinal_depressed,
+                    R.drawable.dpad_standard_diagonal_depressed,
                     ButtonType.DPAD_UP, ButtonType.DPAD_DOWN,
                     ButtonType.DPAD_UP, ButtonType.DPAD_DOWN,
                     ButtonType.DPAD_LEFT, ButtonType.DPAD_RIGHT, orientation));
                     ButtonType.DPAD_LEFT, ButtonType.DPAD_RIGHT, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle11", true)) {
         if (mPreferences.getBoolean("buttonToggle11", true)) {
-            overlayJoysticks.add(initializeOverlayJoystick(getContext(), R.drawable.stick_main_range,
-                    R.drawable.stick_main, R.drawable.stick_main_pressed,
+            overlayJoysticks.add(initializeOverlayJoystick(getContext(), R.drawable.joystick_range,
+                    R.drawable.joystick, R.drawable.joystick_depressed,
                     StickType.STICK_L, ButtonType.STICK_L, orientation));
                     StickType.STICK_L, ButtonType.STICK_L, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle12", true)) {
         if (mPreferences.getBoolean("buttonToggle12", true)) {
-            overlayJoysticks.add(initializeOverlayJoystick(getContext(), R.drawable.stick_main_range,
-                    R.drawable.stick_main, R.drawable.stick_main_pressed, StickType.STICK_R, ButtonType.STICK_R, orientation));
+            overlayJoysticks.add(initializeOverlayJoystick(getContext(), R.drawable.joystick_range,
+                    R.drawable.joystick, R.drawable.joystick_depressed, StickType.STICK_R, ButtonType.STICK_R, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle13", true)) {
         if (mPreferences.getBoolean("buttonToggle13", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_a,
-                    R.drawable.button_a, ButtonType.BUTTON_HOME, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_home,
+                    R.drawable.facebutton_home_depressed, ButtonType.BUTTON_HOME, orientation));
         }
         }
         if (mPreferences.getBoolean("buttonToggle14", true)) {
         if (mPreferences.getBoolean("buttonToggle14", true)) {
-            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.button_a,
-                    R.drawable.button_a, ButtonType.BUTTON_CAPTURE, orientation));
+            overlayButtons.add(initializeOverlayButton(getContext(), R.drawable.facebutton_screenshot,
+                    R.drawable.facebutton_screenshot_depressed, ButtonType.BUTTON_CAPTURE, orientation));
         }
         }
     }
     }
 
 

+ 1 - 1
src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlayDrawableDpad.java

@@ -178,7 +178,7 @@ public final class InputOverlayDrawableDpad {
         // Pressed up right
         // Pressed up right
         if (mUpButtonState && !mLeftButtonState && mRightButtonState) {
         if (mUpButtonState && !mLeftButtonState && mRightButtonState) {
             canvas.save();
             canvas.save();
-            canvas.rotate(180, px, py);
+            canvas.rotate(90, px, py);
             mPressedTwoDirectionsStateBitmap.draw(canvas);
             mPressedTwoDirectionsStateBitmap.draw(canvas);
             canvas.restore();
             canvas.restore();
             return;
             return;

BIN
src/android/app/src/main/res/drawable-hdpi/button_a.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_a_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_b.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_b_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_l.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_l_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_r.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_r_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_select.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_select_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_start.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_start_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_x.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_x_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_y.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_y_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_zl.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_zl_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_zr.png


BIN
src/android/app/src/main/res/drawable-hdpi/button_zr_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/dpad.png


BIN
src/android/app/src/main/res/drawable-hdpi/dpad_pressed_one_direction.png


BIN
src/android/app/src/main/res/drawable-hdpi/dpad_pressed_two_directions.png


BIN
src/android/app/src/main/res/drawable-hdpi/stick_c.png


BIN
src/android/app/src/main/res/drawable-hdpi/stick_c_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/stick_c_range.png


BIN
src/android/app/src/main/res/drawable-hdpi/stick_main.png


BIN
src/android/app/src/main/res/drawable-hdpi/stick_main_pressed.png


BIN
src/android/app/src/main/res/drawable-hdpi/stick_main_range.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_a.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_a_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_b.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_b_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_l.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_l_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_r.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_r_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_select.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_select_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_start.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_start_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_x.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_x_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_y.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_y_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_zl.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_zl_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_zr.png


BIN
src/android/app/src/main/res/drawable-xhdpi/button_zr_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/dpad.png


BIN
src/android/app/src/main/res/drawable-xhdpi/dpad_pressed_one_direction.png


BIN
src/android/app/src/main/res/drawable-xhdpi/dpad_pressed_two_directions.png


BIN
src/android/app/src/main/res/drawable-xhdpi/stick_c.png


BIN
src/android/app/src/main/res/drawable-xhdpi/stick_c_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/stick_c_range.png


BIN
src/android/app/src/main/res/drawable-xhdpi/stick_main.png


BIN
src/android/app/src/main/res/drawable-xhdpi/stick_main_pressed.png


BIN
src/android/app/src/main/res/drawable-xhdpi/stick_main_range.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_a.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_a_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_b.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_b_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_l.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_l_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_r.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_r_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_select.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_select_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_start.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_start_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_x.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_x_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_y.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_y_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_zl.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_zl_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_zr.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/button_zr_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/dpad.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/dpad_pressed_one_direction.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/dpad_pressed_two_directions.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/stick_c.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/stick_c_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/stick_c_range.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/stick_main.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/stick_main_pressed.png


BIN
src/android/app/src/main/res/drawable-xxhdpi/stick_main_range.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_a.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_a_pressed.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_b.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_b_pressed.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_l.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_l_pressed.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_r.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_r_pressed.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_select.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_select_pressed.png


BIN
src/android/app/src/main/res/drawable-xxxhdpi/button_start.png


Некоторые файлы не были показаны из-за большого количества измененных файлов