mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 14:07:50 +00:00
Fixed bug 2816 - [patch] Android: Expose screen refresh rate
Jonas Kulla Display::getRefreshRate() is available on all API levels.
This commit is contained in:
@@ -392,7 +392,7 @@ public class SDLActivity extends Activity {
|
||||
public static native void nativeQuit();
|
||||
public static native void nativePause();
|
||||
public static native void nativeResume();
|
||||
public static native void onNativeResize(int x, int y, int format);
|
||||
public static native void onNativeResize(int x, int y, int format, float rate);
|
||||
public static native int onNativePadDown(int device_id, int keycode);
|
||||
public static native int onNativePadUp(int device_id, int keycode);
|
||||
public static native void onNativeJoy(int device_id, int axis,
|
||||
@@ -1041,7 +1041,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
SDLActivity.onNativeResize(width, height, sdlFormat);
|
||||
SDLActivity.onNativeResize(width, height, sdlFormat, mDisplay.getRefreshRate());
|
||||
Log.v("SDL", "Window size:" + width + "x"+height);
|
||||
|
||||
// Set mIsSurfaceReady to 'true' *before* making a call to handleResume
|
||||
|
||||
Reference in New Issue
Block a user