mirror of
https://github.com/mauiaaron/apple2.git
synced 2026-04-24 06:23:24 +00:00
Refactor to not use video_backend in so many places
This commit is contained in:
@@ -356,13 +356,13 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeChooseDisk(JNIEnv *env, jcl
|
||||
if (disk6_insert(drive, gzPath, ro)) {
|
||||
char *diskImageUnreadable = "Disk Image Unreadable";
|
||||
unsigned int cols = strlen(diskImageUnreadable);
|
||||
video_backend->animation_showMessage(diskImageUnreadable, cols, 1);
|
||||
video_animations->animation_showMessage(diskImageUnreadable, cols, 1);
|
||||
} else {
|
||||
video_backend->animation_showDiskChosen(drive);
|
||||
video_animations->animation_showDiskChosen(drive);
|
||||
}
|
||||
ASPRINTF_FREE(gzPath);
|
||||
} else {
|
||||
video_backend->animation_showDiskChosen(drive);
|
||||
video_animations->animation_showDiskChosen(drive);
|
||||
}
|
||||
(*env)->ReleaseStringUTFChars(env, jPath, path);
|
||||
}
|
||||
|
||||
@@ -83,20 +83,20 @@ void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetCurrentTouchDevice(JN
|
||||
keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
joydriver_setTouchJoystickOwnsScreen(true);
|
||||
joydriver_setTouchVariant(EMULATED_JOYSTICK);
|
||||
video_backend->animation_showTouchJoystick();
|
||||
video_animations->animation_showTouchJoystick();
|
||||
break;
|
||||
|
||||
case TOUCH_DEVICE_JOYSTICK_KEYPAD:
|
||||
keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
joydriver_setTouchJoystickOwnsScreen(true);
|
||||
joydriver_setTouchVariant(EMULATED_KEYPAD);
|
||||
video_backend->animation_showTouchJoystick();
|
||||
video_animations->animation_showTouchJoystick();
|
||||
break;
|
||||
|
||||
case TOUCH_DEVICE_KEYBOARD:
|
||||
keydriver_setTouchKeyboardOwnsScreen(true);
|
||||
joydriver_setTouchJoystickOwnsScreen(false);
|
||||
video_backend->animation_showTouchKeyboard();
|
||||
video_animations->animation_showTouchKeyboard();
|
||||
break;
|
||||
|
||||
case TOUCH_DEVICE_NONE:
|
||||
@@ -137,8 +137,8 @@ void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchMenuEnabled(JNIE
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetShowDiskOperationAnimation(JNIEnv *env, jclass cls, jboolean enabled) {
|
||||
LOG("enabled : %d", enabled);
|
||||
if (video_backend && video_backend->animation_setEnableShowTrackSector) {
|
||||
video_backend->animation_setEnableShowTrackSector(enabled);
|
||||
if (video_animations && video_animations->animation_setEnableShowTrackSector) {
|
||||
video_animations->animation_setEnableShowTrackSector(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,8 +305,8 @@ void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetCPUSpeed(JNIEnv *env,
|
||||
cpu_scale_factor = CPU_SCALE_SLOWEST;
|
||||
}
|
||||
|
||||
if (video_backend->animation_showCPUSpeed) {
|
||||
video_backend->animation_showCPUSpeed();
|
||||
if (video_animations->animation_showCPUSpeed) {
|
||||
video_animations->animation_showCPUSpeed();
|
||||
}
|
||||
|
||||
timing_initialize();
|
||||
|
||||
Reference in New Issue
Block a user