Theoretically this will add live control over frame skipping
This commit is contained in:
parent
8db0f80602
commit
5ca3b4e3dc
|
@ -40,6 +40,8 @@ extern "C"
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_setupMic(JNIEnv *env,jobject obj,jobject sip) __attribute__((visibility("default")));
|
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_setupMic(JNIEnv *env,jobject obj,jobject sip) __attribute__((visibility("default")));
|
||||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vmuSwap(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
|
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_vmuSwap(JNIEnv *env,jobject obj) __attribute__((visibility("default")));
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames) __attribute__((visibility("default")));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -319,6 +321,11 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_kcode(JNIEnv * env, jobje
|
||||||
env->ReleaseIntArrayElements(jy, jy_body, 0);
|
env->ReleaseIntArrayElements(jy, jy_body, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames)
|
||||||
|
{
|
||||||
|
settings.pvr.ta_skip = frames;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendinit(JNIEnv * env, jobject obj, jint w,jint h)
|
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendinit(JNIEnv * env, jobject obj, jint w,jint h)
|
||||||
{
|
{
|
||||||
screen_width = w;
|
screen_width = w;
|
||||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
|
@ -44,6 +44,9 @@ public class GL2JNIActivity extends Activity {
|
||||||
int[] name = { -1, -1, -1, -1 };
|
int[] name = { -1, -1, -1, -1 };
|
||||||
float[] globalLS_X = new float[4], globalLS_Y = new float[4],
|
float[] globalLS_X = new float[4], globalLS_Y = new float[4],
|
||||||
previousLS_X = new float[4], previousLS_Y = new float[4];
|
previousLS_X = new float[4], previousLS_Y = new float[4];
|
||||||
|
|
||||||
|
int userFrames;
|
||||||
|
private boolean frameskipping = false;
|
||||||
|
|
||||||
public static HashMap<Integer, String> deviceId_deviceDescriptor = new HashMap<Integer, String>();
|
public static HashMap<Integer, String> deviceId_deviceDescriptor = new HashMap<Integer, String>();
|
||||||
public static HashMap<String, Integer> deviceDescriptor_PlayerNum = new HashMap<String, Integer>();
|
public static HashMap<String, Integer> deviceDescriptor_PlayerNum = new HashMap<String, Integer>();
|
||||||
|
@ -134,6 +137,25 @@ public class GL2JNIActivity extends Activity {
|
||||||
popUp.dismiss();
|
popUp.dismiss();
|
||||||
}
|
}
|
||||||
}), params);
|
}), params);
|
||||||
|
View frameskip;
|
||||||
|
if (!frameskipping) {
|
||||||
|
frameskip = addbut(R.drawable.fast_forward, new OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
JNIdc.frameskip((userFrames + 1) * 5);
|
||||||
|
popUp.dismiss();
|
||||||
|
frameskipping = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
frameskip = addbut(R.drawable.normal_play, new OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
JNIdc.frameskip(userFrames);
|
||||||
|
popUp.dismiss();
|
||||||
|
frameskipping = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
hlay.addView(frameskip, params);
|
||||||
|
|
||||||
// layout.addView(hlay,params);
|
// layout.addView(hlay,params);
|
||||||
popUp.setContentView(hlay);
|
popUp.setContentView(hlay);
|
||||||
|
@ -145,6 +167,7 @@ public class GL2JNIActivity extends Activity {
|
||||||
moga.onCreate(this);
|
moga.onCreate(this);
|
||||||
|
|
||||||
prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
userFrames = prefs.getInt("frame_skip", 0);
|
||||||
createPopup();
|
createPopup();
|
||||||
/*
|
/*
|
||||||
* try { //int rID =
|
* try { //int rID =
|
||||||
|
|
|
@ -25,6 +25,8 @@ public class JNIdc
|
||||||
|
|
||||||
public static native void setupMic(Object sip);
|
public static native void setupMic(Object sip);
|
||||||
public static native void vmuSwap();
|
public static native void vmuSwap();
|
||||||
|
|
||||||
|
public static native void frameskip(int frames);
|
||||||
|
|
||||||
public static void show_osd() {
|
public static void show_osd() {
|
||||||
JNIdc.vjoy(13, 1,0,0,0);
|
JNIdc.vjoy(13, 1,0,0,0);
|
||||||
|
|
Loading…
Reference in New Issue