(Android) Add rruntime.java

This commit is contained in:
Twinaphex 2012-09-17 02:16:23 +02:00
parent 6c05196e4f
commit 511e94dbd7
4 changed files with 97 additions and 6 deletions

View File

@ -1,3 +1,19 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.retroarch;
import android.media.AudioFormat;

View File

@ -1,3 +1,19 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.retroarch;
import com.retroarch.R;
@ -17,11 +33,6 @@ import android.os.Bundle;
public class main extends Activity
{
static
{
System.loadLibrary("retroarch");
}
private GLSurfaceView ctx_gl;
@Override
@ -84,4 +95,4 @@ class rgl_context extends GLSurfaceView
setEGLContextClientVersion(2);
setRenderer(new rgl());
}
}
}

View File

@ -1,3 +1,19 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.retroarch;
import java.nio.ByteBuffer;

View File

@ -0,0 +1,48 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.retroarch;
public class RRuntime
{
static
{
System.loadLibrary("retroarch");
}
private RRuntime()
{
}
public static native void load_game(final String j_path, final int j_extract_zip_mode);
public static native boolean run_frame();
public static native startup(String j_config_path);
public static native int loadRom(final String fileName);
public static native void deinit();
public static native void load_state();
public static native void save_state();
public static native void settings_change(final int j_setting);
public static native void settings_set_defaults();
}