Add runtime configuration for toggling the LimitPFS option
There ya go @hooby3dfx. I hope it’s everything you dreamed it would be ;)
This commit is contained in:
parent
94879b0cac
commit
7cd08c13ed
|
@ -43,6 +43,7 @@ extern "C"
|
|||
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_frameskip(JNIEnv *env,jobject obj, jint frames) __attribute__((visibility("default")));
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_widescreen(JNIEnv *env,jobject obj, jint stretch) __attribute__((visibility("default")));
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter) __attribute__((visibility("default")));
|
||||
};
|
||||
|
||||
|
||||
|
@ -332,6 +333,11 @@ JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_widescreen(JNIEnv *env,jo
|
|||
settings.rend.WideScreen = stretch;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_limitfps(JNIEnv *env,jobject obj, jint limiter)
|
||||
{
|
||||
settings.aica.LimitFPS = limiter;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_reicast_emulator_JNIdc_rendinit(JNIEnv * env, jobject obj, jint w,jint h)
|
||||
{
|
||||
screen_width = w;
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.3 KiB |
|
@ -51,6 +51,7 @@ public class GL2JNIActivity extends Activity {
|
|||
private String home_directory = sdcard + "/dc";
|
||||
private int frameskip;
|
||||
private boolean widescreen;
|
||||
private boolean limitframes;
|
||||
|
||||
public static HashMap<Integer, String> deviceId_deviceDescriptor = new HashMap<Integer, String>();
|
||||
public static HashMap<String, Integer> deviceDescriptor_PlayerNum = new HashMap<String, Integer>();
|
||||
|
@ -218,6 +219,25 @@ public class GL2JNIActivity extends Activity {
|
|||
if (frameskip <= 0) {
|
||||
frames_down.setEnabled(false);
|
||||
}
|
||||
View framelimit;
|
||||
if (!limitframes) {
|
||||
framelimit = addbut(R.drawable.frames_limit_on, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
JNIdc.limitfps(1);
|
||||
popUpConfig.dismiss();
|
||||
limitframes = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
framelimit = addbut(R.drawable.frames_limit_off, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
JNIdc.limitfps(0);
|
||||
popUpConfig.dismiss();
|
||||
limitframes = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
hlay.addView(framelimit, params);
|
||||
hlay.addView(addbut(R.drawable.up, new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
popUpConfig.dismiss();
|
||||
|
|
|
@ -28,6 +28,7 @@ public class JNIdc
|
|||
|
||||
public static native void frameskip(int frames);
|
||||
public static native void widescreen(int stretch);
|
||||
public static native void limitfps(int stretch);
|
||||
|
||||
public static void show_osd() {
|
||||
JNIdc.vjoy(13, 1,0,0,0);
|
||||
|
|
Loading…
Reference in New Issue