(Android) Now starts up the native activity correctly when a ROM has been
selected - arguments still need to be passed and right now it's just doing some glClears - however - POC more or less works - now to make it run Rarch
This commit is contained in:
parent
b89e0e90c9
commit
4f8a040411
|
@ -5,7 +5,7 @@ include $(CLEAR_VARS)
|
||||||
|
|
||||||
APP_OPTIM := debug
|
APP_OPTIM := debug
|
||||||
|
|
||||||
LOCAL_MODULE := retroarch
|
LOCAL_MODULE := retroarch-activity
|
||||||
|
|
||||||
RARCH_PATH := ../../..
|
RARCH_PATH := ../../..
|
||||||
LOCAL_SRC_FILES = $(RARCH_PATH)/retroarch.c \
|
LOCAL_SRC_FILES = $(RARCH_PATH)/retroarch.c \
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
<application
|
<application
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name">
|
||||||
<activity
|
<activity android:name="phoenix" android:label="@string/app_name" >
|
||||||
android:name=".main"
|
|
||||||
android:label="@string/app_name" >
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
@ -20,10 +18,8 @@
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:label="@string/app_name" android:name="com.retroarch.fileio.FileChooser" />
|
<activity android:label="@string/app_name" android:name="com.retroarch.fileio.FileChooser" />
|
||||||
<activity android:label="@string/app_name" android:name="rombrowser" />
|
<activity android:label="@string/app_name" android:name="rombrowser" />
|
||||||
<!--
|
<activity android:name="android.app.NativeActivity">
|
||||||
<activity android:name="android.app.NativeActivity" android:label="retroarch">
|
<meta-data android:name="android.app.lib_name" android:value="retroarch-activity" />
|
||||||
<meta-data android:name="android.app.lib_name" android:value="retroarch" />
|
|
||||||
</activity>
|
</activity>
|
||||||
-->
|
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.retroarch.R;
|
||||||
import com.retroarch.fileio.FileChooser;
|
import com.retroarch.fileio.FileChooser;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.NativeActivity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
|
@ -27,7 +28,7 @@ import android.view.MenuItem;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
public class main extends Activity
|
public class phoenix extends Activity
|
||||||
{
|
{
|
||||||
static private final int ACTIVITY_LOAD_ROM = 0;
|
static private final int ACTIVITY_LOAD_ROM = 0;
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ public class main extends Activity
|
||||||
break;
|
break;
|
||||||
case R.id.open:
|
case R.id.open:
|
||||||
Toast.makeText(this, "Select a ROM image from the Filebrowser.", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Select a ROM image from the Filebrowser.", Toast.LENGTH_SHORT).show();
|
||||||
Intent myIntent = new Intent(main.this, FileChooser.class);
|
Intent myIntent = new Intent(this, FileChooser.class);
|
||||||
startActivityForResult(myIntent, ACTIVITY_LOAD_ROM);
|
startActivityForResult(myIntent, ACTIVITY_LOAD_ROM);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -70,11 +71,9 @@ public class main extends Activity
|
||||||
{
|
{
|
||||||
if(requestCode == ACTIVITY_LOAD_ROM)
|
if(requestCode == ACTIVITY_LOAD_ROM)
|
||||||
{
|
{
|
||||||
/*
|
Intent myIntent = new Intent(this, NativeActivity.class);
|
||||||
Intent myIntent = new Intent(this, NativeActivity.class);
|
startActivity(myIntent);
|
||||||
startActivity(myIntent);
|
/*
|
||||||
*/
|
|
||||||
/*
|
|
||||||
rruntime.settings_set_defaults();
|
rruntime.settings_set_defaults();
|
||||||
rruntime.load_game(data.getStringExtra("PATH"), 0);
|
rruntime.load_game(data.getStringExtra("PATH"), 0);
|
||||||
|
|
Loading…
Reference in New Issue