summaryrefslogtreecommitdiff
path: root/Source/Android/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-11-15 00:11:09 -0500
committerLioncash <mathew1800@gmail.com>2014-11-17 13:44:49 -0500
commitb94dbca160d7a7d0308d4e8d4ff7613f9e6238b1 (patch)
tree8f2e562e6b311cac31531df17bbf1a4f346c81ba /Source/Android/src
parentaa2fc1f66b768420fcb6958948572f0faa89986d (diff)
Host: Kill off GetRenderWindowSize
Diffstat (limited to 'Source/Android/src')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java8
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/emulation/EmulationActivity.java67
2 files changed, 9 insertions, 66 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
index 769595c1b4..f3317c9e8c 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/NativeLibrary.java
@@ -111,14 +111,6 @@ public final class NativeLibrary
public static native void SetFilename(String filename);
/**
- * Sets the dimensions of the rendering window.
- *
- * @param width The new width of the rendering window (in pixels).
- * @param height The new height of the rendering window (in pixels).
- */
- public static native void SetDimensions(int width, int height);
-
- /**
* Gets the embedded banner within the given ISO/ROM.
*
* @param filename the file path to the ISO/ROM.
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/emulation/EmulationActivity.java b/Source/Android/src/org/dolphinemu/dolphinemu/emulation/EmulationActivity.java
index fb96bec559..41c523ed68 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/emulation/EmulationActivity.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/emulation/EmulationActivity.java
@@ -15,19 +15,22 @@ import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.util.DisplayMetrics;
-import android.view.*;
+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.View;
+import android.view.Window;
import android.view.WindowManager.LayoutParams;
import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.settings.input.InputConfigFragment;
-import org.dolphinemu.dolphinemu.utils.EGLHelper;
import java.util.List;
-import javax.microedition.khronos.opengles.GL10;
-
/**
* This is the activity where all of the emulation handling happens.
* This activity is responsible for displaying the SurfaceView that we render to.
@@ -36,8 +39,6 @@ public final class EmulationActivity extends Activity
{
private boolean Running;
private boolean IsActionBarHidden = false;
- private float screenWidth;
- private float screenHeight;
private SharedPreferences sharedPrefs;
@Override
@@ -45,10 +46,7 @@ public final class EmulationActivity extends Activity
{
super.onCreate(savedInstanceState);
- // Retrieve screen dimensions.
- DisplayMetrics dm = getResources().getDisplayMetrics();
- this.screenHeight = dm.heightPixels;
- this.screenWidth = dm.widthPixels;
+ sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
// Request window features for the emulation view.
getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON);
@@ -60,18 +58,6 @@ public final class EmulationActivity extends Activity
actionBarBackground.setAlpha(175);
getActionBar().setBackgroundDrawable(actionBarBackground);
- // Set the native rendering screen width/height.
- //
- // 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.
- // This bug is fixed in Qualcomm driver v53
- // Mali isn't affected by this bug.
- sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
- if (hasBuggedDriverDimensions())
- NativeLibrary.SetDimensions((int)screenHeight, (int)screenWidth);
- else
- NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
-
// Get the intent passed from the GameList when the game
// was selected. This is so the path of the game can be retrieved
// and set on the native side of the code so the emulator can actually
@@ -327,39 +313,4 @@ public final class EmulationActivity extends Activity
return true;
}
-
- // For handling bugged driver dimensions (applies mainly to Qualcomm devices)
- private boolean hasBuggedDriverDimensions()
- {
- final EGLHelper eglHelper = new EGLHelper(EGLHelper.EGL_OPENGL_ES2_BIT);
- final String vendor = eglHelper.getGL().glGetString(GL10.GL_VENDOR);
- final String version = eglHelper.getGL().glGetString(GL10.GL_VERSION);
- final String renderer = eglHelper.getGL().glGetString(GL10.GL_RENDERER);
-
- if (sharedPrefs.getString("gpuPref", "Software Rendering").equals("OGL")
- && eglHelper.supportsGLES3()
- && vendor.equals("Qualcomm")
- && renderer.equals("Adreno (TM) 3"))
- {
- final int start = version.indexOf("V@") + 2;
- final StringBuilder versionBuilder = new StringBuilder();
-
- for (int i = start; i < version.length(); i++)
- {
- char c = version.charAt(i);
-
- // End of numeric portion of version string.
- if (c == ' ')
- break;
-
- versionBuilder.append(c);
- }
-
- if (Float.parseFloat(versionBuilder.toString()) < 53.0f)
- return true;
- }
-
-
- return false;
- }
}