mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 14:54:10 +00:00
Merge pull request #392 from lioncash/master
[Android] Clean up RetroActivity.
This commit is contained in:
commit
3f75bae4e5
@ -17,15 +17,13 @@ public final class RetroActivity extends NativeActivity
|
|||||||
private long lastTimestamp = 0;
|
private long lastTimestamp = 0;
|
||||||
private SurfaceTexture texture;
|
private SurfaceTexture texture;
|
||||||
|
|
||||||
static {
|
// Static constructor
|
||||||
|
static
|
||||||
|
{
|
||||||
|
Log.i("RetroActivity", "Creating RetroActivity");
|
||||||
System.loadLibrary("retroarch-activity");
|
System.loadLibrary("retroarch-activity");
|
||||||
}
|
}
|
||||||
|
|
||||||
public RetroActivity() {
|
|
||||||
super();
|
|
||||||
Log.i("RetroActivity", "Creating MyNativeActivity");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onCameraStart()
|
public void onCameraStart()
|
||||||
{
|
{
|
||||||
mCamera.startPreview();
|
mCamera.startPreview();
|
||||||
@ -59,7 +57,9 @@ public final class RetroActivity extends NativeActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ret = true;
|
ret = true;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -67,7 +67,6 @@ public final class RetroActivity extends NativeActivity
|
|||||||
public void onCameraFree()
|
public void onCameraFree()
|
||||||
{
|
{
|
||||||
mCamera.release();
|
mCamera.release();
|
||||||
mCamera = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@ -79,22 +78,14 @@ public final class RetroActivity extends NativeActivity
|
|||||||
mCamera.setPreviewTexture(texture);
|
mCamera.setPreviewTexture(texture);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
mCamera.setPreviewDisplay(null);
|
mCamera.setPreviewDisplay(null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy()
|
public void onDestroy()
|
||||||
{
|
{
|
||||||
UserPreferences.readbackConfigFile(this);
|
UserPreferences.readbackConfigFile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLowMemory()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTrimMemory(int level)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user