mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
-Fixed some various coding standard issues from previous commit.
This commit is contained in:
@ -11,8 +11,8 @@ android {
|
||||
abortOnError false
|
||||
|
||||
//Uncomment disable lines for test builds...
|
||||
//disable 'MissingTranslation'
|
||||
//disable 'ExtraTranslation'
|
||||
disable 'MissingTranslation'
|
||||
disable 'ExtraTranslation'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
|
@ -102,11 +102,14 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(View view, Bundle savedInstanceState)
|
||||
{
|
||||
Button doneButton = (Button) view.findViewById(R.id.done_control_config);
|
||||
doneButton.setOnClickListener(new View.OnClickListener() {
|
||||
doneButton.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
public void onClick(View v)
|
||||
{
|
||||
stopConfiguringControls();
|
||||
}
|
||||
});
|
||||
@ -242,12 +245,14 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||
mInputOverlay.setIsInEditMode(true);
|
||||
}
|
||||
|
||||
public void stopConfiguringControls() {
|
||||
public void stopConfiguringControls()
|
||||
{
|
||||
getView().findViewById(R.id.done_control_config).setVisibility(View.GONE);
|
||||
mInputOverlay.setIsInEditMode(false);
|
||||
}
|
||||
|
||||
public boolean isConfiguringControls() {
|
||||
public boolean isConfiguringControls()
|
||||
{
|
||||
return mInputOverlay.isInEditMode();
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event)
|
||||
{
|
||||
if(isInEditMode()) {
|
||||
if (isInEditMode())
|
||||
{
|
||||
return onTouchWhileEditing(v, event);
|
||||
}
|
||||
|
||||
@ -131,13 +132,17 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// If a pointer enters the bounds of a button, press that button.
|
||||
if (button.getBounds().contains((int)event.getX(pointerIndex), (int)event.getY(pointerIndex)))
|
||||
{
|
||||
NativeLibrary.onGamePadEvent(NativeLibrary.TouchScreenDevice, button.getId(), ButtonState.PRESSED);
|
||||
}
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
// If a pointer ends, release the button it was pressing.
|
||||
if (button.getBounds().contains((int)event.getX(pointerIndex), (int)event.getY(pointerIndex)))
|
||||
{
|
||||
NativeLibrary.onGamePadEvent(NativeLibrary.TouchScreenDevice, button.getId(), ButtonState.RELEASED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -150,8 +155,10 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
||||
float[] axises = joystick.getAxisValues();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, axisIDs[i], axises[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -393,7 +400,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
||||
mIsInEditMode = isInEditMode;
|
||||
}
|
||||
|
||||
public boolean isInEditMode() {
|
||||
public boolean isInEditMode()
|
||||
{
|
||||
return mIsInEditMode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user