aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorcraigsc2020-01-11 12:08:21 -0800
committercraigsc2020-01-11 12:08:21 -0800
commit3dd4fb16f017a8eab5c6c11fd119a397b457866e (patch)
tree5b80b5c5038d8577c2d674a5a4742b335deca515 /backends
parentf9f81ea9baecb714f26cf1c17a1b0ae58431467b (diff)
parent5893672b80f00fced33c42e63471d68ba47d7dd4 (diff)
downloadscummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.tar.gz
scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.tar.bz2
scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/windowed.h6
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java23
2 files changed, 18 insertions, 11 deletions
diff --git a/backends/graphics/windowed.h b/backends/graphics/windowed.h
index 40fbe8baf7..99115275de 100644
--- a/backends/graphics/windowed.h
+++ b/backends/graphics/windowed.h
@@ -405,9 +405,9 @@ private:
width = fracToInt(height * displayAspect);
}
}
-
- drawRect.left = ((_windowWidth - width) / 2) + _gameScreenShakeXOffset;
- drawRect.top = ((_windowHeight - height) / 2) + _gameScreenShakeYOffset;
+
+ drawRect.left = ((_windowWidth - width) / 2) + _gameScreenShakeXOffset * width / getWidth();
+ drawRect.top = ((_windowHeight - height) / 2) + _gameScreenShakeYOffset * height / getHeight();
drawRect.setWidth(width);
drawRect.setHeight(height);
}
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index f55639f60b..20fa482b66 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -21,6 +21,7 @@ import android.view.View;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
import android.view.MotionEvent;
+import android.view.PointerIcon;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.Toast;
@@ -403,13 +404,19 @@ public class ScummVMActivity extends Activity {
}
private void showMouseCursor(boolean show) {
- /* Currently hiding the system mouse cursor is only
- supported on OUYA. If other systems provide similar
- intents, please add them here as well */
- Intent intent =
- new Intent(show?
- "tv.ouya.controller.action.SHOW_CURSOR" :
- "tv.ouya.controller.action.HIDE_CURSOR");
- sendBroadcast(intent);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ SurfaceView main_surface = (SurfaceView)findViewById(R.id.main_surface);
+ int type = show ? PointerIcon.TYPE_DEFAULT : PointerIcon.TYPE_NULL;
+ main_surface.setPointerIcon(PointerIcon.getSystemIcon(this, type));
+ } else {
+ /* Currently hiding the system mouse cursor is only
+ supported on OUYA. If other systems provide similar
+ intents, please add them here as well */
+ Intent intent =
+ new Intent(show?
+ "tv.ouya.controller.action.SHOW_CURSOR" :
+ "tv.ouya.controller.action.HIDE_CURSOR");
+ sendBroadcast(intent);
+ }
}
}