Attempt to scale the image a little further before giving up
This commit is contained in:
parent
d78294640f
commit
a2451a59a3
|
@ -56,7 +56,7 @@ public class InputModFragment extends Fragment {
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
parentActivity = getActivity();
|
parentActivity = getActivity();
|
||||||
|
|
||||||
Runtime.getRuntime().freeMemory();
|
Runtime.getRuntime().freeMemory();
|
||||||
System.gc();
|
System.gc();
|
||||||
|
|
||||||
|
@ -79,12 +79,13 @@ public class InputModFragment extends Fragment {
|
||||||
public void onItemSelected(AdapterView<?> parent, View view,
|
public void onItemSelected(AdapterView<?> parent, View view,
|
||||||
int pos, long id) {
|
int pos, long id) {
|
||||||
String selection = parent.getItemAtPosition(pos).toString();
|
String selection = parent.getItemAtPosition(pos).toString();
|
||||||
player = "_" + selection.substring(selection.lastIndexOf(" ") + 1,
|
player = "_"
|
||||||
selection.length());
|
+ selection.substring(selection.lastIndexOf(" ") + 1,
|
||||||
|
selection.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onNothingSelected(AdapterView<?> arg0) {
|
public void onNothingSelected(AdapterView<?> arg0) {
|
||||||
//player = "A";
|
// player = "A";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -371,9 +372,14 @@ public class InputModFragment extends Fragment {
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
} catch (OutOfMemoryError E) {
|
} catch (OutOfMemoryError E) {
|
||||||
E.printStackTrace();
|
if (sS == 2) {
|
||||||
Runtime.getRuntime().freeMemory();
|
sS = 4;
|
||||||
System.gc();
|
return getButtonImage(x, y);
|
||||||
|
} else {
|
||||||
|
E.printStackTrace();
|
||||||
|
Runtime.getRuntime().freeMemory();
|
||||||
|
System.gc();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return parentActivity.getResources().getDrawable(R.drawable.input);
|
return parentActivity.getResources().getDrawable(R.drawable.input);
|
||||||
}
|
}
|
||||||
|
@ -404,7 +410,8 @@ public class InputModFragment extends Fragment {
|
||||||
public boolean onKey(DialogInterface dialog, int keyCode,
|
public boolean onKey(DialogInterface dialog, int keyCode,
|
||||||
KeyEvent event) {
|
KeyEvent event) {
|
||||||
mPrefs.edit()
|
mPrefs.edit()
|
||||||
.putInt("controller" + player, event.getDeviceId()).commit();
|
.putInt("controller" + player, event.getDeviceId())
|
||||||
|
.commit();
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue