mirror of
https://github.com/libretro/RetroArch
synced 2025-01-18 13:23:40 +00:00
(Android) Remove more unnecessary files / simplify fileio/Option.java
This commit is contained in:
parent
87cec1a077
commit
1195e92850
@ -1,93 +0,0 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class com_retroarch_rruntime */
|
||||
|
||||
#ifndef _Included_com_retroarch_rruntime
|
||||
#define _Included_com_retroarch_rruntime
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: load_game
|
||||
* Signature: (Ljava/lang/String;I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_load_1game
|
||||
(JNIEnv *, jclass, jstring, jint);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: run_frame
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_com_retroarch_rruntime_run_1frame
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: startup
|
||||
* Signature: (Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_startup
|
||||
(JNIEnv *, jclass, jstring);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: deinit
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_deinit
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: load_state
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_load_1state
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: save_state
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_save_1state
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: settings_change
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_settings_1change
|
||||
(JNIEnv *, jclass, jint);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: settings_set_defaults
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_settings_1set_1defaults
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: set_window
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_set_window
|
||||
(JNIEnv *, jclass, jobject, jobject);
|
||||
|
||||
/*
|
||||
* Class: com_retroarch_rruntime
|
||||
* Method: free_window
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_free_window
|
||||
(JNIEnv *, jclass, jobject, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -43,7 +43,7 @@ public class FileArrayAdapter extends ArrayAdapter<Option> implements SectionInd
|
||||
for (int x = 0; x < size; x++) {
|
||||
Option o = items.get(x);
|
||||
|
||||
String ch = o.getName().substring(0, 1);
|
||||
String ch = o.name.substring(0, 1);
|
||||
|
||||
ch = ch.toUpperCase();
|
||||
|
||||
@ -82,11 +82,11 @@ public class FileArrayAdapter extends ArrayAdapter<Option> implements SectionInd
|
||||
|
||||
if(t1!=null)
|
||||
{
|
||||
t1.setText(o.getName());
|
||||
t1.setText(o.name);
|
||||
}
|
||||
if(t2!=null)
|
||||
{
|
||||
t2.setText(o.getData());
|
||||
t2.setText(o.data);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -193,13 +193,13 @@ public class FileChooser extends Activity
|
||||
{
|
||||
int pos = arg0.getPositionForView(arg1);
|
||||
Option o = adapter.getItem(pos);
|
||||
if(o.getData().equalsIgnoreCase("folder")||o.getData().equalsIgnoreCase("parent directory"))
|
||||
if(o.data.equalsIgnoreCase("folder")|| o.data.equalsIgnoreCase("parent directory"))
|
||||
{
|
||||
if (o.getPath() != null)
|
||||
if (o.path != null)
|
||||
{
|
||||
currentDir = new File(o.getPath());
|
||||
currentDir = new File(o.path);
|
||||
fill(currentDir);
|
||||
_dirStack.push(o.getPath());
|
||||
_dirStack.push(o.path);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -226,11 +226,11 @@ public class FileChooser extends Activity
|
||||
|
||||
private void onFileClick(Option o)
|
||||
{
|
||||
Toast.makeText(this, "Loading: "+o.getName() + "...", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "Loading: "+ o.name + "...", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Intent intent=new Intent();
|
||||
intent.putExtra("PATH", o.getPath());
|
||||
intent.putExtra("NAME", o.getName());
|
||||
intent.putExtra("PATH", o.path);
|
||||
intent.putExtra("NAME", o.name);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ package com.retroarch.fileio;
|
||||
|
||||
public class Option implements Comparable<Option>
|
||||
{
|
||||
private String name;
|
||||
private String data;
|
||||
private String path;
|
||||
public String name;
|
||||
public String data;
|
||||
public String path;
|
||||
|
||||
public Option(String n,String d,String p)
|
||||
{
|
||||
@ -12,22 +12,11 @@ public class Option implements Comparable<Option>
|
||||
data = d;
|
||||
path = p;
|
||||
}
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public String getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
public String getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public int compareTo(Option o) {
|
||||
public int compareTo(Option o)
|
||||
{
|
||||
if(this.name != null)
|
||||
return this.name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||
return this.name.toLowerCase().compareTo(o.name.toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user