Merge pull request #295 from hooby3dfx/master
Fix galaxy tab crash on back button, keep transparent popup background.
This commit is contained in:
commit
0f96a5a47b
|
@ -65,6 +65,7 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
mPrefs.edit().putString("prior_error", log).commit();
|
||||
error.printStackTrace();
|
||||
//Unreliable, but useful when possible
|
||||
//...or could lead us on wild goose chase
|
||||
MainActivity.this.finish();
|
||||
}
|
||||
}
|
||||
|
@ -81,8 +82,6 @@ public class MainActivity extends SlidingFragmentActivity implements
|
|||
loadInterface(savedInstanceState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void loadInterface(Bundle savedInstanceState) {
|
||||
|
|
|
@ -93,6 +93,7 @@ public class GL2JNIActivity extends Activity {
|
|||
prefs.getString("device_descriptor_player_3", null), 2);
|
||||
deviceDescriptor_PlayerNum.put(
|
||||
prefs.getString("device_descriptor_player_4", null), 3);
|
||||
deviceDescriptor_PlayerNum.remove(null);
|
||||
|
||||
boolean controllerTwoConnected = false;
|
||||
boolean controllerThreeConnected = false;
|
||||
|
@ -482,7 +483,6 @@ public class GL2JNIActivity extends Activity {
|
|||
boolean handle_key(Integer playerNum, int kc, boolean down) {
|
||||
if (playerNum == null || playerNum == -1)
|
||||
return false;
|
||||
|
||||
if (!moga.isActive[playerNum]) {
|
||||
|
||||
boolean rav = false;
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.app.Activity;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.os.Environment;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
|
@ -71,10 +72,11 @@ public class OnScreenMenu {
|
|||
|
||||
public FpsPopup(Context c) {
|
||||
super(c);
|
||||
setBackgroundDrawable(null);
|
||||
fpsText = new TextView(mContext);
|
||||
fpsText.setTextSize(TypedValue.COMPLEX_UNIT_SP, 32);
|
||||
fpsText.setTextColor(mContext.getResources().getColor(
|
||||
android.R.color.white));
|
||||
fpsText.setTextColor(Color.YELLOW);
|
||||
fpsText.setBackgroundColor(Color.TRANSPARENT);
|
||||
fpsText.setGravity(Gravity.CENTER);
|
||||
fpsText.setText("XX");
|
||||
setContentView(fpsText);
|
||||
|
@ -90,7 +92,7 @@ public class OnScreenMenu {
|
|||
|
||||
public DebugPopup(Context c) {
|
||||
super(c);
|
||||
|
||||
setBackgroundDrawable(null);
|
||||
int p = getPixelsFromDp(60, mContext);
|
||||
LayoutParams debugParams = new LayoutParams(p, p);
|
||||
|
||||
|
@ -157,7 +159,7 @@ public class OnScreenMenu {
|
|||
|
||||
public ConfigPopup(Context c) {
|
||||
super(c);
|
||||
|
||||
setBackgroundDrawable(null);
|
||||
int p = getPixelsFromDp(60, mContext);
|
||||
LayoutParams configParams = new LayoutParams(p, p);
|
||||
|
||||
|
@ -326,6 +328,7 @@ public class OnScreenMenu {
|
|||
|
||||
public VmuPopup(Context c) {
|
||||
super(c);
|
||||
setBackgroundDrawable(null);
|
||||
int pX = OnScreenMenu.getPixelsFromDp(80, mContext);
|
||||
int pY = OnScreenMenu.getPixelsFromDp(56, mContext);
|
||||
vparams = new LayoutParams(pX, pY);
|
||||
|
@ -344,6 +347,7 @@ public class OnScreenMenu {
|
|||
public class MainPopup extends PopupWindow {
|
||||
public MainPopup(Context c) {
|
||||
super(c);
|
||||
setBackgroundDrawable(null);
|
||||
int p = getPixelsFromDp(60, mContext);
|
||||
params = new LayoutParams(p, p);
|
||||
hlay = new LinearLayout(mContext);
|
||||
|
|
Loading…
Reference in New Issue