mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-04-01 18:33:29 +00:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
19d427ac6e
11
.apple2
11
.apple2
@ -1,11 +0,0 @@
|
||||
speed = 1.00
|
||||
altspeed = 4.00
|
||||
disk path = /usr/local/games/apple2/disks
|
||||
color = interpolated
|
||||
video = 1X
|
||||
volume = 8
|
||||
caps lock = 1
|
||||
joystick = joy keypad
|
||||
system path = /usr/local/games/apple2/rom
|
||||
pc joystick parms = 128 128 255 1 255 1
|
||||
keypad joystick parms = 8 1
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="" />
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
8
Android/.idea/gradle.xml
generated
8
Android/.idea/gradle.xml
generated
@ -5,7 +5,7 @@
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.10" />
|
||||
<option name="gradleJvm" value="1.7" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
@ -13,6 +13,12 @@
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="myModules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -12,10 +12,7 @@
|
||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugAndroidTestSources</task>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
@ -28,7 +25,7 @@
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
@ -50,6 +47,15 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
@ -57,6 +63,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
@ -64,34 +71,44 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.3.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.3.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/23.3.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-vector-drawable-23.3.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="animated-vector-drawable-23.3.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-23.3.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-23.3.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.3.0" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -27,8 +27,8 @@ android {
|
||||
applicationId "org.deadc0de.apple2ix.basic"
|
||||
minSdkVersion 10
|
||||
targetSdkVersion 23
|
||||
versionCode 15
|
||||
versionName "1.1.5"
|
||||
versionCode 18
|
||||
versionName "1.1.8"
|
||||
ndk {
|
||||
moduleName "apple2ix"
|
||||
}
|
||||
@ -37,5 +37,5 @@ android {
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:23.1.0'
|
||||
compile 'com.android.support:appcompat-v7:23.3.0'
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:fullBackupContent="@xml/a2backupscheme"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name" >
|
||||
|
||||
|
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Apple // emulator for *nix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*/
|
||||
|
||||
package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
public class VerticalSeekBar extends SeekBar {
|
||||
|
||||
public VerticalSeekBar(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public VerticalSeekBar(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
public VerticalSeekBar(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(h, w, oldh, oldw);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(heightMeasureSpec, widthMeasureSpec);
|
||||
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
|
||||
}
|
||||
|
||||
protected void onDraw(Canvas c) {
|
||||
c.rotate(-90);
|
||||
c.translate(-getHeight(), 0);
|
||||
super.onDraw(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (!isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
case MotionEvent.ACTION_UP:
|
||||
int i = 0;
|
||||
i = getMax() - (int) (getMax() * event.getY() / getHeight());
|
||||
setProgress(i);
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void setProgress(int progress) {
|
||||
super.setProgress(progress);
|
||||
onSizeChanged(getWidth(), getHeight(), 0, 0);
|
||||
}
|
||||
}
|
@ -82,6 +82,12 @@ public abstract class Apple2AbstractMenu implements Apple2MenuView {
|
||||
|
||||
public String getSummary(final Apple2Activity activity);
|
||||
|
||||
public String getPrefDomain();
|
||||
|
||||
public String getPrefKey();
|
||||
|
||||
public Object getPrefDefault();
|
||||
|
||||
public View getView(final Apple2Activity activity, View convertView);
|
||||
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked);
|
||||
|
@ -42,7 +42,6 @@ public class Apple2Activity extends Activity {
|
||||
private static volatile boolean DEBUG_STRICT = false;
|
||||
|
||||
private Apple2View mView = null;
|
||||
private Runnable mGraphicsInitializedRunnable = null;
|
||||
private Apple2SplashScreen mSplashScreen = null;
|
||||
private Apple2MainMenu mMainMenu = null;
|
||||
private Apple2SettingsMenu mSettingsMenu = null;
|
||||
@ -52,6 +51,7 @@ public class Apple2Activity extends Activity {
|
||||
private ArrayList<AlertDialog> mAlertDialogs = new ArrayList<AlertDialog>();
|
||||
|
||||
private AtomicBoolean mPausing = new AtomicBoolean(false);
|
||||
private AtomicBoolean mSwitchingToPortrait = new AtomicBoolean(false);
|
||||
|
||||
// non-null if we failed to load/link the native code ... likely we are running on some bizarre 'droid variant
|
||||
private static Throwable sNativeBarfedThrowable = null;
|
||||
@ -78,17 +78,13 @@ public class Apple2Activity extends Activity {
|
||||
|
||||
private static native String nativeLoadState(String path);
|
||||
|
||||
private static native void nativeEmulationResume();
|
||||
private static native boolean nativeEmulationResume();
|
||||
|
||||
private static native void nativeEmulationPause();
|
||||
private static native boolean nativeEmulationPause();
|
||||
|
||||
private static native void nativeOnQuit();
|
||||
|
||||
private static native void nativeReboot();
|
||||
|
||||
private static native void nativeChooseDisk(String path, boolean driveA, boolean readOnly);
|
||||
|
||||
private static native void nativeEjectDisk(boolean driveA);
|
||||
private static native void nativeReboot(int resetState);
|
||||
|
||||
public final static boolean isNativeBarfed() {
|
||||
return sNativeBarfed;
|
||||
@ -130,18 +126,26 @@ public class Apple2Activity extends Activity {
|
||||
int stereoBufferSize = DevicePropertyCalculator.getRecommendedBufferSize(this, /*isStereo:*/true);
|
||||
Log.d(TAG, "Device sampleRate:" + sampleRate + " mono bufferSize:" + monoBufferSize + " stereo bufferSize:" + stereoBufferSize);
|
||||
|
||||
String dataDir = Apple2DisksMenu.getDataDir(this);
|
||||
String dataDir = Apple2Utils.getDataDir(this);
|
||||
nativeOnCreate(dataDir, sampleRate, monoBufferSize, stereoBufferSize);
|
||||
|
||||
final boolean firstTime = (Apple2Preferences.EMULATOR_VERSION.intValue(this) != BuildConfig.VERSION_CODE);
|
||||
if (firstTime) {
|
||||
// allow for primitive migrations as needed
|
||||
Apple2Preferences.EMULATOR_VERSION.saveInt(this, BuildConfig.VERSION_CODE);
|
||||
Log.v(TAG, "Triggering migration to Apple2ix version : " + BuildConfig.VERSION_NAME);
|
||||
}
|
||||
// NOTE: ordering here is important!
|
||||
Apple2Preferences.load(this);
|
||||
final boolean firstTime = Apple2Preferences.migrate(this);
|
||||
mSwitchingToPortrait.set(false);
|
||||
boolean switchingToPortrait = Apple2VideoSettingsMenu.SETTINGS.applyLandscapeMode(this);
|
||||
Apple2Preferences.sync(this, null);
|
||||
|
||||
Apple2DisksMenu.insertDisk((String) Apple2Preferences.getJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_A), /*driveA:*/true, (boolean) Apple2Preferences.getJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_A_RO));
|
||||
Apple2DisksMenu.insertDisk((String) Apple2Preferences.getJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_B), /*driveA:*/false, (boolean) Apple2Preferences.getJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_B_RO));
|
||||
|
||||
showSplashScreen(!firstTime);
|
||||
Apple2CrashHandler.getInstance().checkForCrashes(this);
|
||||
|
||||
// Is there a way to persist the user orientation setting such that we launch in the previously set orientation and avoid get multiple onCreate() onResume()?! ... Android lifecycle edge cases are so damn kludgishly annoying ...
|
||||
mSwitchingToPortrait.set(switchingToPortrait);
|
||||
if (!switchingToPortrait) {
|
||||
Apple2CrashHandler.getInstance().checkForCrashes(this);
|
||||
}
|
||||
|
||||
boolean extperm = true;
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
@ -164,25 +168,15 @@ public class Apple2Activity extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
mGraphicsInitializedRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (firstTime) {
|
||||
Apple2Preferences.KeypadPreset.IJKM_SPACE.apply(Apple2Activity.this);
|
||||
}
|
||||
Apple2Preferences.loadPreferences(Apple2Activity.this);
|
||||
}
|
||||
};
|
||||
|
||||
// first-time initializations
|
||||
final boolean externalStoragePermission = extperm;
|
||||
if (firstTime) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Apple2DisksMenu.exposeAPKAssets(Apple2Activity.this);
|
||||
Apple2Utils.exposeAPKAssets(Apple2Activity.this);
|
||||
if (externalStoragePermission) {
|
||||
Apple2DisksMenu.exposeAPKAssetsToExternal(Apple2Activity.this);
|
||||
Apple2Utils.exposeAPKAssetsToExternal(Apple2Activity.this);
|
||||
}
|
||||
mSplashScreen.setDismissable(true);
|
||||
Log.d(TAG, "Finished first time copying...");
|
||||
@ -219,7 +213,7 @@ public class Apple2Activity extends Activity {
|
||||
}
|
||||
if (grantedPermissions) {
|
||||
// this will force copying APK files (now that we have permission
|
||||
Apple2DisksMenu.exposeAPKAssetsToExternal(Apple2Activity.this);
|
||||
Apple2Utils.exposeAPKAssetsToExternal(Apple2Activity.this);
|
||||
} // else ... we keep nagging on app startup ...
|
||||
} else {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
@ -236,7 +230,9 @@ public class Apple2Activity extends Activity {
|
||||
|
||||
Log.d(TAG, "onResume()");
|
||||
showSplashScreen(/*dismissable:*/true);
|
||||
Apple2CrashHandler.getInstance().checkForCrashes(this); // NOTE : needs to be called again to clean-up
|
||||
if (!mSwitchingToPortrait.get()) {
|
||||
Apple2CrashHandler.getInstance().checkForCrashes(this); // NOTE : needs to be called again to clean-up
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -251,6 +247,12 @@ public class Apple2Activity extends Activity {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEmulationPaused()) {
|
||||
Apple2Preferences.save(this);
|
||||
} else {
|
||||
Log.d(TAG, "Letting native save preferences...");
|
||||
}
|
||||
|
||||
Log.d(TAG, "onPause()");
|
||||
if (mView != null) {
|
||||
mView.onPause();
|
||||
@ -260,7 +262,8 @@ public class Apple2Activity extends Activity {
|
||||
// Dismiss these popups to avoid android.view.WindowLeaked issues
|
||||
synchronized (this) {
|
||||
dismissAllMenus();
|
||||
nativeEmulationPause();
|
||||
dismissAllMenus(); // 2nd time should full exit calibration mode (if present)
|
||||
pauseEmulation();
|
||||
}
|
||||
|
||||
mPausing.set(false);
|
||||
@ -339,19 +342,20 @@ public class Apple2Activity extends Activity {
|
||||
return;
|
||||
}
|
||||
|
||||
Apple2Preferences.CURRENT_DISK_A_RO.saveBoolean(Apple2Activity.this, true);
|
||||
Apple2Preferences.setJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_A_RO, true);
|
||||
final int len = diskPath.length();
|
||||
final String suffix = diskPath.substring(len - 3, len);
|
||||
if (suffix.equalsIgnoreCase(".gz")) { // HACK FIXME TODO : small amount of code duplication of Apple2DisksMenu
|
||||
diskPath = diskPath.substring(0, len - 3);
|
||||
}
|
||||
Apple2Preferences.CURRENT_DISK_A.saveString(Apple2Activity.this, diskPath);
|
||||
|
||||
Apple2DisksMenu.insertDisk(diskPath, /*driveA:*/true, /*readOnly:*/true);
|
||||
|
||||
while (mDisksMenu.popPathStack() != null) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
File storageDir = Apple2DisksMenu.getExternalStorageDirectory(Apple2Activity.this);
|
||||
File storageDir = Apple2Utils.getExternalStorageDirectory(Apple2Activity.this);
|
||||
if (storageDir != null) {
|
||||
String storagePath = storageDir.getAbsolutePath();
|
||||
if (diskPath.contains(storagePath)) {
|
||||
@ -394,8 +398,7 @@ public class Apple2Activity extends Activity {
|
||||
boolean glViewFirstTime = false;
|
||||
if (mView == null) {
|
||||
glViewFirstTime = true;
|
||||
mView = new Apple2View(this, mGraphicsInitializedRunnable);
|
||||
mGraphicsInitializedRunnable = null;
|
||||
mView = new Apple2View(this);
|
||||
mMainMenu = new Apple2MainMenu(this, mView);
|
||||
}
|
||||
|
||||
@ -416,7 +419,7 @@ public class Apple2Activity extends Activity {
|
||||
//
|
||||
mMenuStack.add(apple2MenuView);
|
||||
View menuView = apple2MenuView.getView();
|
||||
nativeEmulationPause();
|
||||
pauseEmulation();
|
||||
addContentView(menuView, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
|
||||
}
|
||||
|
||||
@ -490,7 +493,7 @@ public class Apple2Activity extends Activity {
|
||||
if (dismissedSplashScreen) {
|
||||
setupGLView();
|
||||
} else {
|
||||
nativeEmulationResume();
|
||||
maybeResumeEmulation();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -504,16 +507,23 @@ public class Apple2Activity extends Activity {
|
||||
|
||||
public void maybeResumeEmulation() {
|
||||
if (mMenuStack.size() == 0 && !mPausing.get()) {
|
||||
nativeEmulationResume();
|
||||
Apple2Preferences.sync(this, null);
|
||||
boolean previouslyPaused = nativeEmulationResume();
|
||||
if (BuildConfig.DEBUG && !previouslyPaused) {
|
||||
throw new RuntimeException("expecting native CPU thread to have been paused");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void pauseEmulation() {
|
||||
nativeEmulationPause();
|
||||
boolean previouslyRunning = nativeEmulationPause();
|
||||
if (previouslyRunning) {
|
||||
Apple2Preferences.load(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void rebootEmulation() {
|
||||
nativeReboot();
|
||||
public void rebootEmulation(int resetState) {
|
||||
nativeReboot(resetState);
|
||||
}
|
||||
|
||||
public void saveState(String stateFile) {
|
||||
@ -524,14 +534,6 @@ public class Apple2Activity extends Activity {
|
||||
return Apple2Activity.nativeLoadState(stateFile);
|
||||
}
|
||||
|
||||
public void chooseDisk(String path, boolean driveA, boolean readOnly) {
|
||||
nativeChooseDisk(path, driveA, readOnly);
|
||||
}
|
||||
|
||||
public void ejectDisk(boolean driveA) {
|
||||
nativeEjectDisk(driveA);
|
||||
}
|
||||
|
||||
public void quitEmulator() {
|
||||
nativeOnQuit();
|
||||
finish();
|
||||
|
@ -17,13 +17,19 @@ import android.widget.CompoundButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
import org.json.JSONArray;
|
||||
|
||||
public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
private final static String TAG = "Apple2AudioSettingsMenu";
|
||||
|
||||
public final static int AUDIO_LATENCY_NUM_CHOICES = Apple2Preferences.DECENT_AMOUNT_OF_CHOICES;
|
||||
|
||||
private static int sSampleRateCanary = 0;
|
||||
|
||||
public Apple2AudioSettingsMenu(Apple2Activity activity) {
|
||||
super(activity);
|
||||
sSampleRateCanary = DevicePropertyCalculator.getRecommendedSampleRate(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,6 +55,27 @@ public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
return position == SETTINGS.MOCKINGBOARD_ENABLED.ordinal();
|
||||
}
|
||||
|
||||
public enum Volume {
|
||||
OFF(0),
|
||||
ONE(1),
|
||||
TWO(2),
|
||||
THREE(3),
|
||||
FOUR(4),
|
||||
MEDIUM(5),
|
||||
FIVE(5),
|
||||
SIX(6),
|
||||
SEVEN(7),
|
||||
EIGHT(8),
|
||||
NINE(9),
|
||||
MAX(10),
|
||||
ELEVEN(11); // Ours goes to eleven...
|
||||
private int vol;
|
||||
|
||||
Volume(int vol) {
|
||||
this.vol = vol;
|
||||
}
|
||||
}
|
||||
|
||||
enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
SPEAKER_VOLUME {
|
||||
@Override
|
||||
@ -61,17 +88,28 @@ public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.speaker_volume_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "speakerVolume";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return Volume.MEDIUM.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.Volume.MAX.ordinal() - 1, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, Volume.MAX.ordinal() - 1, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.SPEAKER_VOLUME.saveVolume(activity, Apple2Preferences.Volume.values()[progress]);
|
||||
Apple2Preferences.setJSONPref(self, Volume.values()[progress].ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.SPEAKER_VOLUME.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -92,14 +130,25 @@ public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.mockingboard_enable_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "mbEnabled";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.MOCKINGBOARD_ENABLED.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.MOCKINGBOARD_ENABLED.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -116,17 +165,28 @@ public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.mockingboard_volume_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "mbVolume";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return Volume.MEDIUM.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.Volume.MAX.ordinal() - 1, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, Volume.MAX.ordinal() - 1, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.MOCKINGBOARD_VOLUME.saveVolume(activity, Apple2Preferences.Volume.values()[progress]);
|
||||
Apple2Preferences.setJSONPref(self, Volume.values()[progress].ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.MOCKINGBOARD_VOLUME.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -158,26 +218,46 @@ public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.audio_latency_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "audioLatency";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
int defaultLatency;
|
||||
if (Apple2AudioSettingsMenu.sSampleRateCanary == DevicePropertyCalculator.defaultSampleRate) {
|
||||
// quite possibly an audio-challenged device
|
||||
defaultLatency = 8; // /AUDIO_LATENCY_NUM_CHOICES -> 0.4f
|
||||
} else {
|
||||
// reasonable default for high-end devices
|
||||
defaultLatency = 5; // /AUDIO_LATENCY_NUM_CHOICES -> 0.25f
|
||||
}
|
||||
return ((float) defaultLatency) / AUDIO_LATENCY_NUM_CHOICES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.AUDIO_LATENCY_NUM_CHOICES, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, AUDIO_LATENCY_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
if (progress == 0) {
|
||||
// disallow 0-length buffer ...
|
||||
progress = 1;
|
||||
}
|
||||
Apple2Preferences.AUDIO_LATENCY.saveInt(activity, progress);
|
||||
Apple2Preferences.setJSONPref(self, ((float) progress) / AUDIO_LATENCY_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.AUDIO_LATENCY.intValue(activity);
|
||||
float pref = Apple2Preferences.getFloatJSONPref(self);
|
||||
return (int) (pref * AUDIO_LATENCY_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showValue(int progress, final TextView seekBarValue) {
|
||||
seekBarValue.setText("" + ((float) progress / Apple2Preferences.AUDIO_LATENCY_NUM_CHOICES));
|
||||
seekBarValue.setText("" + ((float) progress / AUDIO_LATENCY_NUM_CHOICES));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -185,9 +265,23 @@ public class Apple2AudioSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_AUDIO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,16 +21,15 @@ import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.BuildConfig;
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
@ -45,6 +44,67 @@ public class Apple2CrashHandler {
|
||||
return sCrashHandler;
|
||||
}
|
||||
|
||||
public enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
GL_VENDOR {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "glVendor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return "unknown";
|
||||
}
|
||||
},
|
||||
GL_RENDERER {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "glRenderer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return "unknown";
|
||||
}
|
||||
},
|
||||
GL_VERSION {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "glVersion";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return "unknown";
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_INTERFACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
|
||||
public enum CrashType {
|
||||
JAVA_CRASH {
|
||||
@Override
|
||||
@ -69,6 +129,18 @@ public class Apple2CrashHandler {
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.crash_stackbuf_overflow);
|
||||
}
|
||||
},
|
||||
SIGABRT {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.crash_sigabrt);
|
||||
}
|
||||
},
|
||||
SIGFPE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.crash_sigfpe);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -89,7 +161,7 @@ public class Apple2CrashHandler {
|
||||
public synchronized void initializeAndSetCustomExceptionHandler(Apple2Activity activity) {
|
||||
synchronized (this) {
|
||||
if (homeDir == null) {
|
||||
homeDir = Apple2DisksMenu.getDataDir(activity);
|
||||
homeDir = Apple2Utils.getDataDir(activity);
|
||||
}
|
||||
}
|
||||
if (mDefaultExceptionHandler != null) {
|
||||
@ -137,7 +209,7 @@ public class Apple2CrashHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Apple2Preferences.CRASH_CHECK.booleanValue(activity)) {
|
||||
if (!(boolean) Apple2Preferences.getJSONPref(Apple2SettingsMenu.SETTINGS.CRASH)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -169,7 +241,9 @@ public class Apple2CrashHandler {
|
||||
}
|
||||
|
||||
// remove previous log file
|
||||
_writeTempLogFile(activity, new StringBuilder());
|
||||
File allCrashFile = _getCrashFile(activity);
|
||||
Apple2Utils.writeFile(new StringBuilder(), allCrashFile);
|
||||
allCrashFile.delete();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -216,9 +290,9 @@ public class Apple2CrashHandler {
|
||||
summary.append("SAMPLE RATE: ").append(sampleRate).append("\n");
|
||||
summary.append("MONO BUFSIZE: ").append(monoBufferSize).append("\n");
|
||||
summary.append("STEREO BUFSIZE: ").append(stereoBufferSize).append("\n");
|
||||
summary.append("GPU VENDOR: ").append(Apple2Preferences.GL_VENDOR.stringValue(activity)).append("\n");
|
||||
summary.append("GPU RENDERER: ").append(Apple2Preferences.GL_RENDERER.stringValue(activity)).append("\n");
|
||||
summary.append("GPU VERSION: ").append(Apple2Preferences.GL_VERSION.stringValue(activity)).append("\n");
|
||||
summary.append("GPU VENDOR: ").append(Apple2Preferences.getJSONPref(SETTINGS.GL_VENDOR)).append("\n");
|
||||
summary.append("GPU RENDERER: ").append(Apple2Preferences.getJSONPref(SETTINGS.GL_RENDERER)).append("\n");
|
||||
summary.append("GPU VERSION: ").append(Apple2Preferences.getJSONPref(SETTINGS.GL_VERSION)).append("\n");
|
||||
|
||||
try {
|
||||
PackageInfo pInfo = activity.getPackageManager().getPackageInfo(activity.getPackageName(), 0);
|
||||
@ -246,7 +320,7 @@ public class Apple2CrashHandler {
|
||||
});
|
||||
|
||||
if (len > 0) {
|
||||
Apple2DisksMenu.exposeSymbols(activity);
|
||||
Apple2Utils.exposeSymbols(activity);
|
||||
}
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@ -274,7 +348,7 @@ public class Apple2CrashHandler {
|
||||
}
|
||||
|
||||
StringBuilder crashData = new StringBuilder();
|
||||
if (!_readFile(new File(processedPath), crashData)) {
|
||||
if (!Apple2Utils.readEntireFile(new File(processedPath), crashData)) {
|
||||
Log.e(TAG, "Error processing crash : " + crashPath);
|
||||
}
|
||||
allCrashData.append(">>>>>>> NATIVE CRASH [").append(crashPath).append("]\n");
|
||||
@ -336,7 +410,7 @@ public class Apple2CrashHandler {
|
||||
File javaCrashFile = _javaCrashFile(activity);
|
||||
if (javaCrashFile.exists()) {
|
||||
Log.d(TAG, "Reading java crashes file");
|
||||
if (!_readFile(javaCrashFile, javaCrashData)) {
|
||||
if (!Apple2Utils.readEntireFile(javaCrashFile, javaCrashData)) {
|
||||
Log.e(TAG, "Error processing java crash : " + javaCrashFileName);
|
||||
}
|
||||
}
|
||||
@ -356,7 +430,23 @@ public class Apple2CrashHandler {
|
||||
}
|
||||
});
|
||||
|
||||
Apple2DisksMenu.unexposeSymbols(activity);
|
||||
StringBuilder jsonData = new StringBuilder();
|
||||
if (Apple2Utils.readEntireFile(new File(homeDir, Apple2Preferences.PREFS_FILE), jsonData)) {
|
||||
JSONObject obj = null;
|
||||
try {
|
||||
obj = new JSONObject(jsonData.toString());
|
||||
} catch (JSONException e) {
|
||||
Log.e(TAG, "Error reading preferences : " + e);
|
||||
}
|
||||
if (obj != null) {
|
||||
summary.append("PREFS:\n");
|
||||
summary.append(obj.toString());
|
||||
allCrashData.append(">>>>>>> PREFS\n");
|
||||
allCrashData.append(obj.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Apple2Utils.unexposeSymbols(activity);
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -465,76 +555,15 @@ public class Apple2CrashHandler {
|
||||
return crashPath.substring(0, crashPath.length() - 4) + ".txt";
|
||||
}
|
||||
|
||||
private boolean _readFile(File file, StringBuilder fileData) {
|
||||
final int maxAttempts = 5;
|
||||
int attempts = 0;
|
||||
do {
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(new FileReader(file));
|
||||
char[] buf = new char[1024];
|
||||
int numRead = 0;
|
||||
while ((numRead = reader.read(buf)) != -1) {
|
||||
String readData = String.valueOf(buf, 0, numRead);
|
||||
fileData.append(readData);
|
||||
}
|
||||
reader.close();
|
||||
break;
|
||||
} catch (InterruptedIOException ie) {
|
||||
/* EINTR, EAGAIN ... */
|
||||
} catch (IOException e) {
|
||||
Log.d(TAG, "Error reading file at path : " + file.toString());
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException e) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
|
||||
return attempts < maxAttempts;
|
||||
}
|
||||
|
||||
private File _writeTempLogFile(Apple2Activity activity, StringBuilder allCrashData) {
|
||||
|
||||
File allCrashFile = null;
|
||||
|
||||
private File _getCrashFile(Apple2Activity activity) {
|
||||
File allCrashFile;
|
||||
String storageState = Environment.getExternalStorageState();
|
||||
if (storageState.equals(Environment.MEDIA_MOUNTED)) {
|
||||
allCrashFile = new File(Environment.getExternalStorageDirectory(), "apple2ix_crash.txt");
|
||||
} else {
|
||||
allCrashFile = new File(Apple2DisksMenu.getDataDir(activity), "apple2ix_crash.txt");
|
||||
allCrashFile = new File(Apple2Utils.getDataDir(activity), "apple2ix_crash.txt");
|
||||
}
|
||||
|
||||
Log.d(TAG, "Writing all crashes to temp file : " + allCrashFile.getAbsolutePath());
|
||||
final int maxAttempts = 5;
|
||||
int attempts = 0;
|
||||
do {
|
||||
try {
|
||||
BufferedWriter writer = new BufferedWriter(new FileWriter(allCrashFile));
|
||||
writer.append(allCrashData);
|
||||
writer.flush();
|
||||
writer.close();
|
||||
break;
|
||||
} catch (InterruptedIOException ie) {
|
||||
/* EINTR, EAGAIN ... */
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Exception attempting to write data : " + e);
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException e) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
|
||||
if (!allCrashFile.setReadable(true, /*ownerOnly:*/false)) {
|
||||
Log.d(TAG, "Oops, could not set all crash data readable!");
|
||||
}
|
||||
|
||||
return allCrashFile;
|
||||
}
|
||||
|
||||
@ -553,9 +582,14 @@ public class Apple2CrashHandler {
|
||||
int len = summary.length();
|
||||
len = len < maxCharsEmail ? len : maxCharsEmail;
|
||||
String summaryData = summary.substring(0, len);
|
||||
emailIntent.putExtra(Intent.EXTRA_TEXT, "The app crashed, please help!\n\n"+summaryData);
|
||||
emailIntent.putExtra(Intent.EXTRA_TEXT, "The app crashed, please help!\n\n" + summaryData);
|
||||
|
||||
File allCrashFile = _getCrashFile(activity);
|
||||
Apple2Utils.writeFile(allCrashData, allCrashFile);
|
||||
if (!allCrashFile.setReadable(true, /*ownerOnly:*/false)) {
|
||||
Log.d(TAG, "Oops, could not set file data readable!");
|
||||
}
|
||||
|
||||
File allCrashFile = _writeTempLogFile(activity, allCrashData);
|
||||
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(allCrashFile));
|
||||
|
||||
Log.d(TAG, "STARTING CHOOSER FOR EMAIL ...");
|
||||
|
@ -14,11 +14,7 @@ package org.deadc0de.apple2ix;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -30,39 +26,138 @@ import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RadioButton;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
|
||||
public class Apple2DisksMenu implements Apple2MenuView {
|
||||
|
||||
private final static String TAG = "Apple2DisksMenu";
|
||||
private static String sDataDir = null;
|
||||
|
||||
private Apple2Activity mActivity = null;
|
||||
private View mDisksView = null;
|
||||
|
||||
private final ArrayList<String> mPathStack = new ArrayList<String>();
|
||||
|
||||
private static File sExternalFilesDir = null;
|
||||
private static File sDownloadFilesDir = null;
|
||||
private static boolean sInitializedPath = false;
|
||||
|
||||
private static native void nativeChooseDisk(String path, boolean driveA, boolean readOnly);
|
||||
|
||||
private static native void nativeEjectDisk(boolean driveA);
|
||||
|
||||
protected enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
CURRENT_DISK_SEARCH_PATH {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "diskPathStack";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return new JSONArray();
|
||||
}
|
||||
},
|
||||
CURRENT_DRIVE_A {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "driveACurrent";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
CURRENT_DISK_RO_BUTTON {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "driveACurrent";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
CURRENT_DISK_PATH_A {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "driveAInsertedDisk";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
CURRENT_DISK_PATH_A_RO {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "driveAInsertedDiskRO";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
CURRENT_DISK_PATH_B {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "driveBInsertedDisk";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
CURRENT_DISK_PATH_B_RO {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "driveBInsertedDiskRO";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_VM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
|
||||
public Apple2DisksMenu(Apple2Activity activity) {
|
||||
mActivity = activity;
|
||||
|
||||
@ -77,150 +172,7 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
}
|
||||
});
|
||||
|
||||
getExternalStorageDirectory(activity);
|
||||
}
|
||||
|
||||
public static File getExternalStorageDirectory(Apple2Activity activity) {
|
||||
|
||||
do {
|
||||
if (sExternalFilesDir != null) {
|
||||
break;
|
||||
}
|
||||
|
||||
String storageState = Environment.getExternalStorageState();
|
||||
if (!storageState.equals(Environment.MEDIA_MOUNTED)) {
|
||||
// 2015/10/28 : do not expose sExternalFilesDir/sDownloadFilesDir unless they are writable
|
||||
break;
|
||||
}
|
||||
|
||||
File externalStorageDir = Environment.getExternalStorageDirectory();
|
||||
if (externalStorageDir == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
File externalDir = new File(externalStorageDir, "apple2ix"); // /sdcard/apple2ix
|
||||
if (!externalDir.exists()) {
|
||||
boolean made = externalDir.mkdirs();
|
||||
if (!made) {
|
||||
Log.d(TAG, "WARNING: could not make directory : " + sExternalFilesDir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sExternalFilesDir = externalDir;
|
||||
sDownloadFilesDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
||||
} while (false);
|
||||
|
||||
return sExternalFilesDir;
|
||||
}
|
||||
|
||||
// HACK NOTE 2015/02/22 : Apparently native code cannot easily access stuff in the APK ... so copy various resources
|
||||
// out of the APK and into the /data/data/... for ease of access. Because this is FOSS software we don't care about
|
||||
// security or DRM for these assets =)
|
||||
public static String getDataDir(Apple2Activity activity) {
|
||||
|
||||
if (sDataDir != null) {
|
||||
return sDataDir;
|
||||
}
|
||||
|
||||
try {
|
||||
PackageManager pm = activity.getPackageManager();
|
||||
PackageInfo pi = pm.getPackageInfo(activity.getPackageName(), 0);
|
||||
sDataDir = pi.applicationInfo.dataDir;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e(TAG, "" + e);
|
||||
if (sDataDir == null) {
|
||||
sDataDir = "/data/local/tmp";
|
||||
}
|
||||
}
|
||||
|
||||
return sDataDir;
|
||||
}
|
||||
|
||||
public static void exposeAPKAssetsToExternal(Apple2Activity activity) {
|
||||
getExternalStorageDirectory(activity);
|
||||
if (sExternalFilesDir == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final ProgressBar bar = (ProgressBar) activity.findViewById(R.id.crash_progressBar);
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.VISIBLE);
|
||||
bar.setIndeterminate(true);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssetsToExternal #1");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Log.v(TAG, "Overwriting system files in /sdcard/apple2ix/ (external storage) ...");
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"keyboards", /*to location:*/sExternalFilesDir.getAbsolutePath(), false);
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.INVISIBLE);
|
||||
bar.setIndeterminate(false);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssetsToExternal #2");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void exposeAPKAssets(Apple2Activity activity) {
|
||||
final ProgressBar bar = (ProgressBar) activity.findViewById(R.id.crash_progressBar);
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.VISIBLE);
|
||||
bar.setIndeterminate(true);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssets #1");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
getDataDir(activity);
|
||||
|
||||
// FIXME TODO : Heavy-handed migration to 1.1.3 ...
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "blanks"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "demo"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "eamon"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "logo"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "miscgame"));
|
||||
|
||||
Log.d(TAG, "First time copying stuff-n-things out of APK for ease-of-NDK access...");
|
||||
|
||||
getExternalStorageDirectory(activity);
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"disks", /*to location:*/new File(sDataDir, "disks").getAbsolutePath(), true);
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"keyboards", /*to location:*/new File(sDataDir, "keyboards").getAbsolutePath(), false);
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"shaders", /*to location:*/new File(sDataDir, "shaders").getAbsolutePath(), false);
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.INVISIBLE);
|
||||
bar.setIndeterminate(false);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssets #1");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void exposeSymbols(Apple2Activity activity) {
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"symbols", /*to location:*/new File(sDataDir, "symbols").getAbsolutePath(), false);
|
||||
}
|
||||
|
||||
public static void unexposeSymbols(Apple2Activity activity) {
|
||||
recursivelyDelete(new File(sDataDir, "symbols"));
|
||||
Apple2Utils.getExternalStorageDirectory(activity);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@ -240,7 +192,7 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
}
|
||||
if (!sInitializedPath) {
|
||||
sInitializedPath = true;
|
||||
Apple2Preferences.CURRENT_DISK_PATH.load(mActivity);
|
||||
setPathStackJSON((JSONArray) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DISK_SEARCH_PATH));
|
||||
}
|
||||
dynamicSetup();
|
||||
mActivity.pushApple2View(this);
|
||||
@ -272,15 +224,13 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
// ------------------------------------------------------------------------
|
||||
// path stack methods
|
||||
|
||||
public String getPathStackJSON() {
|
||||
JSONArray jsonArray = new JSONArray(Arrays.asList(mPathStack.toArray()));
|
||||
return jsonArray.toString();
|
||||
public JSONArray getPathStackJSON() {
|
||||
return new JSONArray(Arrays.asList(mPathStack.toArray()));
|
||||
}
|
||||
|
||||
public void setPathStackJSON(String pathStackJSON) {
|
||||
public void setPathStackJSON(JSONArray jsonArray) {
|
||||
mPathStack.clear();
|
||||
try {
|
||||
JSONArray jsonArray = new JSONArray(pathStackJSON);
|
||||
for (int i = 0, count = jsonArray.length(); i < count; i++) {
|
||||
String pathComponent = jsonArray.getString(i);
|
||||
mPathStack.add(pathComponent);
|
||||
@ -292,7 +242,7 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
|
||||
public void pushPathStack(String path) {
|
||||
mPathStack.add(path);
|
||||
Apple2Preferences.CURRENT_DISK_PATH.saveString(mActivity, getPathStackJSON());
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_SEARCH_PATH, getPathStackJSON());
|
||||
}
|
||||
|
||||
public String popPathStack() {
|
||||
@ -300,10 +250,32 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
return null;
|
||||
}
|
||||
String path = mPathStack.remove(mPathStack.size() - 1);
|
||||
Apple2Preferences.CURRENT_DISK_PATH.saveString(mActivity, getPathStackJSON());
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_SEARCH_PATH, getPathStackJSON());
|
||||
return path;
|
||||
}
|
||||
|
||||
public static void insertDisk(String fullPath, boolean isDriveA, boolean isReadOnly) {
|
||||
File file = new File(fullPath);
|
||||
final String imageName = fullPath;
|
||||
if (!file.exists()) {
|
||||
fullPath = fullPath + ".gz";
|
||||
file = new File(fullPath);
|
||||
}
|
||||
if (file.exists()) {
|
||||
if (isDriveA) {
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_A_RO, isReadOnly);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_A, imageName);
|
||||
} else {
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_B_RO, isReadOnly);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_B, imageName);
|
||||
}
|
||||
nativeChooseDisk(fullPath, isDriveA, isReadOnly);
|
||||
} else {
|
||||
Log.d(TAG, "Cannot insert: " + fullPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static boolean hasDiskExtension(String name) {
|
||||
|
||||
// check file extensions ... sigh ... no String.endsWithIgnoreCase() ?
|
||||
@ -360,133 +332,23 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
return pathBuffer.toString();
|
||||
}
|
||||
|
||||
// TODO FIXME : WARNING : this is super dangerous if there are symlinks !!!
|
||||
private static void recursivelyDelete(File file) {
|
||||
if (file.isDirectory()) {
|
||||
for (File f : file.listFiles()) {
|
||||
recursivelyDelete(f);
|
||||
}
|
||||
}
|
||||
if (!file.delete()) {
|
||||
Log.d(TAG, "Failed to delete file: " + file);
|
||||
}
|
||||
}
|
||||
|
||||
private static void recursivelyCopyAPKAssets(Apple2Activity activity, String srcFileOrDir, String dstFileOrDir, boolean shouldGzip) {
|
||||
AssetManager assetManager = activity.getAssets();
|
||||
|
||||
final int maxAttempts = 5;
|
||||
String[] files = null;
|
||||
int attempts = 0;
|
||||
do {
|
||||
try {
|
||||
files = assetManager.list(srcFileOrDir);
|
||||
break;
|
||||
} catch (InterruptedIOException e) {
|
||||
/* EINTR, EAGAIN ... */
|
||||
} catch (IOException e) {
|
||||
Log.d(TAG, "OOPS exception attempting to list APK files at : " + srcFileOrDir + " : " + e);
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException ie) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
|
||||
if (files == null) {
|
||||
Log.d(TAG, "OOPS, could not list APK assets at : " + srcFileOrDir);
|
||||
return;
|
||||
}
|
||||
|
||||
if (files.length > 0) {
|
||||
// ensure destination directory exists
|
||||
File dstPath = new File(dstFileOrDir);
|
||||
if (!dstPath.mkdirs()) {
|
||||
if (!dstPath.exists()) {
|
||||
Log.d(TAG, "OOPS, could not mkdirs on " + dstPath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (String filename : files) {
|
||||
// iterate on files and subdirectories
|
||||
recursivelyCopyAPKAssets(activity, srcFileOrDir + File.separator + filename, dstFileOrDir + File.separator + filename, shouldGzip);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// presumably this is a file, not a subdirectory
|
||||
InputStream is = null;
|
||||
OutputStream os = null;
|
||||
attempts = 0;
|
||||
do {
|
||||
try {
|
||||
is = assetManager.open(srcFileOrDir);
|
||||
if (shouldGzip) {
|
||||
os = new GZIPOutputStream(new FileOutputStream(dstFileOrDir + ".gz"));
|
||||
} else {
|
||||
os = new FileOutputStream(dstFileOrDir);
|
||||
}
|
||||
copyFile(is, os);
|
||||
break;
|
||||
} catch (InterruptedIOException e) {
|
||||
/* EINTR, EAGAIN */
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Failed to copy asset file: " + srcFileOrDir, e);
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// NOOP
|
||||
}
|
||||
}
|
||||
if (os != null) {
|
||||
try {
|
||||
os.close();
|
||||
} catch (IOException e) {
|
||||
// NOOP
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException ie) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
}
|
||||
|
||||
private static void copyFile(InputStream is, OutputStream os) throws IOException {
|
||||
final int BUF_SZ = 4096;
|
||||
byte[] buf = new byte[BUF_SZ];
|
||||
while (true) {
|
||||
int len = is.read(buf, 0, BUF_SZ);
|
||||
if (len < 0) {
|
||||
break;
|
||||
}
|
||||
os.write(buf, 0, len);
|
||||
}
|
||||
os.flush();
|
||||
}
|
||||
|
||||
private void dynamicSetup() {
|
||||
|
||||
final ListView disksList = (ListView) mDisksView.findViewById(R.id.listView_settings);
|
||||
disksList.setEnabled(true);
|
||||
|
||||
String disksDir = pathStackAsDirectory();
|
||||
boolean isRootPath = false;
|
||||
if (disksDir == null) {
|
||||
isRootPath = true;
|
||||
disksDir = sDataDir + File.separator + "disks"; // default path
|
||||
final boolean isRootPath = (disksDir == null);
|
||||
final File extStorageDir = Apple2Utils.getExternalStorageDirectory(mActivity);
|
||||
if (isRootPath) {
|
||||
disksDir = Apple2Utils.getDataDir(mActivity) + File.separator + "disks"; // default path
|
||||
}
|
||||
|
||||
while (disksDir.charAt(disksDir.length() - 1) == File.separatorChar) {
|
||||
disksDir = disksDir.substring(0, disksDir.length() - 1);
|
||||
}
|
||||
|
||||
File dir = new File(disksDir);
|
||||
|
||||
final File[] files = dir.listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
name = name.toLowerCase();
|
||||
@ -511,28 +373,40 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
|
||||
Arrays.sort(files);
|
||||
|
||||
getExternalStorageDirectory(mActivity);
|
||||
final boolean includeExternalStoragePath = (sExternalFilesDir != null && isRootPath);
|
||||
final boolean includeDownloadsPath = (sDownloadFilesDir != null && isRootPath);
|
||||
final int offset = includeExternalStoragePath ? (includeDownloadsPath ? 2 : 1) : (includeDownloadsPath ? 1 : 0);
|
||||
final File realExtStorageDir = Apple2Utils.getRealExternalStorageDirectory(mActivity);
|
||||
final boolean isStoragePath = !isRootPath && (realExtStorageDir != null) && disksDir.equalsIgnoreCase(realExtStorageDir.getAbsolutePath());
|
||||
if (isStoragePath) {
|
||||
// promote apple2ix directory to top of list
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (files[i].getName().equals("apple2ix")) {
|
||||
if (i > 0) {
|
||||
System.arraycopy(/*src:*/files, /*srcPos:*/0, /*dst:*/files, /*dstPos:*/1, /*length:*/i);
|
||||
files[0] = new File(realExtStorageDir, "apple2ix");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final boolean includeExternalStoragePath = (extStorageDir != null && isRootPath);
|
||||
final int offset = includeExternalStoragePath ? 1 : 0;
|
||||
final String[] fileNames = new String[files.length + offset];
|
||||
final String[] filePaths = new String[files.length + offset];
|
||||
final boolean[] isDirectory = new boolean[files.length + offset];
|
||||
|
||||
int idx = 0;
|
||||
// first external storage link should be /sdcard/apple2ix to encourage this form of organization
|
||||
if (includeExternalStoragePath) {
|
||||
fileNames[idx] = sExternalFilesDir.getAbsolutePath();
|
||||
isDirectory[idx] = true;
|
||||
++idx;
|
||||
}
|
||||
if (includeDownloadsPath) {
|
||||
fileNames[idx] = sDownloadFilesDir.getAbsolutePath();
|
||||
filePaths[idx] = Apple2Utils.getRealExternalStorageDirectory(mActivity).getAbsolutePath();
|
||||
fileNames[idx] = mActivity.getResources().getString(R.string.storage);
|
||||
isDirectory[idx] = true;
|
||||
++idx;
|
||||
}
|
||||
|
||||
for (File file : files) {
|
||||
isDirectory[idx] = file.isDirectory();
|
||||
fileNames[idx] = file.getName();
|
||||
filePaths[idx] = file.getName();
|
||||
fileNames[idx] = filePaths[idx];
|
||||
if (isDirectory[idx]) {
|
||||
fileNames[idx] += File.separator;
|
||||
}
|
||||
@ -570,26 +444,26 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
}
|
||||
|
||||
String eject = mActivity.getResources().getString(R.string.disk_eject);
|
||||
if (imageName.equals(Apple2Preferences.CURRENT_DISK_A.stringValue(mActivity))) {
|
||||
if (imageName.equals((String) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DISK_PATH_A))) {
|
||||
Button ejectButton = new Button(mActivity);
|
||||
ejectButton.setText(eject + " 1");
|
||||
ejectButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mActivity.ejectDisk(/*driveA:*/true);
|
||||
Apple2Preferences.CURRENT_DISK_A.saveString(mActivity, "");
|
||||
nativeEjectDisk(/*driveA:*/true);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_A, "");
|
||||
dynamicSetup();
|
||||
}
|
||||
});
|
||||
layout.addView(ejectButton);
|
||||
} else if (imageName.equals(Apple2Preferences.CURRENT_DISK_B.stringValue(mActivity))) {
|
||||
} else if (imageName.equals((String) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DISK_PATH_B))) {
|
||||
Button ejectButton = new Button(mActivity);
|
||||
ejectButton.setText(eject + " 2");
|
||||
ejectButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mActivity.ejectDisk(/*driveA:*/false);
|
||||
Apple2Preferences.CURRENT_DISK_B.saveString(mActivity, "");
|
||||
nativeEjectDisk(/*driveA:*/false);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_B, "");
|
||||
dynamicSetup();
|
||||
}
|
||||
});
|
||||
@ -609,11 +483,11 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
|
||||
if (isDirectory[position]) {
|
||||
Log.d(TAG, "Descending to path : " + fileNames[position]);
|
||||
if (parentIsRootPath && !new File(fileNames[position]).isAbsolute()) {
|
||||
pushPathStack(parentDisksDir + File.separator + fileNames[position]);
|
||||
Log.d(TAG, "Descending to path : " + filePaths[position]);
|
||||
if (parentIsRootPath && !new File(filePaths[position]).isAbsolute()) {
|
||||
pushPathStack(parentDisksDir + File.separator + filePaths[position]);
|
||||
} else {
|
||||
pushPathStack(fileNames[position]);
|
||||
pushPathStack(filePaths[position]);
|
||||
}
|
||||
dynamicSetup();
|
||||
ListView disksList = (ListView) mDisksView.findViewById(R.id.listView_settings);
|
||||
@ -629,15 +503,15 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
}
|
||||
final String imageName = str;
|
||||
|
||||
if (imageName.equals(Apple2Preferences.CURRENT_DISK_A.stringValue(mActivity))) {
|
||||
mActivity.ejectDisk(/*driveA:*/true);
|
||||
Apple2Preferences.CURRENT_DISK_A.saveString(mActivity, "");
|
||||
if (imageName.equals((String) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DISK_PATH_A))) {
|
||||
nativeEjectDisk(/*driveA:*/true);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_A, "");
|
||||
dynamicSetup();
|
||||
return;
|
||||
}
|
||||
if (imageName.equals(Apple2Preferences.CURRENT_DISK_B.stringValue(mActivity))) {
|
||||
mActivity.ejectDisk(/*driveA:*/false);
|
||||
Apple2Preferences.CURRENT_DISK_B.saveString(mActivity, "");
|
||||
if (imageName.equals((String) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DISK_PATH_B))) {
|
||||
nativeEjectDisk(/*driveA:*/false);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_PATH_B, "");
|
||||
dynamicSetup();
|
||||
return;
|
||||
}
|
||||
@ -650,29 +524,31 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
final View diskConfirmationView = inflater.inflate(R.layout.a2disk_confirmation, null, false);
|
||||
builder.setView(diskConfirmationView);
|
||||
|
||||
final RadioButton diskA = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_diskA);
|
||||
diskA.setChecked(Apple2Preferences.CURRENT_DRIVE_A_BUTTON.booleanValue(mActivity));
|
||||
diskA.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
final RadioButton driveA = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_diskA);
|
||||
boolean driveAChecked = (boolean) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DRIVE_A);
|
||||
driveA.setChecked(driveAChecked);
|
||||
driveA.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.CURRENT_DRIVE_A_BUTTON.saveBoolean(mActivity, isChecked);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DRIVE_A, isChecked);
|
||||
}
|
||||
});
|
||||
final RadioButton diskB = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_diskB);
|
||||
diskB.setChecked(!Apple2Preferences.CURRENT_DRIVE_A_BUTTON.booleanValue(mActivity));
|
||||
final RadioButton driveB = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_diskB);
|
||||
driveB.setChecked(!driveAChecked);
|
||||
|
||||
|
||||
final RadioButton readOnly = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_readOnly);
|
||||
readOnly.setChecked(Apple2Preferences.CURRENT_DISK_RO_BUTTON.booleanValue(mActivity));
|
||||
boolean roChecked = (boolean) Apple2Preferences.getJSONPref(SETTINGS.CURRENT_DISK_RO_BUTTON);
|
||||
readOnly.setChecked(roChecked);
|
||||
readOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.CURRENT_DISK_RO_BUTTON.saveBoolean(mActivity, isChecked);
|
||||
Apple2Preferences.setJSONPref(SETTINGS.CURRENT_DISK_RO_BUTTON, isChecked);
|
||||
}
|
||||
});
|
||||
|
||||
final RadioButton readWrite = (RadioButton) diskConfirmationView.findViewById(R.id.radioButton_readWrite);
|
||||
readWrite.setChecked(!Apple2Preferences.CURRENT_DISK_RO_BUTTON.booleanValue(mActivity));
|
||||
readWrite.setChecked(!roChecked);
|
||||
|
||||
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
@ -683,14 +559,12 @@ public class Apple2DisksMenu implements Apple2MenuView {
|
||||
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
boolean isDriveA = diskA.isChecked();
|
||||
boolean isDriveA = driveA.isChecked();
|
||||
boolean diskReadOnly = readOnly.isChecked();
|
||||
if (isDriveA) {
|
||||
Apple2Preferences.CURRENT_DISK_A_RO.saveBoolean(mActivity, diskReadOnly);
|
||||
Apple2Preferences.CURRENT_DISK_A.saveString(mActivity, imageName);
|
||||
insertDisk(imageName, /*driveA:*/true, diskReadOnly);
|
||||
} else {
|
||||
Apple2Preferences.CURRENT_DISK_B_RO.saveBoolean(mActivity, diskReadOnly);
|
||||
Apple2Preferences.CURRENT_DISK_B.saveString(mActivity, imageName);
|
||||
insertDisk(imageName, /*driveA:*/false, diskReadOnly);
|
||||
}
|
||||
dialog.dismiss();
|
||||
mActivity.dismissAllMenus();
|
||||
|
@ -24,23 +24,26 @@ public class Apple2JoystickCalibration implements Apple2MenuView {
|
||||
|
||||
private final static String TAG = "Apple2JoystickCalibration";
|
||||
|
||||
public final static int JOYSTICK_DIVIDER_NUM_CHOICES = Apple2Preferences.DECENT_AMOUNT_OF_CHOICES;
|
||||
public final static String PREF_SCREEN_DIVISION = "screenDivider";
|
||||
|
||||
private Apple2Activity mActivity = null;
|
||||
private View mSettingsView = null;
|
||||
private ArrayList<Apple2MenuView> mViewStack = null;
|
||||
private boolean mTouchMenuEnabled = false;
|
||||
private int mSavedTouchDevice = Apple2Preferences.TouchDeviceVariant.NONE.ordinal();
|
||||
private int mSavedTouchDevice = Apple2SettingsMenu.TouchDeviceVariant.NONE.ordinal();
|
||||
|
||||
public Apple2JoystickCalibration(Apple2Activity activity, ArrayList<Apple2MenuView> viewStack, Apple2Preferences.TouchDeviceVariant variant) {
|
||||
public Apple2JoystickCalibration(Apple2Activity activity, ArrayList<Apple2MenuView> viewStack, Apple2SettingsMenu.TouchDeviceVariant variant) {
|
||||
mActivity = activity;
|
||||
mViewStack = viewStack;
|
||||
if (!(variant == Apple2Preferences.TouchDeviceVariant.JOYSTICK || variant == Apple2Preferences.TouchDeviceVariant.JOYSTICK_KEYPAD)) {
|
||||
if (!(variant == Apple2SettingsMenu.TouchDeviceVariant.JOYSTICK || variant == Apple2SettingsMenu.TouchDeviceVariant.JOYSTICK_KEYPAD)) {
|
||||
throw new RuntimeException("You're doing it wrong");
|
||||
}
|
||||
|
||||
setup(variant);
|
||||
}
|
||||
|
||||
private void setup(Apple2Preferences.TouchDeviceVariant variant) {
|
||||
private void setup(Apple2SettingsMenu.TouchDeviceVariant variant) {
|
||||
LayoutInflater inflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mSettingsView = inflater.inflate(R.layout.activity_calibrate_joystick, null, false);
|
||||
|
||||
@ -51,7 +54,8 @@ public class Apple2JoystickCalibration implements Apple2MenuView {
|
||||
if (!fromUser) {
|
||||
return;
|
||||
}
|
||||
Apple2Preferences.JOYSTICK_DIVIDER.saveInt(mActivity, progress);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_SCREEN_DIVISION, (float) progress / JOYSTICK_DIVIDER_NUM_CHOICES);
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_JOYSTICK);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -64,20 +68,17 @@ public class Apple2JoystickCalibration implements Apple2MenuView {
|
||||
});
|
||||
|
||||
sb.setMax(0); // http://stackoverflow.com/questions/10278467/seekbar-not-setting-actual-progress-setprogress-not-working-on-early-android
|
||||
sb.setMax(Apple2Preferences.JOYSTICK_DIVIDER_NUM_CHOICES);
|
||||
sb.setProgress(Apple2Preferences.JOYSTICK_DIVIDER.intValue(mActivity));
|
||||
sb.setMax(JOYSTICK_DIVIDER_NUM_CHOICES);
|
||||
float val = Apple2Preferences.getFloatJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_SCREEN_DIVISION, (JOYSTICK_DIVIDER_NUM_CHOICES >> 1) / (float) JOYSTICK_DIVIDER_NUM_CHOICES);
|
||||
sb.setProgress((int) (val * JOYSTICK_DIVIDER_NUM_CHOICES));
|
||||
|
||||
mTouchMenuEnabled = Apple2Preferences.TOUCH_MENU_ENABLED.booleanValue(mActivity);
|
||||
Apple2Preferences.nativeSetTouchMenuEnabled(false);
|
||||
mSavedTouchDevice = Apple2Preferences.CURRENT_TOUCH_DEVICE.intValue(mActivity);
|
||||
Apple2Preferences.nativeSetCurrentTouchDevice(variant.ordinal());
|
||||
if (variant == Apple2Preferences.TouchDeviceVariant.JOYSTICK) {
|
||||
Apple2Preferences.loadAllJoystickButtons(mActivity);
|
||||
} else {
|
||||
Apple2Preferences.loadAllKeypadKeys(mActivity);
|
||||
}
|
||||
mTouchMenuEnabled = (boolean) Apple2Preferences.getJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.TOUCH_MENU_ENABLED);
|
||||
Apple2Preferences.setJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.TOUCH_MENU_ENABLED, false);
|
||||
mSavedTouchDevice = (int) Apple2Preferences.getJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, variant.ordinal());
|
||||
|
||||
Apple2Preferences.nativeTouchDeviceBeginCalibrationMode();
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN, Apple2Preferences.PREF_CALIBRATING, true);
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
}
|
||||
|
||||
public final boolean isCalibrating() {
|
||||
@ -85,7 +86,6 @@ public class Apple2JoystickCalibration implements Apple2MenuView {
|
||||
}
|
||||
|
||||
public void onKeyTapCalibrationEvent(char ascii, int scancode) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
public void show() {
|
||||
@ -102,9 +102,11 @@ public class Apple2JoystickCalibration implements Apple2MenuView {
|
||||
}
|
||||
}
|
||||
|
||||
Apple2Preferences.nativeTouchDeviceEndCalibrationMode();
|
||||
Apple2Preferences.nativeSetTouchMenuEnabled(mTouchMenuEnabled);
|
||||
Apple2Preferences.nativeSetCurrentTouchDevice(mSavedTouchDevice);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN, Apple2Preferences.PREF_CALIBRATING, false);
|
||||
Apple2Preferences.setJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.TOUCH_MENU_ENABLED, mTouchMenuEnabled);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, mSavedTouchDevice);
|
||||
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
|
||||
mActivity.popApple2View(this);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
package org.deadc0de.apple2ix;
|
||||
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
@ -24,6 +25,21 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
private final static String TAG = "Apple2JoystickSettingsMenu";
|
||||
|
||||
public final static int JOYSTICK_BUTTON_THRESHOLD_NUM_CHOICES = Apple2Preferences.DECENT_AMOUNT_OF_CHOICES;
|
||||
|
||||
public final static float JOYSTICK_AXIS_SENSITIVITY_MIN = 0.25f;
|
||||
public final static float JOYSTICK_AXIS_SENSITIVITY_DEFAULT = 1.f;
|
||||
public final static float JOYSTICK_AXIS_SENSITIVITY_MAX = 4.f;
|
||||
public final static float JOYSTICK_AXIS_SENSITIVITY_DEC_STEP = 0.05f;
|
||||
public final static float JOYSTICK_AXIS_SENSITIVITY_INC_STEP = 0.25f;
|
||||
public final static int JOYSTICK_AXIS_SENSITIVITY_DEC_NUMCHOICES = (int) ((JOYSTICK_AXIS_SENSITIVITY_DEFAULT - JOYSTICK_AXIS_SENSITIVITY_MIN) / JOYSTICK_AXIS_SENSITIVITY_DEC_STEP); // 15
|
||||
public final static int JOYSTICK_AXIS_SENSITIVITY_INC_NUMCHOICES = (int) ((JOYSTICK_AXIS_SENSITIVITY_MAX - JOYSTICK_AXIS_SENSITIVITY_DEFAULT) / JOYSTICK_AXIS_SENSITIVITY_INC_STEP); // 12
|
||||
public final static int JOYSTICK_AXIS_SENSITIVITY_NUM_CHOICES = JOYSTICK_AXIS_SENSITIVITY_DEC_NUMCHOICES + JOYSTICK_AXIS_SENSITIVITY_INC_NUMCHOICES; // 15 + 12
|
||||
|
||||
public final static int TAPDELAY_NUM_CHOICES = Apple2Preferences.DECENT_AMOUNT_OF_CHOICES;
|
||||
public final static float TAPDELAY_SCALE = 0.5f;
|
||||
|
||||
|
||||
public Apple2JoystickSettingsMenu(Apple2Activity activity) {
|
||||
super(activity);
|
||||
}
|
||||
@ -51,6 +67,18 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum TouchJoystickButtons {
|
||||
NONE(0),
|
||||
BUTTON1(1),
|
||||
BUTTON2(2),
|
||||
BOTH(3);
|
||||
private int butt;
|
||||
|
||||
TouchJoystickButtons(int butt) {
|
||||
this.butt = butt;
|
||||
}
|
||||
}
|
||||
|
||||
protected enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
JOYSTICK_TAP_BUTTON {
|
||||
@Override
|
||||
@ -63,6 +91,16 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_button_tap_button_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "jsTouchDownChar";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return TouchJoystickButtons.BUTTON1.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
@ -72,6 +110,7 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
final IMenuEnum self = this;
|
||||
_alertDialogHandleSelection(activity, R.string.joystick_button_tap_button, new String[]{
|
||||
activity.getResources().getString(R.string.joystick_button_button_none),
|
||||
activity.getResources().getString(R.string.joystick_button_button1),
|
||||
@ -80,12 +119,12 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
}, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.JOYSTICK_TAP_BUTTON.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.JOYSTICK_TAP_BUTTON.saveTouchJoystickButtons(activity, Apple2Preferences.TouchJoystickButtons.values()[value]);
|
||||
Apple2Preferences.setJSONPref(self, TouchJoystickButtons.values()[value].ordinal());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -101,6 +140,16 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_button_swipe_up_button_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "jsSwipeNorthChar";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return TouchJoystickButtons.BOTH.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
@ -110,6 +159,7 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
final IMenuEnum self = this;
|
||||
_alertDialogHandleSelection(activity, R.string.joystick_button_swipe_up_button, new String[]{
|
||||
activity.getResources().getString(R.string.joystick_button_button_none),
|
||||
activity.getResources().getString(R.string.joystick_button_button1),
|
||||
@ -118,12 +168,12 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
}, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.JOYSTICK_SWIPEUP_BUTTON.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.JOYSTICK_SWIPEUP_BUTTON.saveTouchJoystickButtons(activity, Apple2Preferences.TouchJoystickButtons.values()[value]);
|
||||
Apple2Preferences.setJSONPref(self, TouchJoystickButtons.values()[value].ordinal());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -139,6 +189,16 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_button_swipe_down_button_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "jsSwipeSouthChar";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return TouchJoystickButtons.BUTTON2.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
@ -148,6 +208,7 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
final IMenuEnum self = this;
|
||||
_alertDialogHandleSelection(activity, R.string.joystick_button_swipe_down_button, new String[]{
|
||||
activity.getResources().getString(R.string.joystick_button_button_none),
|
||||
activity.getResources().getString(R.string.joystick_button_button1),
|
||||
@ -156,12 +217,12 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
}, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.JOYSTICK_SWIPEDOWN_BUTTON.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.JOYSTICK_SWIPEDOWN_BUTTON.saveTouchJoystickButtons(activity, Apple2Preferences.TouchJoystickButtons.values()[value]);
|
||||
Apple2Preferences.setJSONPref(self, TouchJoystickButtons.values()[value].ordinal());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -192,7 +253,7 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
}
|
||||
|
||||
Apple2JoystickCalibration calibration = new Apple2JoystickCalibration(activity, viewStack, Apple2Preferences.TouchDeviceVariant.JOYSTICK);
|
||||
Apple2JoystickCalibration calibration = new Apple2JoystickCalibration(activity, viewStack, Apple2SettingsMenu.TouchDeviceVariant.JOYSTICK);
|
||||
|
||||
// show this new view...
|
||||
calibration.show();
|
||||
@ -214,22 +275,33 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_button_tapdelay_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "jsTapDelaySecs";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return ((float) 8 / TAPDELAY_NUM_CHOICES * TAPDELAY_SCALE); // -> 0.2f
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.TAPDELAY_NUM_CHOICES, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, TAPDELAY_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.JOYSTICK_TAPDELAY.saveInt(activity, progress);
|
||||
Apple2Preferences.setJSONPref(self, ((float) progress / TAPDELAY_NUM_CHOICES * TAPDELAY_SCALE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.JOYSTICK_TAPDELAY.intValue(activity);
|
||||
return (int) (Apple2Preferences.getFloatJSONPref(self) / TAPDELAY_SCALE * TAPDELAY_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showValue(int progress, final TextView seekBarValue) {
|
||||
seekBarValue.setText("" + (((float) progress / Apple2Preferences.TAPDELAY_NUM_CHOICES) * Apple2Preferences.TAPDELAY_SCALE));
|
||||
seekBarValue.setText("" + (((float) progress / TAPDELAY_NUM_CHOICES) * TAPDELAY_SCALE));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -253,9 +325,23 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_JOYSTICK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -317,37 +403,24 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.JOYSTICK_VISIBILITY.booleanValue(activity));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.JOYSTICK_VISIBILITY.saveBoolean(activity, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
}
|
||||
},
|
||||
JOYSTICK_AZIMUTH_VISIBILITY {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.joystick_azimuth_visible);
|
||||
public String getPrefKey() {
|
||||
return "showControls";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.joystick_azimuth_visible_summary);
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.JOYSTICK_AZIMUTH_VISIBILITY.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.JOYSTICK_AZIMUTH_VISIBILITY.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -364,20 +437,31 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_axisleft_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "axisIsOnLeft";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.JOYSTICK_AXIS_ON_LEFT.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.JOYSTICK_AXIS_ON_LEFT.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
}
|
||||
},
|
||||
JOYSTICK_AXIS_SENSITIVIY {
|
||||
JOYSTICK_AXIS_SENSITIVITY {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return "";
|
||||
@ -388,23 +472,51 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_axis_sensitivity_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "axisSensitivity";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 1.f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.JOYSTICK_AXIS_SENSITIVITY_NUM_CHOICES, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, JOYSTICK_AXIS_SENSITIVITY_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.JOYSTICK_AXIS_SENSITIVIY.saveInt(activity, progress);
|
||||
final int pivot = JOYSTICK_AXIS_SENSITIVITY_DEC_NUMCHOICES;
|
||||
float sensitivity = 1.f;
|
||||
if (progress < pivot) {
|
||||
int decAmount = (pivot - progress);
|
||||
sensitivity -= (JOYSTICK_AXIS_SENSITIVITY_DEC_STEP * decAmount);
|
||||
} else if (progress > pivot) {
|
||||
int incAmount = (progress - pivot);
|
||||
sensitivity += (JOYSTICK_AXIS_SENSITIVITY_INC_STEP * incAmount);
|
||||
}
|
||||
Apple2Preferences.setJSONPref(self, sensitivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.JOYSTICK_AXIS_SENSITIVIY.intValue(activity);
|
||||
float sensitivity = Apple2Preferences.getFloatJSONPref(self);
|
||||
int pivot = JOYSTICK_AXIS_SENSITIVITY_DEC_NUMCHOICES;
|
||||
if (sensitivity < 1.f) {
|
||||
pivot = Math.round((sensitivity - JOYSTICK_AXIS_SENSITIVITY_MIN) / JOYSTICK_AXIS_SENSITIVITY_DEC_STEP);
|
||||
} else if (sensitivity > 1.f) {
|
||||
sensitivity -= 1.f;
|
||||
pivot += Math.round(sensitivity / JOYSTICK_AXIS_SENSITIVITY_INC_STEP);
|
||||
}
|
||||
return pivot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showValue(int progress, final TextView seekBarValue) {
|
||||
saveInt(progress);
|
||||
int percent = (int) (Apple2Preferences.JOYSTICK_AXIS_SENSITIVIY.floatValue(activity) * 100.f);
|
||||
int percent = (int) (Apple2Preferences.getFloatJSONPref(self) * 100.f);
|
||||
seekBarValue.setText("" + percent + "%");
|
||||
}
|
||||
});
|
||||
@ -421,25 +533,38 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.joystick_button_threshold_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "switchThreshold";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 128;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.JOYSTICK_BUTTON_THRESHOLD_NUM_CHOICES, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, JOYSTICK_BUTTON_THRESHOLD_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
if (progress == 0) {
|
||||
progress = 1;
|
||||
}
|
||||
Apple2Preferences.JOYSTICK_BUTTON_THRESHOLD.saveInt(activity, progress);
|
||||
progress *= getJoystickButtonSwitchThresholdScale(activity);
|
||||
Apple2Preferences.setJSONPref(self, progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.JOYSTICK_BUTTON_THRESHOLD.intValue(activity);
|
||||
int progress = (int) Apple2Preferences.getJSONPref(self);
|
||||
return (progress / getJoystickButtonSwitchThresholdScale(activity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showValue(int progress, final TextView seekBarValue) {
|
||||
int threshold = progress * Apple2Preferences.getJoystickButtonSwitchThresholdScale(activity);
|
||||
int threshold = progress * getJoystickButtonSwitchThresholdScale(activity);
|
||||
seekBarValue.setText("" + threshold + " pts");
|
||||
}
|
||||
});
|
||||
@ -448,9 +573,13 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_JOYSTICK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -468,4 +597,17 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int getJoystickButtonSwitchThresholdScale(Apple2Activity activity) {
|
||||
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
|
||||
int smallScreenAxis = dm.widthPixels < dm.heightPixels ? dm.widthPixels : dm.heightPixels;
|
||||
int oneThirdScreenAxis = smallScreenAxis / 3;
|
||||
|
||||
// largest switch threshold value is 1/3 small dimension of screen
|
||||
return oneThirdScreenAxis / JOYSTICK_BUTTON_THRESHOLD_NUM_CHOICES;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
package org.deadc0de.apple2ix;
|
||||
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
@ -106,14 +107,30 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.touch_menu_enable_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_KEYBOARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "touchMenuEnabled";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.TOUCH_MENU_ENABLED.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.TOUCH_MENU_ENABLED.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -130,17 +147,28 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keyboard_visibility_inactive_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "minAlpha";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return (float) 5 / Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.KEYBOARD_VISIBILITY_INACTIVE.saveInt(activity, progress);
|
||||
Apple2Preferences.setJSONPref(self, (float) progress / Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.KEYBOARD_VISIBILITY_INACTIVE.intValue(activity);
|
||||
return Math.round(Apple2Preferences.getFloatJSONPref(self) * (Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -161,17 +189,28 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keyboard_visibility_active_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "maxAlpha";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 1.f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.KEYBOARD_VISIBILITY_ACTIVE.saveInt(activity, progress);
|
||||
Apple2Preferences.setJSONPref(self, (float) progress / Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.KEYBOARD_VISIBILITY_ACTIVE.intValue(activity);
|
||||
return Math.round(Apple2Preferences.getFloatJSONPref(self) * (Apple2Preferences.ALPHA_SLIDER_NUM_CHOICES));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -192,14 +231,25 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keyboard_click_enabled_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "keyClickEnabled";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.KEYBOARD_CLICK_ENABLED.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
final IMenuEnum self = this;
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.KEYBOARD_CLICK_ENABLED.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -216,14 +266,25 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keyboard_lowercase_enabled_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "lowercaseEnabled";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.KEYBOARD_LOWERCASE_ENABLED.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
final IMenuEnum self = this;
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.KEYBOARD_LOWERCASE_ENABLED.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -240,6 +301,16 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keyboard_choose_alt_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "altPathIndex";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
@ -250,7 +321,7 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
|
||||
File extKeyboardDir = Apple2DisksMenu.getExternalStorageDirectory(activity);
|
||||
File extKeyboardDir = Apple2Utils.getExternalStorageDirectory(activity);
|
||||
|
||||
FilenameFilter kbdJsonFilter = new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
@ -279,7 +350,7 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
if (files == null) {
|
||||
// read keyboard data from /data/data/...
|
||||
File keyboardDir = new File(Apple2DisksMenu.getDataDir(activity) + File.separator + "keyboards");
|
||||
File keyboardDir = new File(Apple2Utils.getDataDir(activity) + File.separator + "keyboards");
|
||||
files = keyboardDir.listFiles(kbdJsonFilter);
|
||||
if (files == null) {
|
||||
Log.e(TAG, "OOPS, could not read keyboard data directory");
|
||||
@ -299,17 +370,18 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
final String keyboardDirName = extKeyboardDir == null ? "Keyboards" : extKeyboardDir.getPath();
|
||||
|
||||
final IMenuEnum self = this;
|
||||
_alertDialogHandleSelection(activity, keyboardDirName, titles, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.KEYBOARD_ALT.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.KEYBOARD_ALT.saveInt(activity, value);
|
||||
Apple2Preferences.setJSONPref(self, value);
|
||||
String path = allFiles[value].getPath();
|
||||
Apple2Preferences.KEYBOARD_ALT_PATH.saveString(activity, path);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_KEYBOARD, "altPath", path);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -325,15 +397,29 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keyboard_glyph_scale_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "glyphMultiplier";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
int glyphScale = Apple2Preferences.KEYBOARD_GLYPH_SCALE.intValue(activity);
|
||||
int glyphScale = (int) Apple2Preferences.getJSONPref(this);
|
||||
if (glyphScale <= 0) {
|
||||
glyphScale = 1;
|
||||
}
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, glyphScale > 1);
|
||||
final IMenuEnum self = this;
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.KEYBOARD_GLYPH_SCALE.saveInt(activity, isChecked ? 2 : 1);
|
||||
Apple2Preferences.setJSONPref(self, isChecked ? 2 : 1);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -342,9 +428,23 @@ public class Apple2KeyboardSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_KEYBOARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,6 +23,8 @@ import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
|
||||
@ -33,12 +35,10 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
private ArrayList<Apple2MenuView> mViewStack = null;
|
||||
private TextView mCurrentChoicePrompt = null;
|
||||
|
||||
private String[] foo = null;
|
||||
|
||||
private STATE_MACHINE mChooserState = STATE_MACHINE.CHOOSE_NORTHWEST;
|
||||
|
||||
private boolean mTouchMenuEnabled = false;
|
||||
private int mSavedTouchDevice = Apple2Preferences.TouchDeviceVariant.NONE.ordinal();
|
||||
private int mSavedTouchDevice = Apple2SettingsMenu.TouchDeviceVariant.NONE.ordinal();
|
||||
|
||||
public Apple2KeypadChooser(Apple2Activity activity, ArrayList<Apple2MenuView> viewStack) {
|
||||
mActivity = activity;
|
||||
@ -60,8 +60,13 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
|
||||
String asciiStr = asciiRepresentation(ascii);
|
||||
Log.d(TAG, "ascii:'" + asciiStr + "' scancode:" + scancode);
|
||||
mChooserState.setValues(mActivity, ascii, scancode);
|
||||
Apple2Preferences.nativeSetCurrentTouchDevice(Apple2Preferences.TouchDeviceVariant.JOYSTICK_KEYPAD.ordinal());
|
||||
if (ascii == ' ') {
|
||||
ascii = Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE;
|
||||
}
|
||||
mChooserState.setKey(mActivity, ascii, scancode);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, Apple2SettingsMenu.TouchDeviceVariant.JOYSTICK_KEYPAD.ordinal());
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
|
||||
mCurrentChoicePrompt.setText(getNextChoiceString() + asciiStr);
|
||||
switch (mChooserState) {
|
||||
case CHOOSE_TAP:
|
||||
@ -82,13 +87,22 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
break;
|
||||
}
|
||||
|
||||
calibrationContinue();
|
||||
}
|
||||
|
||||
private void calibrationContinue() {
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mChooserState = mChooserState.next();
|
||||
mCurrentChoicePrompt.setText(getNextChoiceString());
|
||||
Apple2Preferences.nativeSetCurrentTouchDevice(Apple2Preferences.TouchDeviceVariant.KEYBOARD.ordinal());
|
||||
if (mChooserState.ordinal() == 0) {
|
||||
dismiss();
|
||||
} else {
|
||||
mCurrentChoicePrompt.setText(getNextChoiceString());
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, Apple2SettingsMenu.TouchDeviceVariant.KEYBOARD.ordinal());
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
@ -101,15 +115,19 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
}
|
||||
|
||||
public void dismiss() {
|
||||
|
||||
for (Apple2MenuView apple2MenuView : mViewStack) {
|
||||
if (apple2MenuView != this) {
|
||||
mActivity.pushApple2View(apple2MenuView);
|
||||
}
|
||||
}
|
||||
|
||||
Apple2Preferences.nativeTouchDeviceEndCalibrationMode();
|
||||
Apple2Preferences.nativeSetTouchMenuEnabled(mTouchMenuEnabled);
|
||||
Apple2Preferences.nativeSetCurrentTouchDevice(mSavedTouchDevice);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN, Apple2Preferences.PREF_CALIBRATING, false);
|
||||
|
||||
Apple2Preferences.setJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.TOUCH_MENU_ENABLED, mTouchMenuEnabled);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, mSavedTouchDevice);
|
||||
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
|
||||
mActivity.popApple2View(this);
|
||||
}
|
||||
@ -130,6 +148,8 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
// internals
|
||||
|
||||
private void setup() {
|
||||
mChooserState.start();
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mSettingsView = inflater.inflate(R.layout.activity_chooser_keypad, null, false);
|
||||
|
||||
@ -140,17 +160,28 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
skipButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Apple2KeypadChooser.this.onKeyTapCalibrationEvent((char)Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, Apple2SettingsMenu.TouchDeviceVariant.JOYSTICK_KEYPAD.ordinal());
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
calibrationContinue();
|
||||
}
|
||||
});
|
||||
|
||||
Button noneButton = (Button) mSettingsView.findViewById(R.id.noneButton);
|
||||
noneButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onKeyTapCalibrationEvent((char) Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
}
|
||||
});
|
||||
|
||||
// temporarily undo these native touch settings while calibrating...
|
||||
mTouchMenuEnabled = Apple2Preferences.TOUCH_MENU_ENABLED.booleanValue(mActivity);
|
||||
Apple2Preferences.nativeSetTouchMenuEnabled(false);
|
||||
mSavedTouchDevice = Apple2Preferences.CURRENT_TOUCH_DEVICE.intValue(mActivity);
|
||||
Apple2Preferences.nativeSetCurrentTouchDevice(Apple2Preferences.TouchDeviceVariant.KEYBOARD.ordinal());
|
||||
mTouchMenuEnabled = (boolean) Apple2Preferences.getJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.TOUCH_MENU_ENABLED);
|
||||
Apple2Preferences.setJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.TOUCH_MENU_ENABLED, false);
|
||||
mSavedTouchDevice = (int) Apple2Preferences.getJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, Apple2SettingsMenu.TouchDeviceVariant.KEYBOARD.ordinal());
|
||||
|
||||
Apple2Preferences.nativeTouchDeviceBeginCalibrationMode();
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN, Apple2Preferences.PREF_CALIBRATING, true);
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
}
|
||||
|
||||
private String asciiRepresentation(char ascii) {
|
||||
@ -194,140 +225,133 @@ public class Apple2KeypadChooser implements Apple2MenuView {
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_ul);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_NORTHWEST_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_NORTH {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_up);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_NORTH_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_NORTHEAST {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_ur);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_NORTHEAST_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_WEST {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_l);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_WEST_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_CENTER {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_CENTER_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_EAST {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_r);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_EAST_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_SOUTHWEST {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_dl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_SOUTHWEST_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_SOUTH {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_dn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_SOUTH_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_SOUTHEAST {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_axis_dr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_SOUTHEAST_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_TAP {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_button_tap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_TAP_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_SWIPEUP {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_button_swipeup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_SWIPEUP_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
},
|
||||
CHOOSE_SWIPEDOWN {
|
||||
@Override
|
||||
public String getKeyName(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_key_button_swipedown);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(Apple2Activity activity, char ascii, int scancode) {
|
||||
Apple2Preferences.KEYPAD_SWIPEDOWN_KEY.saveChosenKey(activity, ascii, scancode);
|
||||
}
|
||||
};
|
||||
|
||||
public static final int size = STATE_MACHINE.values().length;
|
||||
|
||||
public abstract void setValues(Apple2Activity activity, char ascii, int scancode);
|
||||
private static ArrayList<String> chars = null;
|
||||
private static ArrayList<String> scans = null;
|
||||
|
||||
public void setKey(Apple2Activity activity, int ascii, int scancode) {
|
||||
int ord = ordinal();
|
||||
if (ord < CHOOSE_TAP.ordinal()) {
|
||||
chars.set(ord, "" + ascii);
|
||||
scans.set(ord, "" + scancode);
|
||||
Apple2KeypadSettingsMenu.KeypadPreset.saveRosettes(chars, scans);
|
||||
} else if (ord == CHOOSE_TAP.ordinal()) {
|
||||
Apple2KeypadSettingsMenu.KeypadPreset.saveTouchDownKey(ascii, scancode);
|
||||
} else if (ord == CHOOSE_SWIPEUP.ordinal()) {
|
||||
Apple2KeypadSettingsMenu.KeypadPreset.saveSwipeNorthKey(ascii, scancode);
|
||||
} else if (ord == CHOOSE_SWIPEDOWN.ordinal()) {
|
||||
Apple2KeypadSettingsMenu.KeypadPreset.saveSwipeSouthKey(ascii, scancode);
|
||||
} else {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
Apple2Preferences.sync(activity, Apple2Preferences.PREF_DOMAIN_JOYSTICK);
|
||||
}
|
||||
|
||||
public abstract String getKeyName(Apple2Activity activity);
|
||||
|
||||
public void start() {
|
||||
|
||||
JSONArray jsonChars = (JSONArray) Apple2Preferences.getJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, Apple2KeypadSettingsMenu.PREF_KPAD_ROSETTE_CHAR_ARRAY, null);
|
||||
JSONArray jsonScans = (JSONArray) Apple2Preferences.getJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, Apple2KeypadSettingsMenu.PREF_KPAD_ROSETTE_SCAN_ARRAY, null);
|
||||
|
||||
if (jsonChars == null || jsonScans == null) {
|
||||
Log.v(TAG, "Creating new keypad joystick JSON...");
|
||||
jsonChars = new JSONArray();
|
||||
jsonScans = new JSONArray();
|
||||
for (int i = 0; i < Apple2KeypadSettingsMenu.ROSETTE_SIZE; i++) {
|
||||
jsonChars.put(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION);
|
||||
jsonScans.put(-1);
|
||||
}
|
||||
}
|
||||
|
||||
int len = jsonChars.length();
|
||||
if (len != Apple2KeypadSettingsMenu.ROSETTE_SIZE) {
|
||||
throw new RuntimeException("jsonChars not expected length");
|
||||
}
|
||||
if (len != jsonScans.length()) {
|
||||
throw new RuntimeException("jsonScans not expected length");
|
||||
}
|
||||
|
||||
chars = new ArrayList<String>();
|
||||
scans = new ArrayList<String>();
|
||||
try {
|
||||
for (int i = 0; i < len; i++) {
|
||||
Apple2KeypadSettingsMenu.KeypadPreset.addRosetteKey(chars, scans, jsonChars.getInt(i), jsonScans.getInt(i));
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public STATE_MACHINE next() {
|
||||
int nextOrd = this.ordinal() + 1;
|
||||
if (nextOrd >= size) {
|
||||
|
@ -17,11 +17,25 @@ import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
import org.json.JSONArray;
|
||||
|
||||
public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
private final static String TAG = "Apple2KeypadSettingsMenu";
|
||||
|
||||
public final static int KEYREPEAT_NUM_CHOICES = Apple2Preferences.DECENT_AMOUNT_OF_CHOICES;
|
||||
|
||||
public final static String PREF_KPAD_ROSETTE_CHAR_ARRAY = "kpAxisRosetteChars";
|
||||
public final static String PREF_KPAD_ROSETTE_SCAN_ARRAY = "kpAxisRosetteScancodes";
|
||||
public final static String PREF_KPAD_SWIPE_NORTH_CHAR = "kpSwipeNorthChar";
|
||||
public final static String PREF_KPAD_SWIPE_NORTH_SCAN = "kpSwipeNorthScancode";
|
||||
public final static String PREF_KPAD_SWIPE_SOUTH_CHAR = "kpSwipeSouthChar";
|
||||
public final static String PREF_KPAD_SWIPE_SOUTH_SCAN = "kpSwipeSouthScancode";
|
||||
public final static String PREF_KPAD_TOUCHDOWN_CHAR = "kpTouchDownChar";
|
||||
public final static String PREF_KPAD_TOUCHDOWN_SCAN = "kpTouchDownScancode";
|
||||
|
||||
public final static int ROSETTE_SIZE = 9;
|
||||
|
||||
public Apple2KeypadSettingsMenu(Apple2Activity activity) {
|
||||
super(activity);
|
||||
}
|
||||
@ -49,6 +63,212 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum KeypadPreset {
|
||||
ARROWS_SPACE {
|
||||
@Override
|
||||
public String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_preset_arrows_space);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Apple2Activity activity) {
|
||||
ArrayList<String> chars = new ArrayList<String>();
|
||||
ArrayList<String> scans = new ArrayList<String>();
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_UP, Apple2KeyboardSettingsMenu.SCANCODE_UP);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_LEFT, Apple2KeyboardSettingsMenu.SCANCODE_LEFT);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_RIGHT, Apple2KeyboardSettingsMenu.SCANCODE_RIGHT);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_DOWN, Apple2KeyboardSettingsMenu.SCANCODE_DOWN);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveRosettes(chars, scans);
|
||||
|
||||
saveTouchDownKey(Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE, Apple2KeyboardSettingsMenu.SCANCODE_SPACE);
|
||||
saveSwipeSouthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveSwipeNorthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
}
|
||||
},
|
||||
AZ_LEFT_RIGHT_SPACE {
|
||||
@Override
|
||||
public String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_preset_az_left_right_space);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Apple2Activity activity) {
|
||||
ArrayList<String> chars = new ArrayList<String>();
|
||||
ArrayList<String> scans = new ArrayList<String>();
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'A', Apple2KeyboardSettingsMenu.SCANCODE_A);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_LEFT, Apple2KeyboardSettingsMenu.SCANCODE_LEFT);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_RIGHT, Apple2KeyboardSettingsMenu.SCANCODE_RIGHT);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'Z', Apple2KeyboardSettingsMenu.SCANCODE_Z);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveRosettes(chars, scans);
|
||||
|
||||
saveTouchDownKey(Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE, Apple2KeyboardSettingsMenu.SCANCODE_SPACE);
|
||||
saveSwipeSouthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveSwipeNorthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
}
|
||||
},
|
||||
LEFT_RIGHT_SPACE {
|
||||
@Override
|
||||
public String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_preset_left_right_space);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Apple2Activity activity) {
|
||||
ArrayList<String> chars = new ArrayList<String>();
|
||||
ArrayList<String> scans = new ArrayList<String>();
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_LEFT, Apple2KeyboardSettingsMenu.SCANCODE_LEFT);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.MOUSETEXT_RIGHT, Apple2KeyboardSettingsMenu.SCANCODE_RIGHT);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveRosettes(chars, scans);
|
||||
|
||||
saveTouchDownKey(Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE, Apple2KeyboardSettingsMenu.SCANCODE_SPACE);
|
||||
saveSwipeSouthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveSwipeNorthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
}
|
||||
},
|
||||
IJKM_SPACE {
|
||||
@Override
|
||||
public String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_preset_ijkm_space);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Apple2Activity activity) {
|
||||
ArrayList<String> chars = new ArrayList<String>();
|
||||
ArrayList<String> scans = new ArrayList<String>();
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'I', Apple2KeyboardSettingsMenu.SCANCODE_I);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'J', Apple2KeyboardSettingsMenu.SCANCODE_J);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'K', Apple2KeyboardSettingsMenu.SCANCODE_K);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'M', Apple2KeyboardSettingsMenu.SCANCODE_M);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveRosettes(chars, scans);
|
||||
|
||||
saveTouchDownKey(Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE, Apple2KeyboardSettingsMenu.SCANCODE_SPACE);
|
||||
saveSwipeSouthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveSwipeNorthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
}
|
||||
},
|
||||
WADX_SPACE {
|
||||
@Override
|
||||
public String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_preset_wadx_space);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Apple2Activity activity) {
|
||||
ArrayList<String> chars = new ArrayList<String>();
|
||||
ArrayList<String> scans = new ArrayList<String>();
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'W', Apple2KeyboardSettingsMenu.SCANCODE_W);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'A', Apple2KeyboardSettingsMenu.SCANCODE_A);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'D', Apple2KeyboardSettingsMenu.SCANCODE_D);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
addRosetteKey(chars, scans, 'X', Apple2KeyboardSettingsMenu.SCANCODE_X);
|
||||
addRosetteKey(chars, scans, Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveRosettes(chars, scans);
|
||||
|
||||
saveTouchDownKey(Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE, Apple2KeyboardSettingsMenu.SCANCODE_SPACE);
|
||||
saveSwipeSouthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
saveSwipeNorthKey(Apple2KeyboardSettingsMenu.ICONTEXT_NONACTION, -1);
|
||||
}
|
||||
},
|
||||
CRAZY_SEAFOX_KEYS {
|
||||
@Override
|
||||
public String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.keypad_preset_crazy_seafox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(Apple2Activity activity) {
|
||||
// Heh, the entire purpose of the keypad-variant touch joystick is to make this possible ;-)
|
||||
ArrayList<String> chars = new ArrayList<String>();
|
||||
ArrayList<String> scans = new ArrayList<String>();
|
||||
addRosetteKey(chars, scans, 'Y', Apple2KeyboardSettingsMenu.SCANCODE_Y);
|
||||
addRosetteKey(chars, scans, 'U', Apple2KeyboardSettingsMenu.SCANCODE_U);
|
||||
addRosetteKey(chars, scans, 'I', Apple2KeyboardSettingsMenu.SCANCODE_I);
|
||||
addRosetteKey(chars, scans, 'H', Apple2KeyboardSettingsMenu.SCANCODE_H);
|
||||
addRosetteKey(chars, scans, 'J', Apple2KeyboardSettingsMenu.SCANCODE_J);
|
||||
addRosetteKey(chars, scans, 'K', Apple2KeyboardSettingsMenu.SCANCODE_K);
|
||||
addRosetteKey(chars, scans, 'N', Apple2KeyboardSettingsMenu.SCANCODE_N);
|
||||
addRosetteKey(chars, scans, 'M', Apple2KeyboardSettingsMenu.SCANCODE_M);
|
||||
addRosetteKey(chars, scans, ',', Apple2KeyboardSettingsMenu.SCANCODE_COMMA);
|
||||
saveRosettes(chars, scans);
|
||||
|
||||
saveTouchDownKey('D', Apple2KeyboardSettingsMenu.SCANCODE_D);
|
||||
saveSwipeSouthKey('F', Apple2KeyboardSettingsMenu.SCANCODE_F);
|
||||
saveSwipeNorthKey(Apple2KeyboardSettingsMenu.ICONTEXT_VISUAL_SPACE, Apple2KeyboardSettingsMenu.SCANCODE_SPACE);
|
||||
}
|
||||
};
|
||||
|
||||
public static void addRosetteKey(ArrayList<String> chars, ArrayList<String> scans, int aChar, int aScan) {
|
||||
chars.add("" + aChar);
|
||||
scans.add("" + aScan);
|
||||
}
|
||||
|
||||
public static void saveRosettes(ArrayList<String> chars, ArrayList<String> scans) {
|
||||
if (chars.size() != 9) {
|
||||
throw new RuntimeException("rosette chars is not correct size");
|
||||
}
|
||||
if (scans.size() != 9) {
|
||||
throw new RuntimeException("rosette scans is not correct size");
|
||||
}
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_ROSETTE_CHAR_ARRAY, new JSONArray(chars));
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_ROSETTE_SCAN_ARRAY, new JSONArray(scans));
|
||||
}
|
||||
|
||||
public static void saveTouchDownKey(int aChar, int aScan) {
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_TOUCHDOWN_CHAR, aChar);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_TOUCHDOWN_SCAN, aScan);
|
||||
}
|
||||
|
||||
public static void saveSwipeSouthKey(int aChar, int aScan) {
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_SWIPE_SOUTH_CHAR, aChar);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_SWIPE_SOUTH_SCAN, aScan);
|
||||
}
|
||||
|
||||
public static void saveSwipeNorthKey(int aChar, int aScan) {
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_SWIPE_NORTH_CHAR, aChar);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_JOYSTICK, PREF_KPAD_SWIPE_NORTH_SCAN, aScan);
|
||||
}
|
||||
|
||||
public abstract String getTitle(Apple2Activity activity);
|
||||
|
||||
public abstract void apply(Apple2Activity activity);
|
||||
|
||||
public static final int size = KeypadPreset.values().length;
|
||||
|
||||
public static String[] titles(Apple2Activity activity) {
|
||||
String[] titles = new String[size];
|
||||
int i = 0;
|
||||
for (KeypadPreset preset : values()) {
|
||||
titles[i++] = preset.getTitle(activity);
|
||||
}
|
||||
return titles;
|
||||
}
|
||||
}
|
||||
|
||||
enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
KEYPAD_CHOOSE_KEYS {
|
||||
@Override
|
||||
@ -61,6 +281,16 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keypad_choose_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "kpPresetChoice";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return KeypadPreset.IJKM_SPACE.ordinal() + 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
@ -70,24 +300,25 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
String[] titles = new String[Apple2Preferences.KeypadPreset.size + 1];
|
||||
final IMenuEnum self = this;
|
||||
String[] titles = new String[KeypadPreset.size + 1];
|
||||
titles[0] = activity.getResources().getString(R.string.keypad_preset_custom);
|
||||
System.arraycopy(Apple2Preferences.KeypadPreset.titles(activity), 0, titles, 1, Apple2Preferences.KeypadPreset.size);
|
||||
System.arraycopy(KeypadPreset.titles(activity), 0, titles, 1, KeypadPreset.size);
|
||||
|
||||
_alertDialogHandleSelection(activity, R.string.keypad_choose_title, titles, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.KEYPAD_KEYS.intValue(activity);
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.KEYPAD_KEYS.saveInt(activity, value);
|
||||
Apple2Preferences.setJSONPref(self, value);
|
||||
if (value == 0) {
|
||||
Apple2KeypadSettingsMenu keypadSettingsMenu = (Apple2KeypadSettingsMenu) settingsMenu;
|
||||
keypadSettingsMenu.chooseKeys(activity);
|
||||
} else {
|
||||
Apple2Preferences.KeypadPreset.values()[value - 1].apply(activity);
|
||||
KeypadPreset.values()[value - 1].apply(activity);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -119,7 +350,7 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
}
|
||||
|
||||
Apple2JoystickCalibration calibration = new Apple2JoystickCalibration(activity, viewStack, Apple2Preferences.TouchDeviceVariant.JOYSTICK_KEYPAD);
|
||||
Apple2JoystickCalibration calibration = new Apple2JoystickCalibration(activity, viewStack, Apple2SettingsMenu.TouchDeviceVariant.JOYSTICK_KEYPAD);
|
||||
|
||||
// show this new view...
|
||||
calibration.show();
|
||||
@ -149,9 +380,23 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_JOYSTICK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -197,7 +442,7 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
}
|
||||
|
||||
protected static class KeypadAdvanced extends Apple2AbstractMenu {
|
||||
public static class KeypadAdvanced extends Apple2AbstractMenu {
|
||||
|
||||
private final static String TAG = "KeypadAdvanced";
|
||||
|
||||
@ -240,22 +485,33 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.keypad_repeat_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "keyRepeatThresholdSecs";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return (float) 4 / KEYREPEAT_NUM_CHOICES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
return _sliderView(activity, this, Apple2Preferences.KEYREPEAT_NUM_CHOICES, new IPreferenceSlider() {
|
||||
final IMenuEnum self = this;
|
||||
return _sliderView(activity, this, KEYREPEAT_NUM_CHOICES, new IPreferenceSlider() {
|
||||
@Override
|
||||
public void saveInt(int progress) {
|
||||
Apple2Preferences.KEYREPEAT_THRESHOLD.saveInt(activity, progress);
|
||||
Apple2Preferences.setJSONPref(self, (float) progress / KEYREPEAT_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.KEYREPEAT_THRESHOLD.intValue(activity);
|
||||
return (int) (Apple2Preferences.getFloatJSONPref(self) * KEYREPEAT_NUM_CHOICES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showValue(int progress, final TextView seekBarValue) {
|
||||
seekBarValue.setText("" + ((float) progress / Apple2Preferences.KEYREPEAT_NUM_CHOICES));
|
||||
seekBarValue.setText("" + ((float) progress / KEYREPEAT_NUM_CHOICES));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -279,9 +535,23 @@ public class Apple2KeypadSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_JOYSTICK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,9 +23,11 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
@ -100,7 +102,7 @@ public class Apple2MainMenu {
|
||||
@Override
|
||||
public void handleSelection(Apple2MainMenu mainMenu) {
|
||||
if (!mainMenu.mShowingSaveRestore.compareAndSet(false, true)) {
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race around save/restore");
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race around sync/restore");
|
||||
return;
|
||||
}
|
||||
mainMenu.maybeSaveRestore();
|
||||
@ -250,14 +252,30 @@ public class Apple2MainMenu {
|
||||
|
||||
final AtomicBoolean selectionAlreadyHandled = new AtomicBoolean(false);
|
||||
|
||||
AlertDialog rebootQuitDialog = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.quit_reboot).setMessage(R.string.quit_reboot_choice).setPositiveButton(R.string.reboot, new DialogInterface.OnClickListener() {
|
||||
LayoutInflater inflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
final View resetConfirmationView = inflater.inflate(R.layout.a2reset_confirmation, null, false);
|
||||
|
||||
final RadioButton openAppleSelected = (RadioButton) resetConfirmationView.findViewById(R.id.radioButton_openApple);
|
||||
openAppleSelected.setChecked(true);
|
||||
final RadioButton closedAppleSelected = (RadioButton) resetConfirmationView.findViewById(R.id.radioButton_closedApple);
|
||||
closedAppleSelected.setChecked(false);
|
||||
final RadioButton noAppleSelected = (RadioButton) resetConfirmationView.findViewById(R.id.radioButton_noApple);
|
||||
noAppleSelected.setChecked(false);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.quit_reboot).setMessage(R.string.quit_reboot_choice).setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race in reboot/quit onClick()");
|
||||
return;
|
||||
}
|
||||
mActivity.rebootEmulation();
|
||||
int resetState = 0;
|
||||
if (openAppleSelected.isChecked()) {
|
||||
resetState = 1;
|
||||
} else if (closedAppleSelected.isChecked()) {
|
||||
resetState = 2;
|
||||
}
|
||||
mActivity.rebootEmulation(resetState);
|
||||
Apple2MainMenu.this.dismiss();
|
||||
}
|
||||
}).setNeutralButton(R.string.quit, new DialogInterface.OnClickListener() {
|
||||
@ -269,7 +287,10 @@ public class Apple2MainMenu {
|
||||
}
|
||||
mActivity.quitEmulator();
|
||||
}
|
||||
}).setNegativeButton(R.string.cancel, null).create();
|
||||
}).setNegativeButton(R.string.cancel, null);
|
||||
|
||||
builder.setView(resetConfirmationView);
|
||||
AlertDialog rebootQuitDialog = builder.create();
|
||||
|
||||
mActivity.registerAndShowDialog(rebootQuitDialog);
|
||||
}
|
||||
@ -278,7 +299,7 @@ public class Apple2MainMenu {
|
||||
public void maybeSaveRestore() {
|
||||
mActivity.pauseEmulation();
|
||||
|
||||
final String quickSavePath = Apple2DisksMenu.getDataDir(mActivity) + File.separator + SAVE_FILE;
|
||||
final String quickSavePath = Apple2Utils.getDataDir(mActivity) + File.separator + SAVE_FILE;
|
||||
|
||||
final AtomicBoolean selectionAlreadyHandled = new AtomicBoolean(false);
|
||||
|
||||
@ -286,7 +307,7 @@ public class Apple2MainMenu {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race in save/restore onClick()");
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race in sync/restore onClick()");
|
||||
return;
|
||||
}
|
||||
mActivity.saveState(quickSavePath);
|
||||
@ -296,7 +317,7 @@ public class Apple2MainMenu {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (!selectionAlreadyHandled.compareAndSet(false, true)) {
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race in save/restore onClick()");
|
||||
Log.v(TAG, "OMG, avoiding nasty UI race in sync/restore onClick()");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -305,13 +326,13 @@ public class Apple2MainMenu {
|
||||
JSONObject map = new JSONObject(jsonData);
|
||||
String diskPath1 = map.getString("disk1");
|
||||
boolean readOnly1 = map.getBoolean("readOnly1");
|
||||
Apple2Preferences.CURRENT_DISK_A.setPath(mActivity, diskPath1);
|
||||
Apple2Preferences.CURRENT_DISK_A_RO.saveBoolean(mActivity, readOnly1);
|
||||
Apple2Preferences.setJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_A, diskPath1);
|
||||
Apple2Preferences.setJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_A_RO, readOnly1);
|
||||
|
||||
String diskPath2 = map.getString("disk2");
|
||||
boolean readOnly2 = map.getBoolean("readOnly2");
|
||||
Apple2Preferences.CURRENT_DISK_B.setPath(mActivity, diskPath2);
|
||||
Apple2Preferences.CURRENT_DISK_B_RO.saveBoolean(mActivity, readOnly2);
|
||||
Apple2Preferences.setJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_B, diskPath2);
|
||||
Apple2Preferences.setJSONPref(Apple2DisksMenu.SETTINGS.CURRENT_DISK_PATH_B_RO, readOnly2);
|
||||
} catch (JSONException je) {
|
||||
Log.v(TAG, "OOPS : " + je);
|
||||
}
|
||||
|
@ -0,0 +1,221 @@
|
||||
/*
|
||||
* Apple // emulator for *nix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*
|
||||
* Copyright 2015 Aaron Culliney
|
||||
*
|
||||
*/
|
||||
|
||||
package org.deadc0de.apple2ix;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.VerticalSeekBar;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Apple2PortraitCalibration implements Apple2MenuView {
|
||||
|
||||
public enum States implements Apple2AbstractMenu.IMenuEnum {
|
||||
CALIBRATE_KEYBOARD_HEIGHT_SCALE {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "portraitHeightScale";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return (float) (PORTRAIT_CALIBRATE_NUM_CHOICES >> 1) / PORTRAIT_CALIBRATE_NUM_CHOICES;
|
||||
}
|
||||
},
|
||||
CALIBRATE_FRAMEBUFFER_POSITION_SCALE {
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_VIDEO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "portraitPositionScale";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 3.f / 4;
|
||||
}
|
||||
},
|
||||
CALIBRATE_KEYBOARD_POSITION_SCALE {
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "portraitPositionScale";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return 0.f;
|
||||
}
|
||||
};
|
||||
|
||||
public static final int size = States.values().length;
|
||||
|
||||
States next() {
|
||||
int ord = (ordinal() + 1) % size;
|
||||
return States.values()[ord];
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_KEYBOARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
|
||||
private final static String TAG = "Apple2PortraitCalibration";
|
||||
|
||||
public final static int PORTRAIT_CALIBRATE_NUM_CHOICES = 100;
|
||||
|
||||
private Apple2Activity mActivity = null;
|
||||
private View mSettingsView = null;
|
||||
private ArrayList<Apple2MenuView> mViewStack = null;
|
||||
private int mSavedTouchDevice = Apple2SettingsMenu.TouchDeviceVariant.NONE.ordinal();
|
||||
private States mStateMachine = States.CALIBRATE_KEYBOARD_HEIGHT_SCALE;
|
||||
|
||||
public Apple2PortraitCalibration(Apple2Activity activity, ArrayList<Apple2MenuView> viewStack) {
|
||||
mActivity = activity;
|
||||
mViewStack = viewStack;
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mSettingsView = inflater.inflate(R.layout.activity_calibrate_portrait, null, false);
|
||||
|
||||
final Button calibrateButton = (Button) mSettingsView.findViewById(R.id.button_calibrate);
|
||||
final VerticalSeekBar vsb = (VerticalSeekBar) mSettingsView.findViewById(R.id.seekbar_vertical);
|
||||
|
||||
final int firstProgress = Math.round(Apple2Preferences.getFloatJSONPref(States.CALIBRATE_KEYBOARD_HEIGHT_SCALE) * PORTRAIT_CALIBRATE_NUM_CHOICES);
|
||||
vsb.setProgress(firstProgress);
|
||||
|
||||
calibrateButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mStateMachine = mStateMachine.next();
|
||||
switch (mStateMachine) {
|
||||
case CALIBRATE_KEYBOARD_HEIGHT_SCALE:
|
||||
calibrateButton.setText(R.string.portrait_calibrate_keyboard_height);
|
||||
vsb.setProgress(Math.round(Apple2Preferences.getFloatJSONPref(States.CALIBRATE_KEYBOARD_HEIGHT_SCALE) * PORTRAIT_CALIBRATE_NUM_CHOICES));
|
||||
break;
|
||||
case CALIBRATE_FRAMEBUFFER_POSITION_SCALE:
|
||||
calibrateButton.setText(R.string.portrait_calibrate_framebuffer);
|
||||
vsb.setProgress(Math.round(Apple2Preferences.getFloatJSONPref(States.CALIBRATE_FRAMEBUFFER_POSITION_SCALE) * PORTRAIT_CALIBRATE_NUM_CHOICES));
|
||||
break;
|
||||
case CALIBRATE_KEYBOARD_POSITION_SCALE:
|
||||
default:
|
||||
calibrateButton.setText(R.string.portrait_calibrate_keyboard_position);
|
||||
vsb.setProgress(Math.round(Apple2Preferences.getFloatJSONPref(States.CALIBRATE_KEYBOARD_POSITION_SCALE) * PORTRAIT_CALIBRATE_NUM_CHOICES));
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
vsb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
switch (mStateMachine) {
|
||||
case CALIBRATE_KEYBOARD_HEIGHT_SCALE:
|
||||
Apple2Preferences.setJSONPref(States.CALIBRATE_KEYBOARD_HEIGHT_SCALE, (float) progress / PORTRAIT_CALIBRATE_NUM_CHOICES);
|
||||
break;
|
||||
case CALIBRATE_FRAMEBUFFER_POSITION_SCALE:
|
||||
Apple2Preferences.setJSONPref(States.CALIBRATE_FRAMEBUFFER_POSITION_SCALE, (float) progress / PORTRAIT_CALIBRATE_NUM_CHOICES);
|
||||
break;
|
||||
case CALIBRATE_KEYBOARD_POSITION_SCALE:
|
||||
default:
|
||||
Apple2Preferences.setJSONPref(States.CALIBRATE_KEYBOARD_POSITION_SCALE, (float) progress / PORTRAIT_CALIBRATE_NUM_CHOICES);
|
||||
break;
|
||||
}
|
||||
Apple2Preferences.sync(mActivity, mStateMachine.getPrefDomain());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
}
|
||||
});
|
||||
|
||||
mSavedTouchDevice = (int) Apple2Preferences.getJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT);
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, Apple2SettingsMenu.TouchDeviceVariant.KEYBOARD.ordinal());
|
||||
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN, Apple2Preferences.PREF_CALIBRATING, true);
|
||||
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
}
|
||||
|
||||
public final boolean isCalibrating() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onKeyTapCalibrationEvent(char ascii, int scancode) {
|
||||
}
|
||||
|
||||
public void show() {
|
||||
if (isShowing()) {
|
||||
return;
|
||||
}
|
||||
mActivity.pushApple2View(this);
|
||||
}
|
||||
|
||||
public void dismiss() {
|
||||
for (Apple2MenuView apple2MenuView : mViewStack) {
|
||||
if (apple2MenuView != this) {
|
||||
mActivity.pushApple2View(apple2MenuView);
|
||||
}
|
||||
}
|
||||
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN, Apple2Preferences.PREF_CALIBRATING, false);
|
||||
|
||||
Apple2Preferences.setJSONPref(Apple2SettingsMenu.SETTINGS.CURRENT_INPUT, mSavedTouchDevice);
|
||||
|
||||
Apple2Preferences.sync(mActivity, Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN);
|
||||
|
||||
mActivity.popApple2View(this);
|
||||
}
|
||||
|
||||
public void dismissAll() {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
public boolean isShowing() {
|
||||
return mSettingsView.getParent() != null;
|
||||
}
|
||||
|
||||
public View getView() {
|
||||
return mSettingsView;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -55,6 +55,29 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum TouchDeviceVariant {
|
||||
NONE(0),
|
||||
JOYSTICK(1),
|
||||
JOYSTICK_KEYPAD(2),
|
||||
KEYBOARD(3),
|
||||
TOPMENU(4),
|
||||
ALERT(5);
|
||||
private int dev;
|
||||
|
||||
public static final TouchDeviceVariant FRAMEBUFFER = NONE;
|
||||
|
||||
public static final int size = TouchDeviceVariant.values().length;
|
||||
|
||||
TouchDeviceVariant(int dev) {
|
||||
this.dev = dev;
|
||||
}
|
||||
|
||||
static TouchDeviceVariant next(int ord) {
|
||||
ord = (ord + 1) % size;
|
||||
return TouchDeviceVariant.values()[ord];
|
||||
}
|
||||
}
|
||||
|
||||
enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
CURRENT_INPUT {
|
||||
@Override
|
||||
@ -67,6 +90,21 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.input_current_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_TOUCHSCREEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "screenOwner";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return TouchDeviceVariant.KEYBOARD.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
@ -76,6 +114,7 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
final IMenuEnum self = this;
|
||||
_alertDialogHandleSelection(activity, R.string.input_current, new String[]{
|
||||
activity.getResources().getString(R.string.joystick),
|
||||
activity.getResources().getString(R.string.keypad),
|
||||
@ -83,16 +122,33 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
}, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.CURRENT_TOUCH_DEVICE.intValue(activity) - 1;
|
||||
int val = (int) Apple2Preferences.getJSONPref(self);
|
||||
return val - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.CURRENT_TOUCH_DEVICE.saveTouchDevice(activity, Apple2Preferences.TouchDeviceVariant.values()[value + 1]);
|
||||
Apple2Preferences.setJSONPref(self, TouchDeviceVariant.values()[value].ordinal() + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
VIDEO_CONFIGURE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.video_configure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.video_configure_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
new Apple2VideoSettingsMenu(activity).show();
|
||||
}
|
||||
},
|
||||
JOYSTICK_CONFIGURE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
@ -157,43 +213,6 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
new Apple2AudioSettingsMenu(activity).show();
|
||||
}
|
||||
},
|
||||
VIDEO_CONFIGURE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.video_configure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.video_configure_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
_addPopupIcon(activity, this, convertView);
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
_alertDialogHandleSelection(activity, R.string.video_configure, new String[]{
|
||||
settingsMenu.mActivity.getResources().getString(R.string.color_bw),
|
||||
settingsMenu.mActivity.getResources().getString(R.string.color_color),
|
||||
settingsMenu.mActivity.getResources().getString(R.string.color_interpolated),
|
||||
}, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return Apple2Preferences.HIRES_COLOR.intValue(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.HIRES_COLOR.saveHiresColor(settingsMenu.mActivity, Apple2Preferences.HiresColor.values()[value]);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
SHOW_DISK_OPERATIONS {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
@ -205,14 +224,25 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
return activity.getResources().getString(R.string.disk_show_operation_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "diskAnimationsEnabled";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
final IMenuEnum self = this;
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.SHOW_DISK_OPERATIONS.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.SHOW_DISK_OPERATIONS.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
@ -231,7 +261,7 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
String url = "http://deadc0de.org/apple2ix/android/";
|
||||
String url = "https://deadc0de.org/apple2ix/android/";
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
activity.startActivity(i);
|
||||
@ -254,7 +284,7 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
Apple2Preferences.resetPreferences(activity);
|
||||
Apple2Preferences.reset(activity);
|
||||
}
|
||||
}).setNegativeButton(R.string.no, null);
|
||||
AlertDialog dialog = builder.create();
|
||||
@ -281,15 +311,26 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "sendCrashReports";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
if (!BuildConfig.DEBUG) {
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.CRASH_CHECK.booleanValue(activity));
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
final IMenuEnum self = this;
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.CRASH_CHECK.saveBoolean(activity, isChecked);
|
||||
Apple2Preferences.setJSONPref(self, isChecked);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -333,9 +374,23 @@ public class Apple2SettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_INTERFACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,7 +11,9 @@
|
||||
|
||||
package org.deadc0de.apple2ix;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@ -44,12 +46,19 @@ public class Apple2SplashScreen implements Apple2MenuView {
|
||||
}
|
||||
});
|
||||
|
||||
Button prefsButton = (Button) mSettingsView.findViewById(R.id.prefsButton);
|
||||
Button prefsButton = (Button) mSettingsView.findViewById(R.id.resetButton);
|
||||
prefsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Apple2SettingsMenu settingsMenu = mActivity.getSettingsMenu();
|
||||
settingsMenu.show();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.preferences_reset_really).setMessage(R.string.preferences_reset_warning).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
Apple2Preferences.reset(mActivity);
|
||||
}
|
||||
}).setNegativeButton(R.string.no, null);
|
||||
AlertDialog dialog = builder.create();
|
||||
mActivity.registerAndShowDialog(dialog);
|
||||
}
|
||||
});
|
||||
|
||||
@ -70,7 +79,7 @@ public class Apple2SplashScreen implements Apple2MenuView {
|
||||
public void run() {
|
||||
Button startButton = (Button) mSettingsView.findViewById(R.id.startButton);
|
||||
startButton.setEnabled(mDismissable);
|
||||
Button prefsButton = (Button) mSettingsView.findViewById(R.id.prefsButton);
|
||||
Button prefsButton = (Button) mSettingsView.findViewById(R.id.resetButton);
|
||||
prefsButton.setEnabled(mDismissable);
|
||||
Button disksButton = (Button) mSettingsView.findViewById(R.id.disksButton);
|
||||
disksButton.setEnabled(mDismissable);
|
||||
|
365
Android/app/src/main/java/org/deadc0de/apple2ix/Apple2Utils.java
Normal file
365
Android/app/src/main/java/org/deadc0de/apple2ix/Apple2Utils.java
Normal file
@ -0,0 +1,365 @@
|
||||
/*
|
||||
* Apple // emulator for *nix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*
|
||||
* Copyright 2016 Aaron Culliney
|
||||
*
|
||||
*/
|
||||
|
||||
package org.deadc0de.apple2ix;
|
||||
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
public class Apple2Utils {
|
||||
|
||||
public final static String TAG = "Apple2Utils";
|
||||
|
||||
private static String sDataDir = null;
|
||||
private static File sExternalFilesDir = null;
|
||||
private static File sRealExternalFilesDir = null;
|
||||
|
||||
public static boolean readEntireFile(File file, StringBuilder fileData) {
|
||||
final int maxAttempts = 5;
|
||||
int attempts = 0;
|
||||
do {
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(new FileReader(file));
|
||||
char[] buf = new char[1024];
|
||||
int numRead = 0;
|
||||
while ((numRead = reader.read(buf)) != -1) {
|
||||
String readData = String.valueOf(buf, 0, numRead);
|
||||
fileData.append(readData);
|
||||
}
|
||||
reader.close();
|
||||
break;
|
||||
} catch (InterruptedIOException ie) {
|
||||
/* EINTR, EAGAIN ... */
|
||||
} catch (IOException e) {
|
||||
Log.d(TAG, "Error reading file at path : " + file.toString());
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException e) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
|
||||
return attempts < maxAttempts;
|
||||
}
|
||||
|
||||
public static boolean writeFile(final StringBuilder data, File file) {
|
||||
|
||||
final int maxAttempts = 5;
|
||||
int attempts = 0;
|
||||
do {
|
||||
try {
|
||||
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
|
||||
writer.append(data);
|
||||
writer.flush();
|
||||
writer.close();
|
||||
break;
|
||||
} catch (InterruptedIOException ie) {
|
||||
/* EINTR, EAGAIN ... */
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Exception attempting to write data : " + e);
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException e) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
|
||||
return attempts < maxAttempts;
|
||||
}
|
||||
|
||||
|
||||
public static File getExternalStorageDirectory(Apple2Activity activity) {
|
||||
|
||||
do {
|
||||
if (sExternalFilesDir != null) {
|
||||
break;
|
||||
}
|
||||
|
||||
String storageState = Environment.getExternalStorageState();
|
||||
if (!Environment.MEDIA_MOUNTED.equals(storageState)) {
|
||||
// 2015/10/28 : do not expose sExternalFilesDir unless it is writable
|
||||
break;
|
||||
}
|
||||
|
||||
File realExternalStorageDir = Environment.getExternalStorageDirectory();
|
||||
if (realExternalStorageDir == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
File externalDir = new File(realExternalStorageDir, "apple2ix"); // /sdcard/apple2ix
|
||||
if (!externalDir.exists()) {
|
||||
boolean made = externalDir.mkdirs();
|
||||
if (!made) {
|
||||
Log.d(TAG, "WARNING: could not make directory : " + sExternalFilesDir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sExternalFilesDir = externalDir;
|
||||
sRealExternalFilesDir = realExternalStorageDir;
|
||||
} while (false);
|
||||
|
||||
return sExternalFilesDir;
|
||||
}
|
||||
|
||||
public static File getRealExternalStorageDirectory(Apple2Activity activity) {
|
||||
getExternalStorageDirectory(activity);
|
||||
return sRealExternalFilesDir;
|
||||
}
|
||||
|
||||
// HACK NOTE 2015/02/22 : Apparently native code cannot easily access stuff in the APK ... so copy various resources
|
||||
// out of the APK and into the /data/data/... for ease of access. Because this is FOSS software we don't care about
|
||||
// security or DRM for these assets =)
|
||||
public static String getDataDir(Apple2Activity activity) {
|
||||
|
||||
if (sDataDir != null) {
|
||||
return sDataDir;
|
||||
}
|
||||
|
||||
try {
|
||||
PackageManager pm = activity.getPackageManager();
|
||||
PackageInfo pi = pm.getPackageInfo(activity.getPackageName(), 0);
|
||||
sDataDir = pi.applicationInfo.dataDir;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e(TAG, "" + e);
|
||||
if (sDataDir == null) {
|
||||
sDataDir = "/data/local/tmp";
|
||||
}
|
||||
}
|
||||
|
||||
return sDataDir;
|
||||
}
|
||||
|
||||
public static void exposeAPKAssetsToExternal(Apple2Activity activity) {
|
||||
getExternalStorageDirectory(activity);
|
||||
if (sExternalFilesDir == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final ProgressBar bar = (ProgressBar) activity.findViewById(R.id.crash_progressBar);
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.VISIBLE);
|
||||
bar.setIndeterminate(true);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssetsToExternal #1");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Log.v(TAG, "Overwriting system files in /sdcard/apple2ix/ (external storage) ...");
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"keyboards", /*to location:*/sExternalFilesDir.getAbsolutePath(), false);
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.INVISIBLE);
|
||||
bar.setIndeterminate(false);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssetsToExternal #2");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void exposeAPKAssets(Apple2Activity activity) {
|
||||
final ProgressBar bar = (ProgressBar) activity.findViewById(R.id.crash_progressBar);
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.VISIBLE);
|
||||
bar.setIndeterminate(true);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssets #1");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
getDataDir(activity);
|
||||
|
||||
// FIXME TODO : Heavy-handed migration to 1.1.3 ...
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "blanks"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "demo"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "eamon"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "logo"));
|
||||
recursivelyDelete(new File(new File(sDataDir, "disks").getAbsolutePath(), "miscgame"));
|
||||
|
||||
Log.d(TAG, "First time copying stuff-n-things out of APK for ease-of-NDK access...");
|
||||
|
||||
getExternalStorageDirectory(activity);
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"disks", /*to location:*/new File(sDataDir, "disks").getAbsolutePath(), true);
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"keyboards", /*to location:*/new File(sDataDir, "keyboards").getAbsolutePath(), false);
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"shaders", /*to location:*/new File(sDataDir, "shaders").getAbsolutePath(), false);
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
bar.setVisibility(View.INVISIBLE);
|
||||
bar.setIndeterminate(false);
|
||||
} catch (NullPointerException npe) {
|
||||
Log.v(TAG, "Avoid NPE in exposeAPKAssets #1");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void exposeSymbols(Apple2Activity activity) {
|
||||
recursivelyCopyAPKAssets(activity, /*from APK directory:*/"symbols", /*to location:*/new File(sDataDir, "symbols").getAbsolutePath(), false);
|
||||
}
|
||||
|
||||
public static void unexposeSymbols(Apple2Activity activity) {
|
||||
recursivelyDelete(new File(sDataDir, "symbols"));
|
||||
}
|
||||
|
||||
// TODO FIXME : WARNING : this is super dangerous if there are symlinks !!!
|
||||
private static void recursivelyDelete(File file) {
|
||||
if (file.isDirectory()) {
|
||||
for (File f : file.listFiles()) {
|
||||
recursivelyDelete(f);
|
||||
}
|
||||
}
|
||||
if (!file.delete()) {
|
||||
Log.d(TAG, "Failed to delete file: " + file);
|
||||
}
|
||||
}
|
||||
|
||||
private static void recursivelyCopyAPKAssets(Apple2Activity activity, String srcFileOrDir, String dstFileOrDir, boolean shouldGzip) {
|
||||
AssetManager assetManager = activity.getAssets();
|
||||
|
||||
final int maxAttempts = 5;
|
||||
String[] files = null;
|
||||
int attempts = 0;
|
||||
do {
|
||||
try {
|
||||
files = assetManager.list(srcFileOrDir);
|
||||
break;
|
||||
} catch (InterruptedIOException e) {
|
||||
/* EINTR, EAGAIN ... */
|
||||
} catch (IOException e) {
|
||||
Log.d(TAG, "OOPS exception attempting to list APK files at : " + srcFileOrDir + " : " + e);
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException ie) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
|
||||
if (files == null) {
|
||||
Log.d(TAG, "OOPS, could not list APK assets at : " + srcFileOrDir);
|
||||
return;
|
||||
}
|
||||
|
||||
if (files.length > 0) {
|
||||
// ensure destination directory exists
|
||||
File dstPath = new File(dstFileOrDir);
|
||||
if (!dstPath.mkdirs()) {
|
||||
if (!dstPath.exists()) {
|
||||
Log.d(TAG, "OOPS, could not mkdirs on " + dstPath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (String filename : files) {
|
||||
// iterate on files and subdirectories
|
||||
recursivelyCopyAPKAssets(activity, srcFileOrDir + File.separator + filename, dstFileOrDir + File.separator + filename, shouldGzip);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// presumably this is a file, not a subdirectory
|
||||
InputStream is = null;
|
||||
OutputStream os = null;
|
||||
attempts = 0;
|
||||
do {
|
||||
try {
|
||||
is = assetManager.open(srcFileOrDir);
|
||||
if (shouldGzip) {
|
||||
os = new GZIPOutputStream(new FileOutputStream(dstFileOrDir + ".gz"));
|
||||
} else {
|
||||
os = new FileOutputStream(dstFileOrDir);
|
||||
}
|
||||
copyFile(is, os);
|
||||
break;
|
||||
} catch (InterruptedIOException e) {
|
||||
/* EINTR, EAGAIN */
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Failed to copy asset file: " + srcFileOrDir, e);
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
// NOOP
|
||||
}
|
||||
}
|
||||
if (os != null) {
|
||||
try {
|
||||
os.close();
|
||||
} catch (IOException e) {
|
||||
// NOOP
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
Thread.sleep(100, 0);
|
||||
} catch (InterruptedException ie) {
|
||||
/* ... */
|
||||
}
|
||||
++attempts;
|
||||
} while (attempts < maxAttempts);
|
||||
}
|
||||
|
||||
private static void copyFile(InputStream is, OutputStream os) throws IOException {
|
||||
final int BUF_SZ = 4096;
|
||||
byte[] buf = new byte[BUF_SZ];
|
||||
while (true) {
|
||||
int len = is.read(buf, 0, BUF_SZ);
|
||||
if (len < 0) {
|
||||
break;
|
||||
}
|
||||
os.write(buf, 0, len);
|
||||
}
|
||||
os.flush();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,247 @@
|
||||
/*
|
||||
* Apple // emulator for *nix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*
|
||||
* Copyright 2015 Aaron Culliney
|
||||
*
|
||||
*/
|
||||
|
||||
package org.deadc0de.apple2ix;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.deadc0de.apple2ix.basic.R;
|
||||
|
||||
public class Apple2VideoSettingsMenu extends Apple2AbstractMenu {
|
||||
|
||||
private final static String TAG = "Apple2VideoSettingsMenu";
|
||||
|
||||
public Apple2VideoSettingsMenu(Apple2Activity activity) {
|
||||
super(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String[] allTitles() {
|
||||
return SETTINGS.titles(mActivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final IMenuEnum[] allValues() {
|
||||
return SETTINGS.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean areAllItemsEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isEnabled(int position) {
|
||||
if (position < 0 || position >= SETTINGS.size) {
|
||||
throw new ArrayIndexOutOfBoundsException();
|
||||
}
|
||||
if (position == SETTINGS.PORTRAIT_CALIBRATE.ordinal()) {
|
||||
if ((boolean) Apple2Preferences.getJSONPref(SETTINGS.LANDSCAPE_MODE)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum HiresColor {
|
||||
BW,
|
||||
COLOR,
|
||||
INTERPOLATED
|
||||
}
|
||||
|
||||
protected enum SETTINGS implements Apple2AbstractMenu.IMenuEnum {
|
||||
LANDSCAPE_MODE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.mode_landscape);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.mode_landscape_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_INTERFACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "landscapeEnabled";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final View getView(final Apple2Activity activity, View convertView) {
|
||||
final Object self = this;
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, (boolean) Apple2Preferences.getJSONPref(this));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.setJSONPref((IMenuEnum)self, isChecked);
|
||||
applyLandscapeMode(activity);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
}
|
||||
},
|
||||
PORTRAIT_CALIBRATE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.portrait_calibrate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.portrait_calibrate_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
ArrayList<Apple2MenuView> viewStack = new ArrayList<Apple2MenuView>();
|
||||
{
|
||||
int idx = 0;
|
||||
while (true) {
|
||||
Apple2MenuView apple2MenuView = activity.peekApple2View(idx);
|
||||
if (apple2MenuView == null) {
|
||||
break;
|
||||
}
|
||||
viewStack.add(apple2MenuView);
|
||||
++idx;
|
||||
}
|
||||
}
|
||||
|
||||
// switch to portrait
|
||||
Apple2Preferences.setJSONPref(SETTINGS.LANDSCAPE_MODE, false);
|
||||
applyLandscapeMode(activity);
|
||||
Apple2PortraitCalibration calibration = new Apple2PortraitCalibration(activity, viewStack);
|
||||
|
||||
// show this new view...
|
||||
calibration.show();
|
||||
|
||||
// ...with nothing else underneath 'cept the emulator OpenGL layer
|
||||
for (Apple2MenuView apple2MenuView : viewStack) {
|
||||
activity.popApple2View(apple2MenuView);
|
||||
}
|
||||
}
|
||||
},
|
||||
COLOR_CONFIGURE {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.color_configure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.color_configure_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return Apple2Preferences.PREF_DOMAIN_VIDEO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return "colorMode";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return HiresColor.INTERPOLATED.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
_addPopupIcon(activity, this, convertView);
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(final Apple2Activity activity, final Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
final Apple2AbstractMenu.IMenuEnum self = this;
|
||||
_alertDialogHandleSelection(activity, R.string.video_configure, new String[]{
|
||||
settingsMenu.mActivity.getResources().getString(R.string.color_bw),
|
||||
settingsMenu.mActivity.getResources().getString(R.string.color_color),
|
||||
settingsMenu.mActivity.getResources().getString(R.string.color_interpolated),
|
||||
}, new IPreferenceLoadSave() {
|
||||
@Override
|
||||
public int intValue() {
|
||||
return (int) Apple2Preferences.getJSONPref(self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInt(int value) {
|
||||
Apple2Preferences.setJSONPref(self, HiresColor.values()[value].ordinal());
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
public static final int size = SETTINGS.values().length;
|
||||
|
||||
@Override
|
||||
public String getPrefDomain() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPrefDefault() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelection(Apple2Activity activity, Apple2AbstractMenu settingsMenu, boolean isChecked) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(Apple2Activity activity, View convertView) {
|
||||
return _basicView(activity, this, convertView);
|
||||
}
|
||||
|
||||
public static boolean applyLandscapeMode(final Apple2Activity activity) {
|
||||
if ((boolean) Apple2Preferences.getJSONPref(SETTINGS.LANDSCAPE_MODE)) {
|
||||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||
return false;
|
||||
} else {
|
||||
int orientation = activity.getRequestedOrientation();
|
||||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
return orientation != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] titles(Apple2Activity activity) {
|
||||
String[] titles = new String[size];
|
||||
int i = 0;
|
||||
for (SETTINGS setting : values()) {
|
||||
titles[i++] = setting.getTitle(activity);
|
||||
}
|
||||
return titles;
|
||||
}
|
||||
}
|
||||
}
|
@ -50,8 +50,6 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
public final static long NATIVE_TOUCH_JOY_KPAD = (1 << 8);
|
||||
|
||||
public final static long NATIVE_TOUCH_INPUT_DEVICE_CHANGED = (1 << 16);
|
||||
public final static long NATIVE_TOUCH_CPU_SPEED_DEC = (1 << 17);
|
||||
public final static long NATIVE_TOUCH_CPU_SPEED_INC = (1 << 18);
|
||||
|
||||
public final static long NATIVE_TOUCH_ASCII_SCANCODE_SHIFT = 32;
|
||||
public final static long NATIVE_TOUCH_ASCII_SCANCODE_MASK = 0xFFFFL;
|
||||
@ -60,16 +58,15 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
|
||||
|
||||
private Apple2Activity mActivity;
|
||||
private Runnable mGraphicsInitializedRunnable;
|
||||
private final InputManagerCompat mInputManager;
|
||||
|
||||
private float[] mXCoords = new float[MAX_FINGERS];
|
||||
private float[] mYCoords = new float[MAX_FINGERS];
|
||||
|
||||
private int mWidth = 0;
|
||||
private int mHeight = 0;
|
||||
|
||||
private static native void nativeGraphicsInitialized(int width, int height);
|
||||
|
||||
private static native void nativeGraphicsChanged(int width, int height);
|
||||
private static native void nativeGraphicsInitialized();
|
||||
|
||||
private static native void nativeRender();
|
||||
|
||||
@ -78,10 +75,9 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
public static native long nativeOnTouch(int action, int pointerCount, int pointerIndex, float[] xCoords, float[] yCoords);
|
||||
|
||||
|
||||
public Apple2View(Apple2Activity activity, Runnable graphicsInitializedRunnable) {
|
||||
public Apple2View(Apple2Activity activity) {
|
||||
super(activity.getApplication());
|
||||
mActivity = activity;
|
||||
mGraphicsInitializedRunnable = graphicsInitializedRunnable;
|
||||
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
@ -123,13 +119,12 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
Apple2View.this.getWindowVisibleDisplayFrame(rect);
|
||||
int h = rect.height();
|
||||
int w = rect.width();
|
||||
if (w < h) {
|
||||
// assure landscape dimensions
|
||||
final int w_ = w;
|
||||
w = h;
|
||||
h = w_;
|
||||
if (w != mWidth || h != mHeight) {
|
||||
mWidth = w;
|
||||
mHeight = h;
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_INTERFACE, Apple2Preferences.PREF_DEVICE_WIDTH, mWidth);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_INTERFACE, Apple2Preferences.PREF_DEVICE_HEIGHT, mHeight);
|
||||
}
|
||||
nativeGraphicsChanged(w, h);
|
||||
}
|
||||
});
|
||||
|
||||
@ -358,25 +353,17 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
|
||||
@Override
|
||||
public void onSurfaceChanged(GL10 gl, int width, int height) {
|
||||
Apple2Preferences.GL_VENDOR.saveString(mActivity, GLES20.glGetString(GLES20.GL_VENDOR));
|
||||
Apple2Preferences.GL_RENDERER.saveString(mActivity, GLES20.glGetString(GLES20.GL_RENDERER));
|
||||
Apple2Preferences.GL_VERSION.saveString(mActivity, GLES20.glGetString(GLES20.GL_VERSION));
|
||||
Apple2Preferences.setJSONPref(Apple2CrashHandler.SETTINGS.GL_VENDOR, GLES20.glGetString(GLES20.GL_VENDOR));
|
||||
Apple2Preferences.setJSONPref(Apple2CrashHandler.SETTINGS.GL_RENDERER, GLES20.glGetString(GLES20.GL_RENDERER));
|
||||
Apple2Preferences.setJSONPref(Apple2CrashHandler.SETTINGS.GL_VERSION, GLES20.glGetString(GLES20.GL_VERSION));
|
||||
|
||||
Log.v(TAG, "graphicsInitialized(" + width + ", " + height + ")");
|
||||
|
||||
if (width < height) {
|
||||
// assure landscape dimensions
|
||||
final int w_ = width;
|
||||
width = height;
|
||||
height = w_;
|
||||
}
|
||||
|
||||
nativeGraphicsInitialized(width, height);
|
||||
|
||||
if (Apple2View.this.mGraphicsInitializedRunnable != null) {
|
||||
Apple2View.this.mGraphicsInitializedRunnable.run();
|
||||
Apple2View.this.mGraphicsInitializedRunnable = null;
|
||||
}
|
||||
Apple2View.this.mWidth = width;
|
||||
Apple2View.this.mHeight = height;
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_INTERFACE, Apple2Preferences.PREF_DEVICE_WIDTH, mWidth);
|
||||
Apple2Preferences.setJSONPref(Apple2Preferences.PREF_DOMAIN_INTERFACE, Apple2Preferences.PREF_DEVICE_HEIGHT, mHeight);
|
||||
nativeGraphicsInitialized();
|
||||
|
||||
Apple2View.this.mActivity.maybeResumeEmulation();
|
||||
}
|
||||
@ -517,7 +504,7 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
}
|
||||
|
||||
if ((nativeFlags & NATIVE_TOUCH_KEY_TAP) != 0) {
|
||||
if (Apple2Preferences.KEYBOARD_CLICK_ENABLED.booleanValue(mActivity)) {
|
||||
if ((boolean) Apple2Preferences.getJSONPref(Apple2KeyboardSettingsMenu.SETTINGS.KEYBOARD_ENABLE_CLICK)) {
|
||||
AudioManager am = (AudioManager) mActivity.getSystemService(Context.AUDIO_SERVICE);
|
||||
if (am != null) {
|
||||
am.playSoundEffect(AudioManager.FX_KEY_CLICK);
|
||||
@ -532,45 +519,6 @@ class Apple2View extends GLSurfaceView implements InputManagerCompat.InputDevice
|
||||
apple2MenuView.onKeyTapCalibrationEvent(ascii, scancode);
|
||||
}
|
||||
}
|
||||
|
||||
if ((nativeFlags & NATIVE_TOUCH_MENU) == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
// handle menu-specific actions
|
||||
|
||||
if ((nativeFlags & NATIVE_TOUCH_INPUT_DEVICE_CHANGED) != 0) {
|
||||
Apple2Preferences.TouchDeviceVariant nextVariant;
|
||||
if ((nativeFlags & NATIVE_TOUCH_KBD) != 0) {
|
||||
nextVariant = Apple2Preferences.TouchDeviceVariant.KEYBOARD;
|
||||
} else if ((nativeFlags & NATIVE_TOUCH_JOY) != 0) {
|
||||
nextVariant = Apple2Preferences.TouchDeviceVariant.JOYSTICK;
|
||||
} else if ((nativeFlags & NATIVE_TOUCH_JOY_KPAD) != 0) {
|
||||
nextVariant = Apple2Preferences.TouchDeviceVariant.JOYSTICK_KEYPAD;
|
||||
} else {
|
||||
int touchDevice = Apple2Preferences.nativeGetCurrentTouchDevice();
|
||||
nextVariant = Apple2Preferences.TouchDeviceVariant.next(touchDevice);
|
||||
}
|
||||
Apple2Preferences.CURRENT_TOUCH_DEVICE.saveTouchDevice(mActivity, nextVariant);
|
||||
} else if ((nativeFlags & NATIVE_TOUCH_CPU_SPEED_DEC) != 0) {
|
||||
int percentSpeed = Apple2Preferences.nativeGetCPUSpeed();
|
||||
if (percentSpeed > 400) { // HACK: max value from native side
|
||||
percentSpeed = 375;
|
||||
} else if (percentSpeed > 100) {
|
||||
percentSpeed -= 25;
|
||||
} else {
|
||||
percentSpeed -= 5;
|
||||
}
|
||||
Apple2Preferences.CPU_SPEED_PERCENT.saveInt(mActivity, percentSpeed);
|
||||
} else if ((nativeFlags & NATIVE_TOUCH_CPU_SPEED_INC) != 0) {
|
||||
int percentSpeed = Apple2Preferences.nativeGetCPUSpeed();
|
||||
if (percentSpeed >= 100) {
|
||||
percentSpeed += 25;
|
||||
} else {
|
||||
percentSpeed += 5;
|
||||
}
|
||||
Apple2Preferences.CPU_SPEED_PERCENT.saveInt(mActivity, percentSpeed);
|
||||
}
|
||||
} while (false);
|
||||
|
||||
return true;
|
||||
|
37
Android/app/src/main/res/layout/a2reset_confirmation.xml
Normal file
37
Android/app/src/main/res/layout/a2reset_confirmation.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/black"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioButton_openApple"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/reboot" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioButton_closedApple"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/reset_self_test" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioButton_noApple"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/reset_soft" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/calibratePortrait"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/preference_margin_bottom"
|
||||
android:layout_marginEnd="@dimen/preference_margin_right"
|
||||
android:layout_marginLeft="@dimen/preference_margin_left"
|
||||
android:layout_marginRight="@dimen/preference_margin_right"
|
||||
android:layout_marginStart="@dimen/preference_margin_left"
|
||||
android:layout_marginTop="@dimen/preference_margin_top"
|
||||
android:layout_weight="1">
|
||||
|
||||
<android.widget.VerticalSeekBar
|
||||
android:id="@+id/seekbar_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_alignTop="@+id/button_calibrate" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_calibrate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/portrait_calibrate_keyboard_height"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
@ -20,11 +20,26 @@
|
||||
android:layout_marginLeft="@dimen/preference_margin_left"
|
||||
android:layout_marginStart="@dimen/preference_margin_left"
|
||||
android:layout_marginTop="@dimen/preference_margin_top"
|
||||
android:background="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/keypad_choose_current" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/noneButton"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginEnd="@dimen/preference_margin_right"
|
||||
android:layout_marginRight="@dimen/preference_margin_right"
|
||||
android:layout_marginTop="@dimen/preference_margin_top"
|
||||
android:text="@string/key_none" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skipButton"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:layout_below="@id/noneButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
|
@ -45,8 +45,8 @@
|
||||
<Button
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:text="@string/emulation_settings"
|
||||
android:id="@+id/prefsButton"
|
||||
android:text="@string/reset_preferences"
|
||||
android:id="@+id/resetButton"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/startButton"
|
||||
android:layout_alignRight="@+id/startButton"
|
||||
@ -60,7 +60,7 @@
|
||||
android:text="@string/emulation_disks"
|
||||
android:id="@+id/disksButton"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/prefsButton"
|
||||
android:layout_below="@+id/resetButton"
|
||||
android:layout_alignRight="@+id/startButton"
|
||||
android:layout_alignEnd="@+id/startButton"
|
||||
android:layout_alignLeft="@+id/startButton"
|
||||
|
@ -39,7 +39,6 @@
|
||||
<string name="disk_show_operation">Zeige Disk ][ Aktivität</string>
|
||||
<string name="disk_show_operation_summary">Zeigt wenn die Laufwerke lesen oder schreiben</string>
|
||||
<string name="emulation_continue">Fortsetzen…</string>
|
||||
<string name="emulation_settings">Einstellungen…</string>
|
||||
<string name="emulation_disks">Lade Disk-Image…</string>
|
||||
<string name="header_disks">Diskette einlegen:</string>
|
||||
<string name="input_current">Aktuelles Touch Device</string>
|
||||
@ -158,5 +157,22 @@
|
||||
<string name="touch_menu_enable_summary">Aktiviere Softmenü Knöpfe in den oberen Ecken des Bildschirms</string>
|
||||
<string name="video_configure">Video-Konfiguration…</string>
|
||||
<string name="video_configure_summary">Farbeinstellungen</string>
|
||||
<string name="color_configure">Configure color</string>
|
||||
<string name="color_configure_summary">Color mode</string>
|
||||
<string name="joystick_azimuth_visible">Show joystick/keypad heading</string>
|
||||
<string name="joystick_azimuth_visible_summary">Shows current axis direction and magnitude</string>
|
||||
<string name="mode_landscape">Landscape</string>
|
||||
<string name="mode_landscape_summary">Enable landscape or portrait mode</string>
|
||||
<string name="portrait_calibrate">Calibrate portrait mode</string>
|
||||
<string name="portrait_calibrate_framebuffer">Display position</string>
|
||||
<string name="portrait_calibrate_keyboard_height">Keyboard height</string>
|
||||
<string name="portrait_calibrate_keyboard_position">Keyboard position</string>
|
||||
<string name="portrait_calibrate_summary">Adjust keyboard size, framebuffer position, etc</string>
|
||||
<string name="crash_sigabrt">SIGABRT</string>
|
||||
<string name="crash_sigfpe">SIGFPE</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="reset_preferences">Reset settings</string>
|
||||
<string name="reset_self_test">Self Test</string>
|
||||
<string name="reset_soft">Soft</string>
|
||||
|
||||
</resources>
|
||||
|
@ -39,7 +39,6 @@
|
||||
<string name="disk_show_operation">Mostrar las operaciones de "Disk ]["</string>
|
||||
<string name="disk_show_operation_summary">Shows when disk drives are reading or writing</string>
|
||||
<string name="emulation_continue">Continuar…</string>
|
||||
<string name="emulation_settings">Configuración…</string>
|
||||
<string name="emulation_disks">Insertar imagen de disquete…</string>
|
||||
<string name="header_disks">Insertar imagen de disquete:</string>
|
||||
<string name="input_current">Unidad de entrada actual</string>
|
||||
@ -156,5 +155,24 @@
|
||||
<string name="touch_menu_enable_summary">Los botones del menú en la parte superior de la pantalla</string>
|
||||
<string name="video_configure">Configurar el video…</string>
|
||||
<string name="video_configure_summary">Ajustes de color</string>
|
||||
<string name="color_configure">Configure color</string>
|
||||
<string name="color_configure_summary">Color mode</string>
|
||||
<string name="joystick_azimuth_visible">Show joystick/keypad heading</string>
|
||||
<string name="joystick_azimuth_visible_summary">Shows current axis direction and magnitude</string>
|
||||
<string name="mode_landscape">Landscape</string>
|
||||
<string name="mode_landscape_summary">Enable landscape or portrait mode</string>
|
||||
<string name="portrait_calibrate">Calibrate portrait mode</string>
|
||||
<string name="portrait_calibrate_framebuffer">Display position</string>
|
||||
<string name="portrait_calibrate_keyboard_height">Keyboard height</string>
|
||||
<string name="portrait_calibrate_keyboard_position">Keyboard position</string>
|
||||
<string name="portrait_calibrate_summary">Adjust keyboard size, framebuffer position, etc</string>
|
||||
<string name="keyboard_glyph_scale">Keyboard glyphs scaled 2x</string>
|
||||
<string name="keyboard_glyph_scale_summary">(Makes keyboard appear less pixelated on large screens)</string>
|
||||
<string name="crash_sigabrt">SIGABRT</string>
|
||||
<string name="crash_sigfpe">SIGFPE</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="reset_preferences">Reset settings</string>
|
||||
<string name="reset_self_test">Self Test</string>
|
||||
<string name="reset_soft">Soft</string>
|
||||
|
||||
</resources>
|
||||
|
@ -39,7 +39,6 @@
|
||||
<string name="disk_show_operation">Afficher les opérations (disque) ][</string>
|
||||
<string name="disk_show_operation_summary">Indique si les disques sont en lecture ou en écriture</string>
|
||||
<string name="emulation_continue">Continuer…</string>
|
||||
<string name="emulation_settings">Configurations…</string>
|
||||
<string name="emulation_disks">Chargement de l\'image disque…</string>
|
||||
<string name="header_disks">Insérer la disquettte :</string>
|
||||
<string name="input_current">Tactile</string>
|
||||
@ -156,5 +155,24 @@
|
||||
<string name="touch_menu_enable_summary">Activation soft des bouton du menu dans les coins en haut de l\'écran</string>
|
||||
<string name="video_configure">Configuration de la vidéo…</string>
|
||||
<string name="video_configure_summary">Configuration des couleurs</string>
|
||||
<string name="color_configure">Configure color</string>
|
||||
<string name="color_configure_summary">Color mode</string>
|
||||
<string name="joystick_azimuth_visible">Show joystick/keypad heading</string>
|
||||
<string name="joystick_azimuth_visible_summary">Shows current axis direction and magnitude</string>
|
||||
<string name="mode_landscape">Landscape</string>
|
||||
<string name="mode_landscape_summary">Enable landscape or portrait mode</string>
|
||||
<string name="portrait_calibrate">Calibrate portrait mode</string>
|
||||
<string name="portrait_calibrate_framebuffer">Display position</string>
|
||||
<string name="portrait_calibrate_keyboard_height">Keyboard height</string>
|
||||
<string name="portrait_calibrate_keyboard_position">Keyboard position</string>
|
||||
<string name="portrait_calibrate_summary">Adjust keyboard size, framebuffer position, etc</string>
|
||||
<string name="keyboard_glyph_scale">Keyboard glyphs scaled 2x</string>
|
||||
<string name="keyboard_glyph_scale_summary">(Makes keyboard appear less pixelated on large screens)</string>
|
||||
<string name="crash_sigabrt">SIGABRT</string>
|
||||
<string name="crash_sigfpe">SIGFPE</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="reset_self_test">Self Test</string>
|
||||
<string name="reset_preferences">Reset settings</string>
|
||||
<string name="reset_soft">Soft</string>
|
||||
|
||||
</resources>
|
||||
|
@ -9,6 +9,8 @@
|
||||
<string name="crasher_title">Crash emulator</string>
|
||||
<string name="crash_null">NULL-deref</string>
|
||||
<string name="crash_java_npe">Java NPE</string>
|
||||
<string name="crash_sigabrt">SIGABRT</string>
|
||||
<string name="crash_sigfpe">SIGFPE</string>
|
||||
<string name="crash_stackcall_overflow">stack call overflow</string>
|
||||
<string name="crash_stackbuf_overflow">stack buffer overflow</string>
|
||||
|
||||
@ -21,6 +23,8 @@
|
||||
<string name="audio_latency">Audio latency</string>
|
||||
<string name="audio_latency_summary">Audio latency in secs</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="color_configure">Configure color</string>
|
||||
<string name="color_configure_summary">Color mode</string>
|
||||
<string name="color_bw">Black/white</string>
|
||||
<string name="color_color">Color</string>
|
||||
<string name="color_interpolated">Interpolated color</string>
|
||||
@ -39,8 +43,7 @@
|
||||
<string name="disk_show_operation">Show Disk ][ operations</string>
|
||||
<string name="disk_show_operation_summary">Shows when disk drives are reading or writing</string>
|
||||
<string name="emulation_continue">Continue…</string>
|
||||
<string name="emulation_settings">Settings…</string>
|
||||
<string name="emulation_disks">Load disk image…</string>
|
||||
<string name="emulation_disks">Load disk image</string>
|
||||
<string name="header_disks">Insert disk:</string>
|
||||
<string name="input_current">Current touch device</string>
|
||||
<string name="input_current_summary">Choose current touch device</string>
|
||||
@ -133,16 +136,27 @@
|
||||
<string name="mockingboard_enable_summary">Revision C in Slot 4/5 (may require restart)</string>
|
||||
<string name="mockingboard_volume">Mockingboard volume</string>
|
||||
<string name="mockingboard_volume_summary">Set the Mockingboard volume</string>
|
||||
<string name="mode_landscape">Landscape</string>
|
||||
<string name="mode_landscape_summary">Enable landscape or portrait mode</string>
|
||||
<string name="no">No</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="portrait_calibrate">Calibrate portrait mode</string>
|
||||
<string name="portrait_calibrate_framebuffer">Display position</string>
|
||||
<string name="portrait_calibrate_keyboard_height">Keyboard height</string>
|
||||
<string name="portrait_calibrate_keyboard_position">Keyboard position</string>
|
||||
<string name="portrait_calibrate_summary">Adjust keyboard size, framebuffer position, etc</string>
|
||||
<string name="preferences_reset_title">Reset preferences</string>
|
||||
<string name="preferences_reset_summary">Reset preferences to defaults and quit emulator</string>
|
||||
<string name="preferences_reset_really">Really reset and quit?</string>
|
||||
<string name="preferences_reset_warning">You will lose your settings</string>
|
||||
<string name="quit">Quit</string>
|
||||
<string name="quit_reboot">Reboot or quit emulator…</string>
|
||||
<string name="quit_reboot_choice">Reboot or quit?</string>
|
||||
<string name="quit_reboot">Reset or quit emulator…</string>
|
||||
<string name="quit_reboot_choice">Reset/reboot or quit?</string>
|
||||
<string name="reboot">Reboot</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="reset_preferences">Reset settings</string>
|
||||
<string name="reset_self_test">Self Test</string>
|
||||
<string name="reset_soft">Soft</string>
|
||||
<string name="restore">Quick restore</string>
|
||||
<string name="save">Quick save</string>
|
||||
<string name="saverestore">Save & restore…</string>
|
||||
@ -156,9 +170,10 @@
|
||||
<string name="settings_advanced_summary">Warning: these settings may degrade performance</string>
|
||||
<string name="settings_advanced_joystick">Advanced joystick/keypad settings</string>
|
||||
<string name="settings_advanced_joystick_summary">Advanced settings and performance tuning</string>
|
||||
<string name="storage">/storage/</string>
|
||||
<string name="touch_menu_enable">Enable touch menus</string>
|
||||
<string name="touch_menu_enable_summary">Enables soft menu buttons in top screen corners</string>
|
||||
<string name="video_configure">Configure video…</string>
|
||||
<string name="video_configure_summary">Color settings</string>
|
||||
<string name="video_configure_summary">Color landscape/portrait, color, etc</string>
|
||||
|
||||
</resources>
|
||||
|
3
Android/app/src/main/res/xml/a2backupscheme.xml
Normal file
3
Android/app/src/main/res/xml/a2backupscheme.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<full-backup-content>
|
||||
</full-backup-content>
|
@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.3.0'
|
||||
classpath 'com.android.tools.build:gradle:2.1.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -1,6 +1,6 @@
|
||||
#Wed Apr 10 15:27:10 PDT 2013
|
||||
#Sun Apr 24 18:29:01 PDT 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
|
||||
|
@ -28,7 +28,7 @@ LOCAL_SRC_FILES := jnicrash.c $(APPLE2_SRC_PATH)/breakpad.C
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) $(BREAKPAD_CFLAGS)
|
||||
LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI),x86 x86_64))
|
||||
LOCAL_SRC_FILES += $(APPLE2_X86_SRC)
|
||||
LOCAL_CFLAGS += -DNO_UNDERSCORES=1
|
||||
else
|
||||
|
@ -89,12 +89,14 @@ fi
|
||||
|
||||
if test "$(basename $0)" = "testcpu" ; then
|
||||
ln -s testcpu.mk Android.mk
|
||||
elif test "$(basename $0)" = "testvm" ; then
|
||||
ln -s testvm.mk Android.mk
|
||||
elif test "$(basename $0)" = "testdisplay" ; then
|
||||
ln -s testdisplay.mk Android.mk
|
||||
elif test "$(basename $0)" = "testdisk" ; then
|
||||
ln -s testdisk.mk Android.mk
|
||||
elif test "$(basename $0)" = "testdisplay" ; then
|
||||
ln -s testdisplay.mk Android.mk
|
||||
elif test "$(basename $0)" = "testprefs" ; then
|
||||
ln -s testprefs.mk Android.mk
|
||||
elif test "$(basename $0)" = "testvm" ; then
|
||||
ln -s testvm.mk Android.mk
|
||||
else
|
||||
ln -s apple2ix.mk Android.mk
|
||||
fi
|
||||
@ -122,14 +124,14 @@ if test "x$do_build" = "x1" -o "x$do_release" = "x1" ; then
|
||||
|
||||
if test "x$do_build" = "x1" ; then
|
||||
export BUILD_MODE=debug
|
||||
ndk-build V=1 NDK_MODULE_PATH=. NDK_DEBUG=1 # NDK_TOOLCHAIN_VERSION=clang
|
||||
ndk-build V=1 NDK_MODULE_PATH=. NDK_DEBUG=1 NDK_TOOLCHAIN_VERSION=4.9
|
||||
ret=$?
|
||||
if test "x$ret" != "x0" ; then
|
||||
exit $ret
|
||||
fi
|
||||
else
|
||||
export BUILD_MODE=release
|
||||
ndk-build V=1 NDK_MODULE_PATH=. # NDK_TOOLCHAIN_VERSION=clang
|
||||
ndk-build V=1 NDK_MODULE_PATH=. NDK_DEBUG=0 NDK_TOOLCHAIN_VERSION=4.9
|
||||
ret=$?
|
||||
if test "x$ret" != "x0" ; then
|
||||
exit $ret
|
||||
|
@ -17,6 +17,8 @@ enum {
|
||||
CRASH_NULL_DEREF,
|
||||
CRASH_STACKCALL_OVERFLOW,
|
||||
CRASH_STACKBUF_OVERFLOW,
|
||||
CRASH_SIGABRT,
|
||||
CRASH_SIGFPE,
|
||||
// MOAR!
|
||||
};
|
||||
|
||||
@ -68,6 +70,21 @@ static volatile int __attribute__((noinline)) _crash_stackbuf_overflow(void) {
|
||||
return getpid();
|
||||
}
|
||||
|
||||
static void _crash_sigabrt(void) {
|
||||
kill(getpid(), SIGABRT);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
static void _crash_sigfpe(void) {
|
||||
static volatile int foo = 2;
|
||||
static volatile int bar = 0;
|
||||
while (foo >= 0) {
|
||||
--foo;
|
||||
bar = 2/foo;
|
||||
}
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2CrashHandler_nativePerformCrash(JNIEnv *env, jclass cls, jint crashType) {
|
||||
#warning FIXME TODO ... we should turn off test codepaths in release build =D
|
||||
LOG("... performing crash of type : %d", crashType);
|
||||
@ -85,6 +102,14 @@ void Java_org_deadc0de_apple2ix_Apple2CrashHandler_nativePerformCrash(JNIEnv *en
|
||||
_crash_stackbuf_overflow();
|
||||
break;
|
||||
|
||||
case CRASH_SIGABRT:
|
||||
_crash_sigabrt();
|
||||
break;
|
||||
|
||||
case CRASH_SIGFPE:
|
||||
_crash_sigfpe();
|
||||
break;
|
||||
|
||||
default:
|
||||
// unknown crasher, just abort ...
|
||||
abort();
|
||||
@ -112,11 +137,11 @@ void Java_org_deadc0de_apple2ix_Apple2CrashHandler_nativeProcessCrash(JNIEnv *en
|
||||
}
|
||||
|
||||
if (android_armArchV7A) {
|
||||
asprintf(&symbolsPath, "%s/symbols/armeabi-v7a", data_dir);
|
||||
ASPRINTF(&symbolsPath, "%s/symbols/armeabi-v7a", data_dir);
|
||||
} else if (android_x86) {
|
||||
asprintf(&symbolsPath, "%s/symbols/x86", data_dir);
|
||||
ASPRINTF(&symbolsPath, "%s/symbols/x86", data_dir);
|
||||
} else /*if (android_armArch)*/ {
|
||||
asprintf(&symbolsPath, "%s/symbols/armeabi", data_dir);
|
||||
ASPRINTF(&symbolsPath, "%s/symbols/armeabi", data_dir);
|
||||
} /*else { moar archs ... } */
|
||||
|
||||
bool success = crashHandler->processCrash(crashPath, symbolsPath, outputFILE);
|
||||
@ -131,7 +156,7 @@ void Java_org_deadc0de_apple2ix_Apple2CrashHandler_nativeProcessCrash(JNIEnv *en
|
||||
}
|
||||
|
||||
if (symbolsPath) {
|
||||
ASPRINTF_FREE(symbolsPath);
|
||||
FREE(symbolsPath);
|
||||
}
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, jCrashPath, crashPath);
|
||||
|
@ -47,8 +47,7 @@ typedef enum lifecycle_seq_t {
|
||||
static lifecycle_seq_t appState = APP_RUNNING;
|
||||
|
||||
#if TESTING
|
||||
static bool running_tests = false;
|
||||
static void _run_tests(void) {
|
||||
static void _start_tests(void) {
|
||||
char *local_argv[] = {
|
||||
"-f",
|
||||
NULL
|
||||
@ -57,20 +56,23 @@ static void _run_tests(void) {
|
||||
for (char **p = &local_argv[0]; *p != NULL; p++) {
|
||||
++local_argc;
|
||||
}
|
||||
#if defined(TEST_CPU)
|
||||
#if TEST_CPU
|
||||
// Currently this test is the only one that runs as a black screen
|
||||
extern int test_cpu(int, char *[]);
|
||||
test_cpu(local_argc, local_argv);
|
||||
tkill(getpid(), SIGKILL); // and we're done ...
|
||||
#elif defined(TEST_VM)
|
||||
extern int test_vm(int, char *[]);
|
||||
kill(getpid(), SIGKILL); // and we're done ...
|
||||
#elif TEST_VM
|
||||
extern void test_vm(int, char *[]);
|
||||
test_vm(local_argc, local_argv);
|
||||
#elif defined(TEST_DISPLAY)
|
||||
extern int test_display(int, char *[]);
|
||||
#elif TEST_DISPLAY
|
||||
extern void test_display(int, char *[]);
|
||||
test_display(local_argc, local_argv);
|
||||
#elif defined(TEST_DISK)
|
||||
extern int test_disk(int, char *[]);
|
||||
#elif TEST_DISK
|
||||
extern void test_disk(int, char *[]);
|
||||
test_disk(local_argc, local_argv);
|
||||
#elif TEST_PREFS
|
||||
extern void test_prefs(int, char *[]);
|
||||
test_prefs(local_argc, local_argv);
|
||||
#else
|
||||
# error "OOPS, no tests specified"
|
||||
#endif
|
||||
@ -159,10 +161,16 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeOnCreate(JNIEnv *env, jclas
|
||||
int pagesize = getpagesize();
|
||||
LOG("PAGESIZE IS : %d", pagesize);
|
||||
|
||||
data_dir = strdup(dataDir);
|
||||
data_dir = STRDUP(dataDir);
|
||||
if (crashHandler && crashHandler->init) {
|
||||
crashHandler->init(data_dir);
|
||||
}
|
||||
char *home = NULL;
|
||||
ASPRINTF(&home, "HOME=%s", data_dir);
|
||||
if (home) {
|
||||
putenv(home);
|
||||
LEAK(home);
|
||||
}
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, j_dataDir, dataDir);
|
||||
LOG("data_dir : %s", data_dir);
|
||||
@ -173,61 +181,60 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeOnCreate(JNIEnv *env, jclas
|
||||
|
||||
joydriver_setClampBeyondRadius(true);
|
||||
|
||||
#if !TESTING
|
||||
cpu_pause();
|
||||
emulator_start();
|
||||
//#define DO_CPU65_TRACING 1
|
||||
#if DO_CPU65_TRACING
|
||||
# warning !!!!!!!!!! this will quickly eat up disk space !!!!!!!!!!
|
||||
char *trfile = NULL;
|
||||
ASPRINTF(&trfile, "%s/%s", data_dir, "cpu_trace.txt");
|
||||
cpu65_trace_begin(trfile);
|
||||
FREE(trfile);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2View_nativeGraphicsChanged(JNIEnv *env, jclass cls, jint width, jint height) {
|
||||
// WARNING : this can happen on non-GL thread
|
||||
LOG("...");
|
||||
video_backend->reshape(width, height);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2View_nativeGraphicsInitialized(JNIEnv *env, jclass cls, jint width, jint height) {
|
||||
// WARNING : this needs to happen on the GL thread only
|
||||
LOG("width:%d height:%d", width, height);
|
||||
video_shutdown();
|
||||
video_backend->reshape(width, height);
|
||||
video_backend->init((void *)0);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeEmulationResume(JNIEnv *env, jclass cls) {
|
||||
cpu_pause();
|
||||
#if TESTING
|
||||
// test driver thread is managing CPU
|
||||
if (!running_tests) {
|
||||
running_tests = true;
|
||||
assert(cpu_thread_id == 0 && "CPU thread must not be initialized yet...");
|
||||
_run_tests();
|
||||
}
|
||||
#else
|
||||
_start_tests();
|
||||
#endif
|
||||
emulator_start();
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2View_nativeGraphicsInitialized(JNIEnv *env, jclass cls) {
|
||||
LOG("...");
|
||||
_video_setRenderThread(pthread_self()); // by definition, this method is called on the render thread ...
|
||||
video_shutdown();
|
||||
video_init();
|
||||
}
|
||||
|
||||
jboolean Java_org_deadc0de_apple2ix_Apple2Activity_nativeEmulationResume(JNIEnv *env, jclass cls) {
|
||||
if (!cpu_isPaused()) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
LOG("...");
|
||||
cpu_resume();
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeEmulationPause(JNIEnv *env, jclass cls) {
|
||||
jboolean Java_org_deadc0de_apple2ix_Apple2Activity_nativeEmulationPause(JNIEnv *env, jclass cls) {
|
||||
if (appState != APP_RUNNING) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if DO_CPU65_TRACING
|
||||
cpu65_trace_checkpoint();
|
||||
#endif
|
||||
|
||||
disk6_flush(0);
|
||||
disk6_flush(1);
|
||||
|
||||
if (cpu_isPaused()) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
LOG("...");
|
||||
|
||||
#if TESTING
|
||||
// test driver thread is managing CPU
|
||||
#else
|
||||
cpu_pause();
|
||||
#endif
|
||||
prefs_save();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2View_nativeRender(JNIEnv *env, jclass cls) {
|
||||
@ -241,6 +248,7 @@ void Java_org_deadc0de_apple2ix_Apple2View_nativeRender(JNIEnv *env, jclass cls)
|
||||
return;
|
||||
}
|
||||
|
||||
//#define FPS_LOG 1
|
||||
#if FPS_LOG
|
||||
static uint32_t prevCount = 0;
|
||||
static uint32_t idleCount = 0;
|
||||
@ -258,27 +266,34 @@ void Java_org_deadc0de_apple2ix_Apple2View_nativeRender(JNIEnv *env, jclass cls)
|
||||
}
|
||||
#endif
|
||||
|
||||
video_backend->render();
|
||||
video_render();
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeReboot(JNIEnv *env, jclass cls) {
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeReboot(JNIEnv *env, jclass cls, jint resetState) {
|
||||
LOG("...");
|
||||
cpu65_reboot();
|
||||
if (resetState) {
|
||||
// joystick button settings should be balanced by c_joystick_reset() triggered on CPU thread
|
||||
if (resetState == 1) {
|
||||
joy_button0 = 0xff;
|
||||
joy_button1 = 0x0;
|
||||
} else {
|
||||
joy_button0 = 0x0;
|
||||
joy_button1 = 0xff;
|
||||
}
|
||||
}
|
||||
cpu65_interrupt(ResetSig);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeOnQuit(JNIEnv *env, jclass cls) {
|
||||
#if TESTING
|
||||
// test driver thread is managing CPU
|
||||
#else
|
||||
appState = APP_REQUESTED_SHUTDOWN;
|
||||
|
||||
LOG("...");
|
||||
|
||||
disk6_eject(0);
|
||||
disk6_eject(1);
|
||||
#if DO_CPU65_TRACING
|
||||
cpu65_trace_end();
|
||||
#endif
|
||||
|
||||
cpu_resume();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeOnKeyDown(JNIEnv *env, jclass cls, jint keyCode, jint metaState) {
|
||||
@ -324,7 +339,11 @@ jlong Java_org_deadc0de_apple2ix_Apple2View_nativeOnTouch(JNIEnv *env, jclass cl
|
||||
return flags;
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeChooseDisk(JNIEnv *env, jclass cls, jstring jPath, jboolean driveA, jboolean readOnly) {
|
||||
void Java_org_deadc0de_apple2ix_Apple2DisksMenu_nativeChooseDisk(JNIEnv *env, jclass cls, jstring jPath, jboolean driveA, jboolean readOnly) {
|
||||
#if TESTING
|
||||
return;
|
||||
#endif
|
||||
|
||||
const char *path = (*env)->GetStringUTFChars(env, jPath, NULL);
|
||||
int drive = driveA ? 0 : 1;
|
||||
int ro = readOnly ? 1 : 0;
|
||||
@ -334,22 +353,22 @@ void Java_org_deadc0de_apple2ix_Apple2Activity_nativeChooseDisk(JNIEnv *env, jcl
|
||||
LOG(": (%s, %s, %s)", path, driveA ? "drive A" : "drive B", readOnly ? "read only" : "read/write");
|
||||
if (disk6_insert(drive, path, ro)) {
|
||||
char *gzPath = NULL;
|
||||
asprintf(&gzPath, "%s.gz", path);
|
||||
ASPRINTF(&gzPath, "%s.gz", path);
|
||||
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);
|
||||
FREE(gzPath);
|
||||
} else {
|
||||
video_backend->animation_showDiskChosen(drive);
|
||||
video_animations->animation_showDiskChosen(drive);
|
||||
}
|
||||
(*env)->ReleaseStringUTFChars(env, jPath, path);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Activity_nativeEjectDisk(JNIEnv *env, jclass cls, jboolean driveA) {
|
||||
void Java_org_deadc0de_apple2ix_Apple2DisksMenu_nativeEjectDisk(JNIEnv *env, jclass cls, jboolean driveA) {
|
||||
LOG("...");
|
||||
disk6_eject(!driveA);
|
||||
}
|
||||
@ -387,20 +406,28 @@ jstring Java_org_deadc0de_apple2ix_Apple2Activity_nativeLoadState(JNIEnv *env, j
|
||||
bool readOnly2 = disk6.disk[1].is_protected;
|
||||
char *str = NULL;
|
||||
jstring jstr = NULL;
|
||||
asprintf(&str, "{ disk1 = \"%s\"; readOnly1 = %s; disk2 = \"%s\"; readOnly2 = %s }", (disk1 ?: ""), readOnly1 ? "true" : "false", (disk2 ?: ""), readOnly2 ? "true" : "false");
|
||||
ASPRINTF(&str, "{ disk1 = \"%s\"; readOnly1 = %s; disk2 = \"%s\"; readOnly2 = %s }", (disk1 ?: ""), readOnly1 ? "true" : "false", (disk2 ?: ""), readOnly2 ? "true" : "false");
|
||||
if (str) {
|
||||
jstr = (*env)->NewStringUTF(env, str);
|
||||
ASPRINTF_FREE(str);
|
||||
FREE(str);
|
||||
}
|
||||
|
||||
return jstr;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Constructor
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativePrefsSync(JNIEnv *env, jclass cls, jstring jDomain) {
|
||||
const char *domain = NULL;
|
||||
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void _init_jnihooks(void) {
|
||||
// ...
|
||||
if (jDomain) {
|
||||
domain = (*env)->GetStringUTFChars(env, jDomain, 0);
|
||||
}
|
||||
|
||||
LOG("... domain: %s", domain);
|
||||
prefs_load();
|
||||
prefs_sync(domain);
|
||||
|
||||
if (jDomain) {
|
||||
(*env)->ReleaseStringUTFChars(env, jDomain, domain);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,326 +0,0 @@
|
||||
/*
|
||||
* Apple // emulator for *ix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*
|
||||
* Copyright 2015 Aaron Culliney
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
typedef enum AndroidTouchJoystickButtonValues {
|
||||
//ANDROID_TOUCHJOY_NONE = 0,
|
||||
ANDROID_TOUCHJOY_BUTTON0 = 1,
|
||||
ANDROID_TOUCHJOY_BUTTON1,
|
||||
ANDROID_TOUCHJOY_BUTTON_BOTH,
|
||||
} AndroidTouchJoystickButtonValues;
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetColor(JNIEnv *env, jclass cls, jint color) {
|
||||
LOG("color : %d", color);
|
||||
#if TESTING
|
||||
color_mode = COLOR;
|
||||
#else
|
||||
if (color < COLOR_NONE || color > COLOR_INTERP) {
|
||||
return;
|
||||
}
|
||||
color_mode = color;
|
||||
|
||||
video_reset();
|
||||
video_setpage(!!(softswitches & SS_SCREEN));
|
||||
video_redraw();
|
||||
#endif
|
||||
}
|
||||
|
||||
jboolean Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetSpeakerEnabled(JNIEnv *env, jclass cls, jboolean enabled) {
|
||||
LOG("enabled : %d", true);
|
||||
// NO-OP ... speaker should always be enabled (but volume could be zero)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetSpeakerVolume(JNIEnv *env, jclass cls, jint goesToTen) {
|
||||
LOG("volume : %d", goesToTen);
|
||||
assert(goesToTen >= 0);
|
||||
sound_volume = goesToTen;
|
||||
#warning FIXME TODO refactor/remove sound_volume ?
|
||||
vm_reinitializeAudio();
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetAudioLatency(JNIEnv *env, jclass cls, jfloat latencySecs) {
|
||||
#if !TESTING
|
||||
LOG("audio latency : %fsecs", latencySecs);
|
||||
assert(cpu_isPaused());
|
||||
audio_setLatency(latencySecs);
|
||||
timing_reinitializeAudio();
|
||||
#endif
|
||||
}
|
||||
|
||||
jboolean Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetMockingboardEnabled(JNIEnv *env, jclass cls, jboolean enabled) {
|
||||
#if !TESTING
|
||||
LOG("mockingboard enabled : %d", enabled);
|
||||
assert(cpu_isPaused());
|
||||
MB_SetEnabled(enabled);
|
||||
timing_reinitializeAudio();
|
||||
#endif
|
||||
return enabled;
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetMockingboardVolume(JNIEnv *env, jclass cls, jint goesToTen) {
|
||||
LOG("mockingboard volume : %d", goesToTen);
|
||||
assert(goesToTen >= 0);
|
||||
MB_SetVolumeZeroToTen(goesToTen);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetCurrentTouchDevice(JNIEnv *env, jclass cls, jint touchDevice) {
|
||||
LOG("current touch device : %d", touchDevice);
|
||||
assert(touchDevice >= 0 && touchDevice < TOUCH_DEVICE_DEVICE_MAX);
|
||||
switch (touchDevice) {
|
||||
case TOUCH_DEVICE_JOYSTICK:
|
||||
keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
joydriver_setTouchJoystickOwnsScreen(true);
|
||||
joydriver_setTouchVariant(EMULATED_JOYSTICK);
|
||||
video_backend->animation_showTouchJoystick();
|
||||
break;
|
||||
|
||||
case TOUCH_DEVICE_JOYSTICK_KEYPAD:
|
||||
keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
joydriver_setTouchJoystickOwnsScreen(true);
|
||||
joydriver_setTouchVariant(EMULATED_KEYPAD);
|
||||
video_backend->animation_showTouchJoystick();
|
||||
break;
|
||||
|
||||
case TOUCH_DEVICE_KEYBOARD:
|
||||
keydriver_setTouchKeyboardOwnsScreen(true);
|
||||
joydriver_setTouchJoystickOwnsScreen(false);
|
||||
video_backend->animation_showTouchKeyboard();
|
||||
break;
|
||||
|
||||
case TOUCH_DEVICE_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchJoystickVisibility(JNIEnv *env, jclass cls, jboolean visibility) {
|
||||
LOG("visibility: %d", visibility);
|
||||
joydriver_setShowControls(visibility);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchJoystickAzimuthVisibility(JNIEnv *env, jclass cls, jboolean visibility) {
|
||||
LOG("visibility: %d", visibility);
|
||||
joydriver_setShowAzimuth(visibility);
|
||||
}
|
||||
|
||||
jint Java_org_deadc0de_apple2ix_Apple2Preferences_nativeGetCurrentTouchDevice(JNIEnv *env, jclass cls) {
|
||||
LOG("%s", "");
|
||||
if (joydriver_ownsScreen()) {
|
||||
touchjoy_variant_t variant = joydriver_getTouchVariant();
|
||||
if (variant == EMULATED_JOYSTICK) {
|
||||
return TOUCH_DEVICE_JOYSTICK;
|
||||
} else if (variant == EMULATED_KEYPAD) {
|
||||
return TOUCH_DEVICE_JOYSTICK_KEYPAD;
|
||||
}
|
||||
} else if (keydriver_ownsScreen()) {
|
||||
return TOUCH_DEVICE_KEYBOARD;
|
||||
}
|
||||
return TOUCH_DEVICE_NONE;
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchMenuEnabled(JNIEnv *env, jclass cls, jboolean enabled) {
|
||||
LOG("enabled : %d", enabled);
|
||||
interface_setTouchMenuEnabled(enabled);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchKeyboardLowercaseEnabled(JNIEnv *env, jclass cls, jboolean enabled) {
|
||||
LOG("enabled : %d", enabled);
|
||||
keydriver_setLowercaseEnabled(enabled);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchKeyboardVisibility(JNIEnv *env, jclass cls, jfloat inactiveAlpha, jfloat activeAlpha) {
|
||||
LOG("inactive:%f active:%f", inactiveAlpha, activeAlpha);
|
||||
keydriver_setVisibilityWhenOwnsScreen(inactiveAlpha, activeAlpha);
|
||||
interface_setTouchMenuVisibility(inactiveAlpha, activeAlpha);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchKeyboardGlyphScale(JNIEnv *env, jclass cls, jint glyphScale) {
|
||||
LOG("glyphScale:%d", glyphScale);
|
||||
keydriver_setGlyphScale(glyphScale);
|
||||
interface_setGlyphScale(glyphScale);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchJoystickButtonTypes(JNIEnv *env, jclass cls, jint touchDownButton, jint northButton, jint southButton) {
|
||||
LOG(": %d,%d,%d", touchDownButton, northButton, southButton);
|
||||
|
||||
touchDownButton -= 1;
|
||||
northButton -= 1;
|
||||
southButton -= 1;
|
||||
if (touchDownButton < TOUCH_NONE || touchDownButton > TOUCH_BOTH) {
|
||||
ERRLOG("OOPS, invalid parameter!");
|
||||
return;
|
||||
}
|
||||
if (northButton < TOUCH_NONE || northButton > TOUCH_BOTH) {
|
||||
ERRLOG("OOPS, invalid parameter!");
|
||||
return;
|
||||
}
|
||||
if (southButton < TOUCH_NONE || southButton > TOUCH_BOTH) {
|
||||
ERRLOG("OOPS, invalid parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t rosetteChars[ROSETTE_COLS * ROSETTE_ROWS];
|
||||
int rosetteScancodes[ROSETTE_COLS * ROSETTE_ROWS];
|
||||
rosetteChars[ROSETTE_NORTHWEST] = ' '; rosetteScancodes[ROSETTE_NORTHWEST] = -1;
|
||||
rosetteChars[ROSETTE_NORTH] = (uint8_t)MOUSETEXT_UP; rosetteScancodes[ROSETTE_NORTH] = -1;
|
||||
rosetteChars[ROSETTE_NORTHEAST] = ' '; rosetteScancodes[ROSETTE_NORTHEAST] = -1;
|
||||
rosetteChars[ROSETTE_WEST] = (uint8_t)MOUSETEXT_LEFT; rosetteScancodes[ROSETTE_WEST] = -1;
|
||||
rosetteChars[ROSETTE_CENTER] = ICONTEXT_MENU_TOUCHJOY; rosetteScancodes[ROSETTE_CENTER] = -1;
|
||||
rosetteChars[ROSETTE_EAST] = (uint8_t)MOUSETEXT_RIGHT; rosetteScancodes[ROSETTE_EAST] = -1;
|
||||
rosetteChars[ROSETTE_SOUTHWEST] = ' '; rosetteScancodes[ROSETTE_SOUTHWEST] = -1;
|
||||
rosetteChars[ROSETTE_SOUTH] = (uint8_t)MOUSETEXT_DOWN; rosetteScancodes[ROSETTE_SOUTH] = -1;
|
||||
rosetteChars[ROSETTE_SOUTHEAST] = ' '; rosetteScancodes[ROSETTE_SOUTHEAST] = -1;
|
||||
joydriver_setTouchAxisTypes(rosetteChars, rosetteScancodes);
|
||||
joydriver_setTouchButtonTypes((touchjoy_button_type_t)touchDownButton, -1, (touchjoy_button_type_t)northButton, -1, (touchjoy_button_type_t)southButton, -1);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchJoystickTapDelay(JNIEnv *env, jclass cls, jfloat secs) {
|
||||
LOG("tap delay : %f", secs);
|
||||
joydriver_setTapDelay(secs);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchJoystickAxisSensitivity(JNIEnv *env, jclass cls, jfloat multiplier) {
|
||||
LOG("axis sensitivity : %f", multiplier);
|
||||
joydriver_setTouchAxisSensitivity(multiplier);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchJoystickButtonSwitchThreshold(JNIEnv *env, jclass cls, jint delta) {
|
||||
LOG("delta : %d", delta);
|
||||
joydriver_setButtonSwitchThreshold(delta);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeTouchJoystickSetScreenDivision(JNIEnv *env, jclass cls, jfloat division) {
|
||||
LOG("division : %f", division);
|
||||
joydriver_setScreenDivision(division);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeTouchJoystickSetAxisOnLeft(JNIEnv *env, jclass cls, jboolean axisIsOnLeft) {
|
||||
LOG("axis on left : %d", axisIsOnLeft);
|
||||
joydriver_setAxisOnLeft(axisIsOnLeft);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeTouchJoystickSetKeypadTypes(JNIEnv *env, jclass cls,
|
||||
jintArray jRosetteChars, jintArray jRosetteScans, jintArray jButtonsChars, jintArray jButtonsScans)
|
||||
{
|
||||
jint *rosetteChars = (*env)->GetIntArrayElements(env, jRosetteChars, 0);
|
||||
jint *rosetteScans = (*env)->GetIntArrayElements(env, jRosetteScans, 0);
|
||||
jint *buttonsChars = (*env)->GetIntArrayElements(env, jButtonsChars, 0);
|
||||
jint *buttonsScans = (*env)->GetIntArrayElements(env, jButtonsScans, 0);
|
||||
|
||||
LOG("NW:%c/%d, N:%c/%d, NE:%c/%d, ... SWIPEUP:%c/%d",
|
||||
(char)rosetteChars[0], rosetteScans[0], (char)rosetteChars[1], rosetteScans[1], (char)rosetteChars[2], rosetteScans[2],
|
||||
(char)buttonsChars[1], buttonsScans[1]);
|
||||
LOG(" W:%c/%d, C:%c/%d, E:%c/%d, ... TAP:%c/%d",
|
||||
(char)rosetteChars[3], rosetteScans[3], (char)rosetteChars[4], rosetteScans[4], (char)rosetteChars[5], rosetteScans[5],
|
||||
(char)buttonsChars[0], buttonsScans[0]);
|
||||
LOG("SW:%c/%d, S:%c/%d, SE:%c/%d, ... SWIPEDN:%c/%d",
|
||||
(char)rosetteChars[6], rosetteScans[6], (char)rosetteChars[7], rosetteScans[7], (char)rosetteChars[8], rosetteScans[8],
|
||||
(char)buttonsChars[2], buttonsScans[2]);
|
||||
|
||||
// we could just pass these as jcharArray ... but this isn't a tight loop =P
|
||||
uint8_t actualChars[ROSETTE_ROWS * ROSETTE_COLS];
|
||||
for (unsigned int i=0; i<(ROSETTE_ROWS * ROSETTE_COLS); i++) {
|
||||
actualChars[i] = (uint8_t)rosetteChars[i];
|
||||
}
|
||||
if (actualChars[4] == ICONTEXT_NONACTIONABLE) {
|
||||
actualChars[4] = ICONTEXT_MENU_TOUCHJOY;
|
||||
}
|
||||
joydriver_setTouchAxisTypes(actualChars, rosetteScans);
|
||||
joydriver_setTouchButtonTypes(
|
||||
(touchjoy_button_type_t)buttonsChars[0], buttonsScans[0],
|
||||
(touchjoy_button_type_t)buttonsChars[1], buttonsScans[1],
|
||||
(touchjoy_button_type_t)buttonsChars[2], buttonsScans[2]);
|
||||
|
||||
(*env)->ReleaseIntArrayElements(env, jRosetteChars, rosetteChars, 0);
|
||||
(*env)->ReleaseIntArrayElements(env, jRosetteScans, rosetteScans, 0);
|
||||
(*env)->ReleaseIntArrayElements(env, jButtonsChars, buttonsChars, 0);
|
||||
(*env)->ReleaseIntArrayElements(env, jButtonsScans, buttonsScans, 0);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeTouchDeviceBeginCalibrationMode(JNIEnv *env, jclass cls) {
|
||||
LOG("%s", "");
|
||||
if (joydriver_ownsScreen()) {
|
||||
joydriver_beginCalibration();
|
||||
} else if (keydriver_ownsScreen()) {
|
||||
keydriver_beginCalibration();
|
||||
}
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeTouchDeviceEndCalibrationMode(JNIEnv *env, jclass cls) {
|
||||
LOG("%s", "");
|
||||
if (joydriver_ownsScreen()) {
|
||||
joydriver_endCalibration();
|
||||
} else if (keydriver_ownsScreen()) {
|
||||
keydriver_endCalibration();
|
||||
}
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetTouchDeviceKeyRepeatThreshold(JNIEnv *env, jclass cls, jfloat threshold) {
|
||||
LOG("threshold : %f", threshold);
|
||||
joydriver_setKeyRepeatThreshold(threshold);
|
||||
}
|
||||
|
||||
jint Java_org_deadc0de_apple2ix_Apple2Preferences_nativeGetCPUSpeed(JNIEnv *env, jclass cls) {
|
||||
LOG("%s", "");
|
||||
return (jint)round(cpu_scale_factor * 100.0);
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeSetCPUSpeed(JNIEnv *env, jclass cls, jint percentSpeed) {
|
||||
LOG("percentSpeed : %d%%", percentSpeed);
|
||||
#if TESTING
|
||||
cpu_scale_factor = CPU_SCALE_FASTEST;
|
||||
cpu_altscale_factor = CPU_SCALE_FASTEST;
|
||||
timing_initialize();
|
||||
#else
|
||||
bool wasPaused = cpu_isPaused();
|
||||
|
||||
if (!wasPaused) {
|
||||
cpu_pause();
|
||||
}
|
||||
|
||||
cpu_scale_factor = percentSpeed/100.0;
|
||||
if (cpu_scale_factor > CPU_SCALE_FASTEST) {
|
||||
cpu_scale_factor = CPU_SCALE_FASTEST;
|
||||
}
|
||||
if (cpu_scale_factor < CPU_SCALE_SLOWEST) {
|
||||
cpu_scale_factor = CPU_SCALE_SLOWEST;
|
||||
}
|
||||
|
||||
if (video_backend->animation_showCPUSpeed) {
|
||||
video_backend->animation_showCPUSpeed();
|
||||
}
|
||||
|
||||
timing_initialize();
|
||||
|
||||
if (!wasPaused) {
|
||||
cpu_resume();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Java_org_deadc0de_apple2ix_Apple2Preferences_nativeLoadTouchKeyboardJSON(JNIEnv *env, jclass cls, jstring j_jsonPath) {
|
||||
const char *jsonPath = (*env)->GetStringUTFChars(env, j_jsonPath, 0);
|
||||
LOG("jsonPath: %s", jsonPath);
|
||||
keydriver_loadAltKbd(jsonPath);
|
||||
(*env)->ReleaseStringUTFChars(env, j_jsonPath, jsonPath);
|
||||
}
|
||||
|
@ -31,17 +31,17 @@ APPLE2_AUDIO_SRC = \
|
||||
APPLE2_META_SRC = \
|
||||
$(APPLE2_SRC_PATH)/meta/debug.c $(APPLE2_SRC_PATH)/meta/debugger.c $(APPLE2_SRC_PATH)/meta/opcodes.c \
|
||||
$(APPLE2_SRC_PATH)/meta/lintrace.c $(APPLE2_SRC_PATH)/test/sha1.c $(APPLE2_SRC_PATH)/json_parse.c \
|
||||
$(APPLE2_SRC_PATH)/../externals/jsmn/jsmn.c
|
||||
$(APPLE2_SRC_PATH)/memmngt.c $(APPLE2_SRC_PATH)/../externals/jsmn/jsmn.c
|
||||
|
||||
APPLE2_MAIN_SRC = \
|
||||
$(APPLE2_SRC_PATH)/font.c $(APPLE2_SRC_PATH)/rom.c $(APPLE2_SRC_PATH)/misc.c $(APPLE2_SRC_PATH)/display.c $(APPLE2_SRC_PATH)/vm.c \
|
||||
$(APPLE2_SRC_PATH)/timing.c $(APPLE2_SRC_PATH)/zlib-helpers.c $(APPLE2_SRC_PATH)/joystick.c $(APPLE2_SRC_PATH)/keys.c \
|
||||
$(APPLE2_SRC_PATH)/interface.c $(APPLE2_SRC_PATH)/disk.c $(APPLE2_SRC_PATH)/cpu-supp.c \
|
||||
jnihooks.c jniprefs.c androidkeys.c
|
||||
$(APPLE2_SRC_PATH)/interface.c $(APPLE2_SRC_PATH)/disk.c $(APPLE2_SRC_PATH)/cpu-supp.c $(APPLE2_SRC_PATH)/prefs.c \
|
||||
jnihooks.c androidkeys.c
|
||||
|
||||
APPLE2_OPTIM_CFLAGS := -O2
|
||||
APPLE2_BASE_CFLAGS := -DAPPLE2IX=1 -DINTERFACE_TOUCH=1 -DMOBILE_DEVICE=1 -DVIDEO_OPENGL=1 -DDEBUGGER=1 -DAUDIO_ENABLED=1 -std=gnu11 -DPREVENT_TEXTREL=1 -fPIC $(APPLE2_OPTIM_CFLAGS) -I$(APPLE2_SRC_PATH)
|
||||
APPLE2_BASE_LDLIBS := -llog -landroid -lGLESv2 -lz -lOpenSLES
|
||||
APPLE2_OPTIM_CFLAGS := -Os
|
||||
APPLE2_BASE_CFLAGS := -DAPPLE2IX=1 -DINTERFACE_TOUCH=1 -DMOBILE_DEVICE=1 -DVIDEO_OPENGL=1 -DDEBUGGER=1 -DAUDIO_ENABLED=1 -std=gnu11 -fPIC $(APPLE2_OPTIM_CFLAGS) -I$(APPLE2_SRC_PATH)
|
||||
APPLE2_BASE_LDLIBS := -Wl,-z,text -Wl,-z,noexecstack -llog -landroid -lGLESv2 -lz -lOpenSLES -latomic
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += cpufeatures
|
||||
|
||||
|
6
Android/jni/start_valgrind.sh
Normal file
6
Android/jni/start_valgrind.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/system/bin/sh
|
||||
# WARNING : these $ variables need to be defined above and outside this bundled script
|
||||
set -x
|
||||
PACKAGE=org.deadc0de.apple2ix.basic
|
||||
export TMPDIR=/data/data/org.deadc0de.apple2ix.basic
|
||||
exec /data/local/Inst/bin/valgrind --gen-suppressions=all $GPU_VARIANT --num-callers=16 --error-limit=no -v --error-limit=no --default-suppressions=yes --suppressions=/data/local/Inst/lib/valgrind/default.supp --trace-children=yes --log-file=/sdcard/valgrind.log.%p --tool=memcheck --leak-check=full --show-reachable=yes $*
|
@ -12,7 +12,7 @@ include $(COMMON_SOURCES_MK)
|
||||
|
||||
LOCAL_MODULE := libapple2ix
|
||||
LOCAL_SRC_FILES := $(APPLE2_SRC_PATH)/test/testcommon.c $(APPLE2_SRC_PATH)/test/testcpu.c
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_CPU -DTESTING=1
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_CPU=1 -DTESTING=1
|
||||
LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
# Add assembly files first ... mostly for the benefit of the ARM assembler ...
|
||||
|
@ -12,7 +12,7 @@ include $(COMMON_SOURCES_MK)
|
||||
|
||||
LOCAL_MODULE := libapple2ix
|
||||
LOCAL_SRC_FILES := $(APPLE2_SRC_PATH)/test/testcommon.c $(APPLE2_SRC_PATH)/test/testdisk.c
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_DISK -DTESTING=1 -DDISK_TRACING=1
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_DISK=1 -DTESTING=1 -DDISK_TRACING=1
|
||||
LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
# Add assembly files first ... mostly for the benefit of the ARM assembler ...
|
||||
|
@ -12,7 +12,7 @@ include $(COMMON_SOURCES_MK)
|
||||
|
||||
LOCAL_MODULE := libapple2ix
|
||||
LOCAL_SRC_FILES := $(APPLE2_SRC_PATH)/test/testcommon.c $(APPLE2_SRC_PATH)/test/testdisplay.c
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_DISPLAY -DTESTING=1
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_DISPLAY=1 -DTESTING=1
|
||||
LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
# Add assembly files first ... mostly for the benefit of the ARM assembler ...
|
||||
|
1
Android/jni/testprefs
Symbolic link
1
Android/jni/testprefs
Symbolic link
@ -0,0 +1 @@
|
||||
build.sh
|
34
Android/jni/testprefs.mk
Normal file
34
Android/jni/testprefs.mk
Normal file
@ -0,0 +1,34 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
PACKAGE_IDENTIFIER := "org.deadc0de.apple2ix"
|
||||
PACKAGE_NAME := "apple2ix"
|
||||
COMMON_SOURCES_MK := $(LOCAL_PATH)/sources.mk
|
||||
include $(COMMON_SOURCES_MK)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Android build config
|
||||
|
||||
LOCAL_MODULE := libapple2ix
|
||||
LOCAL_SRC_FILES := $(APPLE2_SRC_PATH)/test/testcommon.c $(APPLE2_SRC_PATH)/test/testprefs.c
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_PREFS=1 -DTESTING=1
|
||||
LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
# Add assembly files first ... mostly for the benefit of the ARM assembler ...
|
||||
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
LOCAL_SRC_FILES += $(APPLE2_X86_SRC)
|
||||
LOCAL_CFLAGS += -DNO_UNDERSCORES=1
|
||||
else
|
||||
LOCAL_SRC_FILES += $(APPLE2_ARM_SRC)
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES += $(APPLE2_MAIN_SRC) $(APPLE2_META_SRC) $(APPLE2_VIDEO_SRC) $(APPLE2_AUDIO_SRC)
|
||||
|
||||
# Build a shared library and let Java/Dalvik drive
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
# --OR-- Build an executable so native can drive this show
|
||||
#include $(BUILD_EXECUTABLE)
|
||||
|
||||
$(call import-module, android/cpufeatures)
|
@ -12,7 +12,7 @@ include $(COMMON_SOURCES_MK)
|
||||
|
||||
LOCAL_MODULE := libapple2ix
|
||||
LOCAL_SRC_FILES := $(APPLE2_SRC_PATH)/test/testcommon.c $(APPLE2_SRC_PATH)/test/testvm.c
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_VM -DTESTING=1
|
||||
LOCAL_CFLAGS := $(APPLE2_BASE_CFLAGS) -g -DTEST_VM=1 -DTESTING=1
|
||||
LOCAL_LDLIBS := $(APPLE2_BASE_LDLIBS)
|
||||
|
||||
# Add assembly files first ... mostly for the benefit of the ARM assembler ...
|
||||
|
249
Android/toolchain_edits/valgrind-android.supp
Normal file
249
Android/toolchain_edits/valgrind-android.supp
Normal file
@ -0,0 +1,249 @@
|
||||
|
||||
##----------------------------------------------------------------------##
|
||||
|
||||
# Format of this file is:
|
||||
# {
|
||||
# name_of_suppression
|
||||
# tool_name:supp_kind
|
||||
# (optional extra info for some suppression types)
|
||||
# caller0 name, or /name/of/so/file.so
|
||||
# caller1 name, or ditto
|
||||
# (optionally: caller2 name)
|
||||
# (optionally: caller3 name)
|
||||
# }
|
||||
#
|
||||
# For Memcheck, the supp_kinds are:
|
||||
#
|
||||
# Param Value1 Value2 Value4 Value8 Value16 Jump
|
||||
# Free Addr1 Addr2 Addr4 Addr8 Addr16
|
||||
# Cond (previously known as Value0)
|
||||
#
|
||||
# and the optional extra info is:
|
||||
# if Param: name of system call param
|
||||
|
||||
##----------------------------------------------------------------------##
|
||||
|
||||
|
||||
# zlib-1.2.x uses uninitialised memory in some tricky way which
|
||||
# apparently is harmless (it must amount to a vectorised while-loop,
|
||||
# nothing else makes sense). Fools Memcheck though. See the mentioned
|
||||
# URL for details.
|
||||
{
|
||||
zlib-1.2.x trickyness (1a): See http://www.zlib.net/zlib_faq.html#faq36
|
||||
Memcheck:Cond
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
...
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
fun:deflate
|
||||
}
|
||||
|
||||
{
|
||||
zlib-1.2.x trickyness (1b): See http://www.zlib.net/zlib_faq.html#faq36
|
||||
Memcheck:Cond
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
fun:deflate
|
||||
}
|
||||
|
||||
{
|
||||
zlib-1.2.x trickyness (2a): See http://www.zlib.net/zlib_faq.html#faq36
|
||||
Memcheck:Value8
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
...
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
fun:deflate
|
||||
}
|
||||
|
||||
{
|
||||
zlib-1.2.x trickyness (2b): See http://www.zlib.net/zlib_faq.html#faq36
|
||||
Memcheck:Value8
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
fun:deflate
|
||||
}
|
||||
|
||||
{
|
||||
zlib-1.2.x trickyness (3a): See http://www.zlib.net/zlib_faq.html#faq36
|
||||
Memcheck:Value4
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
...
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
fun:deflate
|
||||
}
|
||||
|
||||
{
|
||||
zlib-1.2.x trickyness (3b): See http://www.zlib.net/zlib_faq.html#faq36
|
||||
Memcheck:Value4
|
||||
obj:/*lib*/libz.so.1.2.*
|
||||
fun:deflate
|
||||
}
|
||||
|
||||
##----------------------------------------------------------------------##
|
||||
|
||||
# Suppressions for Android's libc (bionic) and probably other
|
||||
# stuff too.
|
||||
|
||||
# this is a real bug in the Android stack -- this routine really does read and write below sp.
|
||||
{
|
||||
sha1_block_data_order-reads-below-sp
|
||||
Memcheck:Addr4
|
||||
fun:sha1_block_data_order
|
||||
}
|
||||
|
||||
# This is a false error, and it's reported in the wrong place. Memcheck misinterprets
|
||||
# a restore path in dvmPlatformInvoke: "ldmdb r4, {r4, r5, r6, r7, r8, r9, sp, pc}"
|
||||
# because it breaks this up into non-atomic IR. This non atomic IR restores PC
|
||||
# first, then SP, and then r4-r9; the latter of which happen after (from Memcheck's
|
||||
# point of view) the assignment to SP, hence constitute a read below SP (depends
|
||||
# which way SP moved, I guess). Worse, because these happen after the restore to SP,
|
||||
# the errors are reported in the callers of this function, not here :-(
|
||||
# General bogusness all round, but I don't see how to handle it any better. Hence
|
||||
# hide all the callers; fortunately there appear to be not many.
|
||||
#
|
||||
{
|
||||
dvmPlatformInvoke-misinterpretation-1
|
||||
Memcheck:Addr4
|
||||
fun:dvmCallJNIMethod_virtualNoRef
|
||||
}
|
||||
|
||||
{
|
||||
dvmPlatformInvoke-misinterpretation-2
|
||||
Memcheck:Addr4
|
||||
fun:dvmCallJNIMethod_staticNoRef
|
||||
}
|
||||
|
||||
{
|
||||
dvmPlatformInvoke-misinterpretation-3
|
||||
Memcheck:Addr4
|
||||
fun:dvmCallJNIMethod_general
|
||||
}
|
||||
|
||||
##----------------------------------------------------------------------##
|
||||
# ASC ADDED ...
|
||||
|
||||
{
|
||||
Linker-1
|
||||
Memcheck:Cond
|
||||
obj:/system/bin/linker
|
||||
}
|
||||
|
||||
{
|
||||
Linker-2
|
||||
Memcheck:Value4
|
||||
obj:/system/bin/linker
|
||||
}
|
||||
|
||||
{
|
||||
Linker-3
|
||||
Memcheck:Free
|
||||
obj:/system/bin/linker
|
||||
}
|
||||
|
||||
{
|
||||
Linker-4
|
||||
Memcheck:Leak
|
||||
obj:/system/bin/linker
|
||||
}
|
||||
|
||||
# ...
|
||||
|
||||
{
|
||||
BootOAT-1
|
||||
Memcheck:Cond
|
||||
obj:/data/dalvik-cache/arm/system@framework@boot.oat
|
||||
}
|
||||
|
||||
{
|
||||
BootOAT-2
|
||||
Memcheck:Addr4
|
||||
obj:/data/dalvik-cache/arm/system@framework@boot.oat
|
||||
}
|
||||
|
||||
{
|
||||
BootOAT-3
|
||||
Memcheck:Free
|
||||
obj:/data/dalvik-cache/arm/system@framework@boot.oat
|
||||
}
|
||||
|
||||
{
|
||||
BootOAT-4
|
||||
Memcheck:Leak
|
||||
obj:/data/dalvik-cache/arm/system@framework@boot.oat
|
||||
}
|
||||
|
||||
# ...
|
||||
|
||||
{
|
||||
LibJavaCore-1
|
||||
Memcheck:Cond
|
||||
obj:/system/lib/libjavacore.so
|
||||
}
|
||||
|
||||
{
|
||||
LibJavaCore-2
|
||||
Memcheck:Addr4
|
||||
obj:/system/lib/libjavacore.so
|
||||
}
|
||||
|
||||
{
|
||||
LibJavaCore-3
|
||||
Memcheck:Free
|
||||
obj:/system/lib/libjavacore.so
|
||||
}
|
||||
|
||||
{
|
||||
LibJavaCore-4
|
||||
Memcheck:Leak
|
||||
obj:/system/lib/libjavacore.so
|
||||
}
|
||||
|
||||
# ...
|
||||
|
||||
{
|
||||
APP2-SPECIFIC-1
|
||||
Memcheck:Cond
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic-2@base.apk@classes.dex
|
||||
}
|
||||
|
||||
{
|
||||
APP2-SPECIFIC-2
|
||||
Memcheck:Addr4
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic-2@base.apk@classes.dex
|
||||
}
|
||||
|
||||
{
|
||||
APP2-SPECIFIC-3
|
||||
Memcheck:Free
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic-2@base.apk@classes.dex
|
||||
}
|
||||
|
||||
{
|
||||
APP2-SPECIFIC-4
|
||||
Memcheck:Leak
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic-2@base.apk@classes.dex
|
||||
}
|
||||
|
||||
# ...
|
||||
|
||||
{
|
||||
APP-SPECIFIC-1
|
||||
Memcheck:Cond
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic@base.apk@classes.dex
|
||||
}
|
||||
|
||||
{
|
||||
APP-SPECIFIC-2
|
||||
Memcheck:Addr4
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic@base.apk@classes.dex
|
||||
}
|
||||
|
||||
{
|
||||
APP-SPECIFIC-3
|
||||
Memcheck:Free
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic@base.apk@classes.dex
|
||||
}
|
||||
|
||||
{
|
||||
APP-SPECIFIC-4
|
||||
Memcheck:Leak
|
||||
obj:/data/dalvik-cache/arm/data@app@org.deadc0de.apple2ix.basic@base.apk@classes.dex
|
||||
}
|
||||
|
@ -10,6 +10,12 @@
|
||||
4A2636F919FDEDB700DBFB00 /* Apple2Mac.help in Resources */ = {isa = PBXBuildFile; fileRef = 4A2636F819FDEDB700DBFB00 /* Apple2Mac.help */; };
|
||||
4A61119D1A6A1DE60035F7DE /* blank.po.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4A61119B1A6A1DE60035F7DE /* blank.po.gz */; };
|
||||
4A69C1921A33DB90001579EF /* DDHidLib.framework in Copy Files (1 item) */ = {isa = PBXBuildFile; fileRef = 77C2796F1A1047AF000FE33F /* DDHidLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
4A73BE2F1CCBE21B0041C573 /* memmngt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A73BE2E1CCBE21A0041C573 /* memmngt.c */; };
|
||||
4A73BE301CCBE22A0041C573 /* memmngt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A73BE2E1CCBE21A0041C573 /* memmngt.c */; };
|
||||
4A73BE311CCBE22B0041C573 /* memmngt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A73BE2E1CCBE21A0041C573 /* memmngt.c */; };
|
||||
4A73BE321CCBE22C0041C573 /* memmngt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A73BE2E1CCBE21A0041C573 /* memmngt.c */; };
|
||||
4A73BE331CCBE22C0041C573 /* memmngt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A73BE2E1CCBE21A0041C573 /* memmngt.c */; };
|
||||
4A73BE341CCBE22E0041C573 /* memmngt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A73BE2E1CCBE21A0041C573 /* memmngt.c */; };
|
||||
4A7EDC931AE092680072E98A /* glhudmodel.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A7EDC911AE092680072E98A /* glhudmodel.c */; };
|
||||
4A7EDC941AE092680072E98A /* glhudmodel.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A7EDC911AE092680072E98A /* glhudmodel.c */; };
|
||||
4A7EDC951AE092680072E98A /* glhudmodel.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A7EDC911AE092680072E98A /* glhudmodel.c */; };
|
||||
@ -25,6 +31,34 @@
|
||||
4A7EDCA01AE092B80072E98A /* interface.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A7EDC9D1AE092B80072E98A /* interface.c */; };
|
||||
4A7EDCA11AE092B80072E98A /* interface.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A7EDC9D1AE092B80072E98A /* interface.c */; };
|
||||
4A7EDCA21AE092B80072E98A /* interface.c in Sources */ = {isa = PBXBuildFile; fileRef = 4A7EDC9D1AE092B80072E98A /* interface.c */; };
|
||||
4AA2D7D61D1E23F40054A5FF /* jsmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55A71C1389370013166D /* jsmn.c */; };
|
||||
4AA2D7DB1D1E23F50054A5FF /* jsmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55A71C1389370013166D /* jsmn.c */; };
|
||||
4AA2D7DC1D1E23F60054A5FF /* jsmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55A71C1389370013166D /* jsmn.c */; };
|
||||
4AA2D7DD1D1E23F60054A5FF /* jsmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55A71C1389370013166D /* jsmn.c */; };
|
||||
4AA2D7DE1D1E24120054A5FF /* json_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55701C136E6F0013166D /* json_parse.c */; };
|
||||
4AA2D7DF1D1E24130054A5FF /* json_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55701C136E6F0013166D /* json_parse.c */; };
|
||||
4AA2D7E01D1E24130054A5FF /* json_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55701C136E6F0013166D /* json_parse.c */; };
|
||||
4AA2D7E11D1E24140054A5FF /* json_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 935C55701C136E6F0013166D /* json_parse.c */; };
|
||||
4AA2D7E21D1F559E0054A5FF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D241956885A0085CE5F /* MainMenu.xib */; };
|
||||
4AA2D7E31D1F559E0054A5FF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D241956885A0085CE5F /* MainMenu.xib */; };
|
||||
4AA2D7E41D1F559F0054A5FF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D241956885A0085CE5F /* MainMenu.xib */; };
|
||||
4AA2D7E51D202A5B0054A5FF /* EmulatorGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C55041C12B61D0013166D /* EmulatorGLView.m */; };
|
||||
4AA2D7E61D202A5C0054A5FF /* EmulatorGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C55041C12B61D0013166D /* EmulatorGLView.m */; };
|
||||
4AA2D7E71D202A5D0054A5FF /* EmulatorGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C55041C12B61D0013166D /* EmulatorGLView.m */; };
|
||||
4AA2D7E81D202BEA0054A5FF /* EmulatorJoystickController.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C550C1C12B61D0013166D /* EmulatorJoystickController.m */; };
|
||||
4AA2D7E91D202BEB0054A5FF /* EmulatorJoystickController.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C550C1C12B61D0013166D /* EmulatorJoystickController.m */; };
|
||||
4AA2D7EA1D202BEC0054A5FF /* EmulatorJoystickController.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C550C1C12B61D0013166D /* EmulatorJoystickController.m */; };
|
||||
4AA2D7EB1D202BED0054A5FF /* EmulatorJoystickController.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C550C1C12B61D0013166D /* EmulatorJoystickController.m */; };
|
||||
4AA2D7EC1D202BFA0054A5FF /* EmulatorGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C55041C12B61D0013166D /* EmulatorGLView.m */; };
|
||||
4AA2D7F11D202C810054A5FF /* DDHidLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77C2796F1A1047AF000FE33F /* DDHidLib.framework */; };
|
||||
4AA2D7F21D202C890054A5FF /* DDHidLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77C2796F1A1047AF000FE33F /* DDHidLib.framework */; };
|
||||
4AA2D7F31D202C900054A5FF /* DDHidLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77C2796F1A1047AF000FE33F /* DDHidLib.framework */; };
|
||||
4AA2D7F61D202CA70054A5FF /* DDHidLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77C2796F1A1047AF000FE33F /* DDHidLib.framework */; };
|
||||
4AA2D7F91D202CE60054A5FF /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 77FA92931C72D93D0090755C /* libz.tbd */; };
|
||||
4AA2D7FA1D202FF10054A5FF /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 77FA92931C72D93D0090755C /* libz.tbd */; };
|
||||
4AA2D7FB1D20301F0054A5FF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D241956885A0085CE5F /* MainMenu.xib */; };
|
||||
4AA2D7FC1D20309C0054A5FF /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 77FA92931C72D93D0090755C /* libz.tbd */; };
|
||||
4AA2D7FD1D20367D0054A5FF /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 77FA92931C72D93D0090755C /* libz.tbd */; };
|
||||
4AD4FE941A52464F00F958EC /* cpu.S in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D9019568A570085CE5F /* cpu.S */; };
|
||||
4AD4FE951A52464F00F958EC /* prefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7719568A570085CE5F /* prefs.c */; };
|
||||
4AD4FE961A52464F00F958EC /* display.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6419568A570085CE5F /* display.c */; };
|
||||
@ -43,20 +77,17 @@
|
||||
4AD4FEA31A52464F00F958EC /* darwin-shim.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6019568A570085CE5F /* darwin-shim.c */; };
|
||||
4AD4FEA51A52464F00F958EC /* vectorUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0A919D72700004344E0 /* vectorUtil.c */; };
|
||||
4AD4FEA61A52464F00F958EC /* debug.l in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7219568A570085CE5F /* debug.l */; };
|
||||
4AD4FEA71A52464F00F958EC /* CPUTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 779DD854195BDB1700DF89E5 /* CPUTestAppDelegate.m */; };
|
||||
4AD4FEA91A52464F00F958EC /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6519568A570085CE5F /* font.c */; };
|
||||
4AD4FEAA1A52464F00F958EC /* cpu-supp.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D5D19568A570085CE5F /* cpu-supp.c */; };
|
||||
4AD4FEAB1A52464F00F958EC /* vm.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D8D19568A570085CE5F /* vm.c */; };
|
||||
4AD4FEAC1A52464F00F958EC /* darwin-glue.S in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D9119568A570085CE5F /* darwin-glue.S */; };
|
||||
4AD4FEAD1A52464F00F958EC /* matrixUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0AF19D72700004344E0 /* matrixUtil.c */; };
|
||||
4AD4FEAE1A52464F00F958EC /* joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6C19568A570085CE5F /* joystick.c */; };
|
||||
4AD4FEB01A52464F00F958EC /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 779F565F19EAF6D000A6F107 /* OpenAL.framework */; };
|
||||
4AD4FEB21A52464F00F958EC /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 773B3D0F1956885A0085CE5F /* Cocoa.framework */; };
|
||||
4AD4FEB51A52464F00F958EC /* blank.dsk.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523019E8D3F600186B36 /* blank.dsk.gz */; };
|
||||
4AD4FEB61A52464F00F958EC /* blank.nib.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523119E8D3F600186B36 /* blank.nib.gz */; };
|
||||
4AD4FEB71A52464F00F958EC /* testvm1.dsk.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523819E8D3F600186B36 /* testvm1.dsk.gz */; };
|
||||
4AD4FEB81A52464F00F958EC /* README in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523419E8D3F600186B36 /* README */; };
|
||||
4AD4FEB91A52464F00F958EC /* MainMenu-Test.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC51C919E8BEB700186B36 /* MainMenu-Test.xib */; };
|
||||
4AD4FEBA1A52464F00F958EC /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D181956885A0085CE5F /* InfoPlist.strings */; };
|
||||
4AD4FEBB1A52464F00F958EC /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D271956885A0085CE5F /* Images.xcassets */; };
|
||||
4AD4FEBC1A52464F00F958EC /* speedtest.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523619E8D3F600186B36 /* speedtest.txt */; };
|
||||
@ -64,7 +95,6 @@
|
||||
4AD4FEBE1A52464F00F958EC /* Basic.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 779F562719E4FE9E00A6F107 /* Basic.vsh */; };
|
||||
4AD4FEBF1A52464F00F958EC /* Basic.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 779F562819E4FE9E00A6F107 /* Basic.fsh */; };
|
||||
4AD4FECB1A52468700F958EC /* testdisk.c in Sources */ = {isa = PBXBuildFile; fileRef = 4AD4FEC91A52467D00F958EC /* testdisk.c */; };
|
||||
4AD4FED21A524BED00F958EC /* Apple2MacTestDisk-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4AD4FEC41A52464F00F958EC /* Apple2MacTestDisk-Info.plist */; };
|
||||
4ADC51C219E8BD3700186B36 /* vectorUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0A919D72700004344E0 /* vectorUtil.c */; };
|
||||
4ADC51C319E8BD3A00186B36 /* sourceUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0AB19D72700004344E0 /* sourceUtil.c */; };
|
||||
4ADC51C419E8BD3D00186B36 /* modelUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0AD19D72700004344E0 /* modelUtil.c */; };
|
||||
@ -72,7 +102,6 @@
|
||||
4ADC51C619E8BD5200186B36 /* glvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0C719D736EB004344E0 /* glvideo.c */; };
|
||||
4ADC51C719E8BD5800186B36 /* Basic.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 779F562719E4FE9E00A6F107 /* Basic.vsh */; };
|
||||
4ADC51C819E8BD5A00186B36 /* Basic.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 779F562819E4FE9E00A6F107 /* Basic.fsh */; };
|
||||
4ADC51CD19E8C19A00186B36 /* MainMenu-Test.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC51C919E8BEB700186B36 /* MainMenu-Test.xib */; };
|
||||
4ADC51FE19E8CA4500186B36 /* cpu.S in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D9019568A570085CE5F /* cpu.S */; };
|
||||
4ADC51FF19E8CA4500186B36 /* prefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7719568A570085CE5F /* prefs.c */; };
|
||||
4ADC520019E8CA4500186B36 /* display.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6419568A570085CE5F /* display.c */; };
|
||||
@ -91,7 +120,6 @@
|
||||
4ADC520D19E8CA4500186B36 /* darwin-shim.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6019568A570085CE5F /* darwin-shim.c */; };
|
||||
4ADC520F19E8CA4500186B36 /* vectorUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0A919D72700004344E0 /* vectorUtil.c */; };
|
||||
4ADC521019E8CA4500186B36 /* debug.l in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7219568A570085CE5F /* debug.l */; };
|
||||
4ADC521119E8CA4500186B36 /* CPUTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 779DD854195BDB1700DF89E5 /* CPUTestAppDelegate.m */; };
|
||||
4ADC521319E8CA4500186B36 /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6519568A570085CE5F /* font.c */; };
|
||||
4ADC521419E8CA4500186B36 /* cpu-supp.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D5D19568A570085CE5F /* cpu-supp.c */; };
|
||||
4ADC521519E8CA4500186B36 /* vm.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D8D19568A570085CE5F /* vm.c */; };
|
||||
@ -99,7 +127,6 @@
|
||||
4ADC521719E8CA4500186B36 /* matrixUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0AF19D72700004344E0 /* matrixUtil.c */; };
|
||||
4ADC521819E8CA4500186B36 /* joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6C19568A570085CE5F /* joystick.c */; };
|
||||
4ADC521B19E8CA4500186B36 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 773B3D0F1956885A0085CE5F /* Cocoa.framework */; };
|
||||
4ADC521E19E8CA4500186B36 /* MainMenu-Test.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC51C919E8BEB700186B36 /* MainMenu-Test.xib */; };
|
||||
4ADC521F19E8CA4500186B36 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D181956885A0085CE5F /* InfoPlist.strings */; };
|
||||
4ADC522019E8CA4500186B36 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D271956885A0085CE5F /* Images.xcassets */; };
|
||||
4ADC522119E8CA4500186B36 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D1E1956885A0085CE5F /* Credits.rtf */; };
|
||||
@ -190,7 +217,6 @@
|
||||
779DD84B195BD9F900DF89E5 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D1E1956885A0085CE5F /* Credits.rtf */; };
|
||||
779DD852195BDA3000DF89E5 /* testcpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7E19568A570085CE5F /* testcpu.c */; };
|
||||
779DD853195BDA3400DF89E5 /* testcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7C19568A570085CE5F /* testcommon.c */; };
|
||||
779DD856195BDB1700DF89E5 /* CPUTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 779DD854195BDB1700DF89E5 /* CPUTestAppDelegate.m */; };
|
||||
779F561C19D7929100A6F107 /* glvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0C719D736EB004344E0 /* glvideo.c */; };
|
||||
779F562319DA59D600A6F107 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D241956885A0085CE5F /* MainMenu.xib */; };
|
||||
779F562919E4FE9E00A6F107 /* Basic.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 779F562719E4FE9E00A6F107 /* Basic.vsh */; };
|
||||
@ -201,7 +227,6 @@
|
||||
779F565B19EAF66E00A6F107 /* soundcore-openal.c in Sources */ = {isa = PBXBuildFile; fileRef = 779F564F19EAF66E00A6F107 /* soundcore-openal.c */; };
|
||||
779F565C19EAF66E00A6F107 /* soundcore.c in Sources */ = {isa = PBXBuildFile; fileRef = 779F565119EAF66E00A6F107 /* soundcore.c */; };
|
||||
779F565D19EAF66E00A6F107 /* speaker.c in Sources */ = {isa = PBXBuildFile; fileRef = 779F565319EAF66E00A6F107 /* speaker.c */; };
|
||||
779F566019EAF6D000A6F107 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 779F565F19EAF6D000A6F107 /* OpenAL.framework */; };
|
||||
779F566419EB0B9100A6F107 /* cpu.S in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D9019568A570085CE5F /* cpu.S */; };
|
||||
779F566519EB0B9100A6F107 /* prefs.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7719568A570085CE5F /* prefs.c */; };
|
||||
779F566619EB0B9100A6F107 /* display.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6419568A570085CE5F /* display.c */; };
|
||||
@ -220,17 +245,14 @@
|
||||
779F567319EB0B9100A6F107 /* darwin-shim.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6019568A570085CE5F /* darwin-shim.c */; };
|
||||
779F567519EB0B9100A6F107 /* vectorUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0A919D72700004344E0 /* vectorUtil.c */; };
|
||||
779F567619EB0B9100A6F107 /* debug.l in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D7219568A570085CE5F /* debug.l */; };
|
||||
779F567719EB0B9100A6F107 /* CPUTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 779DD854195BDB1700DF89E5 /* CPUTestAppDelegate.m */; };
|
||||
779F567919EB0B9100A6F107 /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6519568A570085CE5F /* font.c */; };
|
||||
779F567A19EB0B9100A6F107 /* cpu-supp.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D5D19568A570085CE5F /* cpu-supp.c */; };
|
||||
779F567B19EB0B9100A6F107 /* vm.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D8D19568A570085CE5F /* vm.c */; };
|
||||
779F567C19EB0B9100A6F107 /* darwin-glue.S in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D9119568A570085CE5F /* darwin-glue.S */; };
|
||||
779F567D19EB0B9100A6F107 /* matrixUtil.c in Sources */ = {isa = PBXBuildFile; fileRef = 77E1C0AF19D72700004344E0 /* matrixUtil.c */; };
|
||||
779F567E19EB0B9100A6F107 /* joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 773B3D6C19568A570085CE5F /* joystick.c */; };
|
||||
779F568019EB0B9100A6F107 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 779F565F19EAF6D000A6F107 /* OpenAL.framework */; };
|
||||
779F568219EB0B9100A6F107 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 773B3D0F1956885A0085CE5F /* Cocoa.framework */; };
|
||||
779F568619EB0B9100A6F107 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523419E8D3F600186B36 /* README */; };
|
||||
779F568719EB0B9100A6F107 /* MainMenu-Test.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC51C919E8BEB700186B36 /* MainMenu-Test.xib */; };
|
||||
779F568819EB0B9100A6F107 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D181956885A0085CE5F /* InfoPlist.strings */; };
|
||||
779F568919EB0B9100A6F107 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 773B3D271956885A0085CE5F /* Images.xcassets */; };
|
||||
779F568A19EB0B9100A6F107 /* speedtest.txt in Resources */ = {isa = PBXBuildFile; fileRef = 4ADC523619E8D3F600186B36 /* speedtest.txt */; };
|
||||
@ -264,7 +286,6 @@
|
||||
935C55201C12B64A0013166D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C551B1C12B6400013166D /* main.m */; };
|
||||
935C55351C12BA5F0013166D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 935C55331C12BA5F0013166D /* Main.storyboard */; };
|
||||
935C55371C12BA5F0013166D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 935C55361C12BA5F0013166D /* Assets.xcassets */; };
|
||||
935C55431C12BCFD0013166D /* Apple2iOS-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 935C55421C12BCFD0013166D /* Apple2iOS-Info.plist */; };
|
||||
935C55461C12BE110013166D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 935C55441C12BE110013166D /* LaunchScreen.xib */; };
|
||||
935C554D1C12BE510013166D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C55481C12BE510013166D /* AppDelegate.m */; };
|
||||
935C554E1C12BE510013166D /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 935C554A1C12BE510013166D /* EAGLView.m */; };
|
||||
@ -324,6 +345,34 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
4AA2D7ED1D202C430054A5FF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 77C279601A1047AE000FE33F /* DDHidLib.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 55193E4F0B93F2EE004C0C98;
|
||||
remoteInfo = DDHidLib;
|
||||
};
|
||||
4AA2D7EF1D202C5D0054A5FF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 77C279601A1047AE000FE33F /* DDHidLib.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 55193E4F0B93F2EE004C0C98;
|
||||
remoteInfo = DDHidLib;
|
||||
};
|
||||
4AA2D7F41D202C950054A5FF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 77C279601A1047AE000FE33F /* DDHidLib.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 55193E4F0B93F2EE004C0C98;
|
||||
remoteInfo = DDHidLib;
|
||||
};
|
||||
4AA2D7F71D202CAD0054A5FF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 77C279601A1047AE000FE33F /* DDHidLib.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 55193E4F0B93F2EE004C0C98;
|
||||
remoteInfo = DDHidLib;
|
||||
};
|
||||
77C279681A1047AF000FE33F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 77C279601A1047AE000FE33F /* DDHidLib.xcodeproj */;
|
||||
@ -392,13 +441,14 @@
|
||||
/* Begin PBXFileReference section */
|
||||
4A2636F819FDEDB700DBFB00 /* Apple2Mac.help */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Apple2Mac.help; sourceTree = "<group>"; };
|
||||
4A61119B1A6A1DE60035F7DE /* blank.po.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = blank.po.gz; sourceTree = "<group>"; };
|
||||
4A73BE2E1CCBE21A0041C573 /* memmngt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memmngt.c; sourceTree = "<group>"; };
|
||||
4A7EDC911AE092680072E98A /* glhudmodel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = glhudmodel.c; sourceTree = "<group>"; };
|
||||
4A7EDC921AE092680072E98A /* glnode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = glnode.c; sourceTree = "<group>"; };
|
||||
4A7EDC9D1AE092B80072E98A /* interface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = interface.c; sourceTree = "<group>"; };
|
||||
4AA2D7FE1D2038380054A5FF /* testprefs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testprefs.c; sourceTree = "<group>"; };
|
||||
4AD4FEC31A52464F00F958EC /* Apple2MacTestDisk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Apple2MacTestDisk.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4AD4FEC41A52464F00F958EC /* Apple2MacTestDisk-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Apple2MacTestDisk-Info.plist"; path = "Apple2MacTests/Apple2MacTestDisk-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
4AD4FEC91A52467D00F958EC /* testdisk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdisk.c; sourceTree = "<group>"; };
|
||||
4ADC51CA19E8BEB700186B36 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Base.lproj/MainMenu-Test.xib"; sourceTree = "<group>"; };
|
||||
4ADC522719E8CA4500186B36 /* Apple2MacTestVM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Apple2MacTestVM.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4ADC522819E8CA4500186B36 /* Apple2MacTestVM-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Apple2MacTestVM-Info.plist"; path = "Apple2MacTests/Apple2MacTestVM-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
4ADC523019E8D3F600186B36 /* blank.dsk.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = blank.dsk.gz; sourceTree = "<group>"; };
|
||||
@ -418,7 +468,6 @@
|
||||
4E4356E31C386AC500B71328 /* interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = interface.h; sourceTree = "<group>"; };
|
||||
4E4356E41C386AC500B71328 /* memmngt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memmngt.h; sourceTree = "<group>"; };
|
||||
4E4585F91C29F2B9003E74A1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4E4585FF1C29F393003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = "fr.lproj/MainMenu-Test.strings"; sourceTree = "<group>"; };
|
||||
4E4586001C29F399003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = fr; path = fr.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||
4E4586011C29F399003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
4E4586021C29F399003E74A1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = fr.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
@ -499,8 +548,6 @@
|
||||
779DD826195764E200DF89E5 /* rom-shim.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "rom-shim.c"; sourceTree = "<group>"; };
|
||||
779DD850195BD9F900DF89E5 /* Apple2MacTestCPU.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Apple2MacTestCPU.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
779DD851195BD9F900DF89E5 /* Apple2MacTestCPU-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Apple2MacTestCPU-Info.plist"; path = "Apple2MacTests/Apple2MacTestCPU-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
779DD854195BDB1700DF89E5 /* CPUTestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPUTestAppDelegate.m; sourceTree = "<group>"; };
|
||||
779DD855195BDB1700DF89E5 /* CPUTestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPUTestAppDelegate.h; sourceTree = "<group>"; };
|
||||
779F562719E4FE9E00A6F107 /* Basic.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = Basic.vsh; sourceTree = "<group>"; };
|
||||
779F562819E4FE9E00A6F107 /* Basic.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = Basic.fsh; sourceTree = "<group>"; };
|
||||
779F564719EAF66E00A6F107 /* alhelpers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = alhelpers.c; sourceTree = "<group>"; };
|
||||
@ -532,6 +579,7 @@
|
||||
77E1C0B119D72700004344E0 /* imageUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imageUtil.h; path = video_util/imageUtil.h; sourceTree = "<group>"; };
|
||||
77E1C0B219D72700004344E0 /* glUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glUtil.h; path = video_util/glUtil.h; sourceTree = "<group>"; };
|
||||
77E1C0C719D736EB004344E0 /* glvideo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = glvideo.c; sourceTree = "<group>"; };
|
||||
77FA92931C72D93D0090755C /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
93206C771C14E14000668153 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Apple2iOS.strings; sourceTree = "<group>"; };
|
||||
93206C831C156BD300668153 /* A2IXPopupChoreographer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = A2IXPopupChoreographer.h; path = Classes/iOS/A2IXPopupChoreographer.h; sourceTree = SOURCE_ROOT; };
|
||||
93206C841C156BD300668153 /* A2IXPopupChoreographer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = A2IXPopupChoreographer.m; path = Classes/iOS/A2IXPopupChoreographer.m; sourceTree = SOURCE_ROOT; };
|
||||
@ -593,7 +641,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4AD4FEB01A52464F00F958EC /* OpenAL.framework in Frameworks */,
|
||||
4AA2D7FC1D20309C0054A5FF /* libz.tbd in Frameworks */,
|
||||
4AA2D7F31D202C900054A5FF /* DDHidLib.framework in Frameworks */,
|
||||
4AD4FEB21A52464F00F958EC /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -602,7 +651,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
779F566019EAF6D000A6F107 /* OpenAL.framework in Frameworks */,
|
||||
4AA2D7F91D202CE60054A5FF /* libz.tbd in Frameworks */,
|
||||
4AA2D7F11D202C810054A5FF /* DDHidLib.framework in Frameworks */,
|
||||
4ADC521B19E8CA4500186B36 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -628,6 +678,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4AA2D7FA1D202FF10054A5FF /* libz.tbd in Frameworks */,
|
||||
4AA2D7F61D202CA70054A5FF /* DDHidLib.framework in Frameworks */,
|
||||
779DD846195BD9F900DF89E5 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -636,7 +688,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
779F568019EB0B9100A6F107 /* OpenAL.framework in Frameworks */,
|
||||
4AA2D7FD1D20367D0054A5FF /* libz.tbd in Frameworks */,
|
||||
4AA2D7F21D202C890054A5FF /* DDHidLib.framework in Frameworks */,
|
||||
779F568219EB0B9100A6F107 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -733,6 +786,7 @@
|
||||
773B3D0E1956885A0085CE5F /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
77FA92931C72D93D0090755C /* libz.tbd */,
|
||||
4EB4F8561C393F0E0072A15C /* OpenAL.framework */,
|
||||
4ECFC3BE1C368ED3008E2633 /* GameController.framework */,
|
||||
77C279601A1047AE000FE33F /* DDHidLib.xcodeproj */,
|
||||
@ -762,7 +816,6 @@
|
||||
773B3D181956885A0085CE5F /* InfoPlist.strings */,
|
||||
773B3D271956885A0085CE5F /* Images.xcassets */,
|
||||
773B3D241956885A0085CE5F /* MainMenu.xib */,
|
||||
4ADC51C919E8BEB700186B36 /* MainMenu-Test.xib */,
|
||||
);
|
||||
path = Apple2Mac;
|
||||
sourceTree = "<group>";
|
||||
@ -770,8 +823,6 @@
|
||||
773B3D331956885A0085CE5F /* Apple2MacTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
779DD854195BDB1700DF89E5 /* CPUTestAppDelegate.m */,
|
||||
779DD855195BDB1700DF89E5 /* CPUTestAppDelegate.h */,
|
||||
773B3D341956885A0085CE5F /* Supporting Files */,
|
||||
);
|
||||
path = Apple2MacTests;
|
||||
@ -802,8 +853,6 @@
|
||||
773B3D4519568A570085CE5F /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4E4356E31C386AC500B71328 /* interface.h */,
|
||||
4E4356E41C386AC500B71328 /* memmngt.h */,
|
||||
935C55781C136F550013166D /* arm */,
|
||||
779F564619EAF66E00A6F107 /* audio */,
|
||||
773B3D5C19568A570085CE5F /* common.h */,
|
||||
@ -817,6 +866,7 @@
|
||||
773B3D6419568A570085CE5F /* display.c */,
|
||||
773B3D6519568A570085CE5F /* font.c */,
|
||||
773B3D6919568A570085CE5F /* glue.h */,
|
||||
4E4356E31C386AC500B71328 /* interface.h */,
|
||||
4A7EDC9D1AE092B80072E98A /* interface.c */,
|
||||
773B3D6D19568A570085CE5F /* joystick.h */,
|
||||
773B3D6C19568A570085CE5F /* joystick.c */,
|
||||
@ -824,6 +874,8 @@
|
||||
935C55701C136E6F0013166D /* json_parse.c */,
|
||||
773B3D6F19568A570085CE5F /* keys.h */,
|
||||
773B3D6E19568A570085CE5F /* keys.c */,
|
||||
4E4356E41C386AC500B71328 /* memmngt.h */,
|
||||
4A73BE2E1CCBE21A0041C573 /* memmngt.c */,
|
||||
773B3D7019568A570085CE5F /* meta */,
|
||||
773B3D7619568A570085CE5F /* misc.h */,
|
||||
773B3D7519568A570085CE5F /* misc.c */,
|
||||
@ -859,6 +911,7 @@
|
||||
773B3D7919568A570085CE5F /* test */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4AA2D7FE1D2038380054A5FF /* testprefs.c */,
|
||||
773B3D7A19568A570085CE5F /* greatest.h */,
|
||||
935C55771C136F260013166D /* sha1.h */,
|
||||
4AFC17091AAE9C3200B215FA /* sha1.c */,
|
||||
@ -1066,6 +1119,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4AA2D7F51D202C950054A5FF /* PBXTargetDependency */,
|
||||
);
|
||||
name = Apple2MacTestDisk;
|
||||
productName = Apple2Mac;
|
||||
@ -1085,6 +1139,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4AA2D7EE1D202C430054A5FF /* PBXTargetDependency */,
|
||||
);
|
||||
name = Apple2MacTestVM;
|
||||
productName = Apple2Mac;
|
||||
@ -1142,6 +1197,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4AA2D7F81D202CAD0054A5FF /* PBXTargetDependency */,
|
||||
);
|
||||
name = Apple2MacTestCPU;
|
||||
productName = Apple2Mac;
|
||||
@ -1161,6 +1217,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4AA2D7F01D202C5D0054A5FF /* PBXTargetDependency */,
|
||||
);
|
||||
name = Apple2MacTestDisplay;
|
||||
productName = Apple2Mac;
|
||||
@ -1193,7 +1250,7 @@
|
||||
773B3D04195688590085CE5F /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0510;
|
||||
LastUpgradeCheck = 0730;
|
||||
ORGANIZATIONNAME = deadc0de.org;
|
||||
TargetAttributes = {
|
||||
4ECFC3A91C368EAB008E2633 = {
|
||||
@ -1282,10 +1339,9 @@
|
||||
4AD4FEB51A52464F00F958EC /* blank.dsk.gz in Resources */,
|
||||
4AD4FEB61A52464F00F958EC /* blank.nib.gz in Resources */,
|
||||
4AD4FEB71A52464F00F958EC /* testvm1.dsk.gz in Resources */,
|
||||
4AD4FED21A524BED00F958EC /* Apple2MacTestDisk-Info.plist in Resources */,
|
||||
4AD4FEB81A52464F00F958EC /* README in Resources */,
|
||||
4AFC17161AAE9CC000B215FA /* testvm1.nib.gz in Resources */,
|
||||
4AD4FEB91A52464F00F958EC /* MainMenu-Test.xib in Resources */,
|
||||
4AA2D7E21D1F559E0054A5FF /* MainMenu.xib in Resources */,
|
||||
4AD4FEBA1A52464F00F958EC /* InfoPlist.strings in Resources */,
|
||||
4AD4FEBB1A52464F00F958EC /* Images.xcassets in Resources */,
|
||||
4A61119D1A6A1DE60035F7DE /* blank.po.gz in Resources */,
|
||||
@ -1304,7 +1360,7 @@
|
||||
77EB316D1A27A9AF00DC5A8A /* blank.nib.gz in Resources */,
|
||||
4ADC525319E8D3F600186B36 /* testvm1.dsk.gz in Resources */,
|
||||
4ADC524719E8D3F600186B36 /* README in Resources */,
|
||||
4ADC521E19E8CA4500186B36 /* MainMenu-Test.xib in Resources */,
|
||||
4AA2D7E41D1F559F0054A5FF /* MainMenu.xib in Resources */,
|
||||
4ADC521F19E8CA4500186B36 /* InfoPlist.strings in Resources */,
|
||||
4ADC522019E8CA4500186B36 /* Images.xcassets in Resources */,
|
||||
4ADC524D19E8D3F600186B36 /* speedtest.txt in Resources */,
|
||||
@ -1349,13 +1405,13 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4ADC524619E8D3F600186B36 /* README in Resources */,
|
||||
4ADC51CD19E8C19A00186B36 /* MainMenu-Test.xib in Resources */,
|
||||
779DD849195BD9F900DF89E5 /* InfoPlist.strings in Resources */,
|
||||
779DD84A195BD9F900DF89E5 /* Images.xcassets in Resources */,
|
||||
4ADC524C19E8D3F600186B36 /* speedtest.txt in Resources */,
|
||||
779DD84B195BD9F900DF89E5 /* Credits.rtf in Resources */,
|
||||
4ADC51C719E8BD5800186B36 /* Basic.vsh in Resources */,
|
||||
4ADC51C819E8BD5A00186B36 /* Basic.fsh in Resources */,
|
||||
4AA2D7FB1D20301F0054A5FF /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1366,7 +1422,6 @@
|
||||
779F569419EB10A100A6F107 /* testdisplay1.dsk.gz in Resources */,
|
||||
779F568619EB0B9100A6F107 /* README in Resources */,
|
||||
4AFC17131AAE9CC000B215FA /* testdisplay1.nib.gz in Resources */,
|
||||
779F568719EB0B9100A6F107 /* MainMenu-Test.xib in Resources */,
|
||||
4AFC17171AAE9CC000B215FA /* testvm1.nib.gz in Resources */,
|
||||
779F568819EB0B9100A6F107 /* InfoPlist.strings in Resources */,
|
||||
779F568919EB0B9100A6F107 /* Images.xcassets in Resources */,
|
||||
@ -1374,6 +1429,7 @@
|
||||
779F568B19EB0B9100A6F107 /* Credits.rtf in Resources */,
|
||||
779F568C19EB0B9100A6F107 /* Basic.vsh in Resources */,
|
||||
779F568D19EB0B9100A6F107 /* Basic.fsh in Resources */,
|
||||
4AA2D7E31D1F559E0054A5FF /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1384,7 +1440,6 @@
|
||||
939C95A21C3B8E2100263E41 /* SolidColor.vsh in Resources */,
|
||||
935C55371C12BA5F0013166D /* Assets.xcassets in Resources */,
|
||||
939C959F1C3B8E2100263E41 /* SolidColor.fsh in Resources */,
|
||||
935C55431C12BCFD0013166D /* Apple2iOS-Info.plist in Resources */,
|
||||
935C55461C12BE110013166D /* LaunchScreen.xib in Resources */,
|
||||
935C55351C12BA5F0013166D /* Main.storyboard in Resources */,
|
||||
4ECFC3A01C368620008E2633 /* NSCT.dsk in Resources */,
|
||||
@ -1580,27 +1635,31 @@
|
||||
4AD4FE941A52464F00F958EC /* cpu.S in Sources */,
|
||||
4AD4FE951A52464F00F958EC /* prefs.c in Sources */,
|
||||
4AD4FE961A52464F00F958EC /* display.c in Sources */,
|
||||
4AA2D7E51D202A5B0054A5FF /* EmulatorGLView.m in Sources */,
|
||||
4AD4FE971A52464F00F958EC /* disk.c in Sources */,
|
||||
4AFC170C1AAE9C3200B215FA /* sha1.c in Sources */,
|
||||
4AD4FE981A52464F00F958EC /* sourceUtil.c in Sources */,
|
||||
4AD4FE991A52464F00F958EC /* modelUtil.c in Sources */,
|
||||
4AD4FE9A1A52464F00F958EC /* debugger.c in Sources */,
|
||||
4AD4FE9B1A52464F00F958EC /* keys.c in Sources */,
|
||||
4AA2D7DB1D1E23F50054A5FF /* jsmn.c in Sources */,
|
||||
4AD4FE9C1A52464F00F958EC /* timing.c in Sources */,
|
||||
4AD4FE9D1A52464F00F958EC /* testcommon.c in Sources */,
|
||||
4AD4FE9E1A52464F00F958EC /* misc.c in Sources */,
|
||||
4AD4FE9F1A52464F00F958EC /* opcodes.c in Sources */,
|
||||
935C551F1C12B6460013166D /* main.m in Sources */,
|
||||
4A7EDCA01AE092B80072E98A /* interface.c in Sources */,
|
||||
4A73BE311CCBE22B0041C573 /* memmngt.c in Sources */,
|
||||
4AD4FEA01A52464F00F958EC /* glvideo.c in Sources */,
|
||||
4AD4FEA11A52464F00F958EC /* rom-shim.c in Sources */,
|
||||
4AD4FEA21A52464F00F958EC /* zlib-helpers.c in Sources */,
|
||||
4AD4FEA31A52464F00F958EC /* darwin-shim.c in Sources */,
|
||||
4A7EDC9A1AE092680072E98A /* glnode.c in Sources */,
|
||||
4AD4FECB1A52468700F958EC /* testdisk.c in Sources */,
|
||||
4AA2D7DF1D1E24130054A5FF /* json_parse.c in Sources */,
|
||||
4AD4FEA51A52464F00F958EC /* vectorUtil.c in Sources */,
|
||||
4AD4FEA61A52464F00F958EC /* debug.l in Sources */,
|
||||
4AD4FEA71A52464F00F958EC /* CPUTestAppDelegate.m in Sources */,
|
||||
4AA2D7E81D202BEA0054A5FF /* EmulatorJoystickController.m in Sources */,
|
||||
4AD4FEA91A52464F00F958EC /* font.c in Sources */,
|
||||
4AD4FEAA1A52464F00F958EC /* cpu-supp.c in Sources */,
|
||||
4AD4FEAB1A52464F00F958EC /* vm.c in Sources */,
|
||||
@ -1618,27 +1677,31 @@
|
||||
4ADC51FE19E8CA4500186B36 /* cpu.S in Sources */,
|
||||
4ADC51FF19E8CA4500186B36 /* prefs.c in Sources */,
|
||||
4ADC520019E8CA4500186B36 /* display.c in Sources */,
|
||||
4AA2D7E61D202A5C0054A5FF /* EmulatorGLView.m in Sources */,
|
||||
4ADC520119E8CA4500186B36 /* disk.c in Sources */,
|
||||
4AFC170E1AAE9C3200B215FA /* sha1.c in Sources */,
|
||||
4ADC520219E8CA4500186B36 /* sourceUtil.c in Sources */,
|
||||
4ADC520319E8CA4500186B36 /* modelUtil.c in Sources */,
|
||||
4ADC520419E8CA4500186B36 /* debugger.c in Sources */,
|
||||
4ADC520519E8CA4500186B36 /* keys.c in Sources */,
|
||||
4AA2D7DD1D1E23F60054A5FF /* jsmn.c in Sources */,
|
||||
4ADC520619E8CA4500186B36 /* timing.c in Sources */,
|
||||
4ADC520719E8CA4500186B36 /* testcommon.c in Sources */,
|
||||
4ADC520819E8CA4500186B36 /* misc.c in Sources */,
|
||||
4ADC520919E8CA4500186B36 /* opcodes.c in Sources */,
|
||||
935C551D1C12B6450013166D /* main.m in Sources */,
|
||||
4A7EDCA21AE092B80072E98A /* interface.c in Sources */,
|
||||
4A73BE331CCBE22C0041C573 /* memmngt.c in Sources */,
|
||||
4ADC520A19E8CA4500186B36 /* glvideo.c in Sources */,
|
||||
4ADC520B19E8CA4500186B36 /* rom-shim.c in Sources */,
|
||||
4ADC520C19E8CA4500186B36 /* zlib-helpers.c in Sources */,
|
||||
4ADC520D19E8CA4500186B36 /* darwin-shim.c in Sources */,
|
||||
4A7EDC9C1AE092680072E98A /* glnode.c in Sources */,
|
||||
4ADC520F19E8CA4500186B36 /* vectorUtil.c in Sources */,
|
||||
4AA2D7E11D1E24140054A5FF /* json_parse.c in Sources */,
|
||||
4ADC521019E8CA4500186B36 /* debug.l in Sources */,
|
||||
4ADC521119E8CA4500186B36 /* CPUTestAppDelegate.m in Sources */,
|
||||
4ADC522919E8CEAD00186B36 /* testvm.c in Sources */,
|
||||
4AA2D7EA1D202BEC0054A5FF /* EmulatorJoystickController.m in Sources */,
|
||||
4ADC521319E8CA4500186B36 /* font.c in Sources */,
|
||||
4ADC521419E8CA4500186B36 /* cpu-supp.c in Sources */,
|
||||
4ADC521519E8CA4500186B36 /* vm.c in Sources */,
|
||||
@ -1678,6 +1741,7 @@
|
||||
77E1C0B319D72700004344E0 /* vectorUtil.c in Sources */,
|
||||
4A7EDC9E1AE092B80072E98A /* interface.c in Sources */,
|
||||
773B3DAB19568A570085CE5F /* keys.c in Sources */,
|
||||
4A73BE2F1CCBE21B0041C573 /* memmngt.c in Sources */,
|
||||
773B3DBC19568A570085CE5F /* timing.c in Sources */,
|
||||
773BC91A19F31E7B00996893 /* prefs.c in Sources */,
|
||||
77E1C0B619D72700004344E0 /* matrixUtil.c in Sources */,
|
||||
@ -1720,26 +1784,30 @@
|
||||
779DD82F195BD9F900DF89E5 /* cpu.S in Sources */,
|
||||
779DD830195BD9F900DF89E5 /* prefs.c in Sources */,
|
||||
779DD831195BD9F900DF89E5 /* display.c in Sources */,
|
||||
4AA2D7EC1D202BFA0054A5FF /* EmulatorGLView.m in Sources */,
|
||||
779DD832195BD9F900DF89E5 /* disk.c in Sources */,
|
||||
4AFC170B1AAE9C3200B215FA /* sha1.c in Sources */,
|
||||
4ADC51C319E8BD3A00186B36 /* sourceUtil.c in Sources */,
|
||||
4ADC51C419E8BD3D00186B36 /* modelUtil.c in Sources */,
|
||||
779DD833195BD9F900DF89E5 /* debugger.c in Sources */,
|
||||
4AA2D7EB1D202BED0054A5FF /* EmulatorJoystickController.m in Sources */,
|
||||
779DD834195BD9F900DF89E5 /* keys.c in Sources */,
|
||||
4AA2D7D61D1E23F40054A5FF /* jsmn.c in Sources */,
|
||||
779DD835195BD9F900DF89E5 /* timing.c in Sources */,
|
||||
779DD853195BDA3400DF89E5 /* testcommon.c in Sources */,
|
||||
779DD836195BD9F900DF89E5 /* misc.c in Sources */,
|
||||
779DD837195BD9F900DF89E5 /* opcodes.c in Sources */,
|
||||
935C55201C12B64A0013166D /* main.m in Sources */,
|
||||
4A7EDC9F1AE092B80072E98A /* interface.c in Sources */,
|
||||
4A73BE301CCBE22A0041C573 /* memmngt.c in Sources */,
|
||||
4ADC51C619E8BD5200186B36 /* glvideo.c in Sources */,
|
||||
779DD838195BD9F900DF89E5 /* rom-shim.c in Sources */,
|
||||
779DD839195BD9F900DF89E5 /* zlib-helpers.c in Sources */,
|
||||
779DD83A195BD9F900DF89E5 /* darwin-shim.c in Sources */,
|
||||
4A7EDC991AE092680072E98A /* glnode.c in Sources */,
|
||||
4ADC51C219E8BD3700186B36 /* vectorUtil.c in Sources */,
|
||||
4AA2D7DE1D1E24120054A5FF /* json_parse.c in Sources */,
|
||||
779DD83C195BD9F900DF89E5 /* debug.l in Sources */,
|
||||
779DD856195BDB1700DF89E5 /* CPUTestAppDelegate.m in Sources */,
|
||||
779DD852195BDA3000DF89E5 /* testcpu.c in Sources */,
|
||||
779DD83D195BD9F900DF89E5 /* font.c in Sources */,
|
||||
779DD83E195BD9F900DF89E5 /* cpu-supp.c in Sources */,
|
||||
@ -1758,27 +1826,31 @@
|
||||
779F566419EB0B9100A6F107 /* cpu.S in Sources */,
|
||||
779F566519EB0B9100A6F107 /* prefs.c in Sources */,
|
||||
779F566619EB0B9100A6F107 /* display.c in Sources */,
|
||||
4AA2D7E71D202A5D0054A5FF /* EmulatorGLView.m in Sources */,
|
||||
779F566719EB0B9100A6F107 /* disk.c in Sources */,
|
||||
4AFC170D1AAE9C3200B215FA /* sha1.c in Sources */,
|
||||
779F569319EB0D1E00A6F107 /* testdisplay.c in Sources */,
|
||||
779F566819EB0B9100A6F107 /* sourceUtil.c in Sources */,
|
||||
779F566919EB0B9100A6F107 /* modelUtil.c in Sources */,
|
||||
779F566A19EB0B9100A6F107 /* debugger.c in Sources */,
|
||||
4AA2D7DC1D1E23F60054A5FF /* jsmn.c in Sources */,
|
||||
779F566B19EB0B9100A6F107 /* keys.c in Sources */,
|
||||
779F566C19EB0B9100A6F107 /* timing.c in Sources */,
|
||||
779F566D19EB0B9100A6F107 /* testcommon.c in Sources */,
|
||||
779F566E19EB0B9100A6F107 /* misc.c in Sources */,
|
||||
935C551E1C12B6450013166D /* main.m in Sources */,
|
||||
4A7EDCA11AE092B80072E98A /* interface.c in Sources */,
|
||||
4A73BE321CCBE22C0041C573 /* memmngt.c in Sources */,
|
||||
779F566F19EB0B9100A6F107 /* opcodes.c in Sources */,
|
||||
779F567019EB0B9100A6F107 /* glvideo.c in Sources */,
|
||||
779F567119EB0B9100A6F107 /* rom-shim.c in Sources */,
|
||||
779F567219EB0B9100A6F107 /* zlib-helpers.c in Sources */,
|
||||
4A7EDC9B1AE092680072E98A /* glnode.c in Sources */,
|
||||
779F567319EB0B9100A6F107 /* darwin-shim.c in Sources */,
|
||||
4AA2D7E01D1E24130054A5FF /* json_parse.c in Sources */,
|
||||
779F567519EB0B9100A6F107 /* vectorUtil.c in Sources */,
|
||||
779F567619EB0B9100A6F107 /* debug.l in Sources */,
|
||||
779F567719EB0B9100A6F107 /* CPUTestAppDelegate.m in Sources */,
|
||||
4AA2D7E91D202BEB0054A5FF /* EmulatorJoystickController.m in Sources */,
|
||||
779F567919EB0B9100A6F107 /* font.c in Sources */,
|
||||
779F567A19EB0B9100A6F107 /* cpu-supp.c in Sources */,
|
||||
779F567B19EB0B9100A6F107 /* vm.c in Sources */,
|
||||
@ -1808,6 +1880,7 @@
|
||||
935C55641C136E070013166D /* rom-shim.c in Sources */,
|
||||
935C55651C136E070013166D /* timing.c in Sources */,
|
||||
935C55661C136E070013166D /* glalert.c in Sources */,
|
||||
4A73BE341CCBE22E0041C573 /* memmngt.c in Sources */,
|
||||
935C55A91C1389370013166D /* jsmn.c in Sources */,
|
||||
935C55671C136E070013166D /* glhudmodel.c in Sources */,
|
||||
935C55681C136E070013166D /* glnode.c in Sources */,
|
||||
@ -1846,6 +1919,26 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
4AA2D7EE1D202C430054A5FF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = DDHidLib;
|
||||
targetProxy = 4AA2D7ED1D202C430054A5FF /* PBXContainerItemProxy */;
|
||||
};
|
||||
4AA2D7F01D202C5D0054A5FF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = DDHidLib;
|
||||
targetProxy = 4AA2D7EF1D202C5D0054A5FF /* PBXContainerItemProxy */;
|
||||
};
|
||||
4AA2D7F51D202C950054A5FF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = DDHidLib;
|
||||
targetProxy = 4AA2D7F41D202C950054A5FF /* PBXContainerItemProxy */;
|
||||
};
|
||||
4AA2D7F81D202CAD0054A5FF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = DDHidLib;
|
||||
targetProxy = 4AA2D7F71D202CAD0054A5FF /* PBXContainerItemProxy */;
|
||||
};
|
||||
77C279721A1047E7000FE33F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = DDHidLib;
|
||||
@ -1854,15 +1947,6 @@
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
4ADC51C919E8BEB700186B36 /* MainMenu-Test.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4ADC51CA19E8BEB700186B36 /* Base */,
|
||||
4E4585FF1C29F393003E74A1 /* fr */,
|
||||
);
|
||||
name = "MainMenu-Test.xib";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4ECFC3B51C368EAB008E2633 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
@ -1957,12 +2041,14 @@
|
||||
"CPU_TRACING=1",
|
||||
"DISK_TRACING=1",
|
||||
"VM_TRACING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Apple2MacTests/Apple2MacTestDisk-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestDisk;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -1986,12 +2072,14 @@
|
||||
"TEST_VM=1",
|
||||
"TESTING=1",
|
||||
"CPU_TRACING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Apple2MacTests/Apple2MacTestDisk-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestDisk;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2016,12 +2104,14 @@
|
||||
"CPU_TRACING=1",
|
||||
"DISK_TRACING=1",
|
||||
"VM_TRACING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Apple2MacTests/Apple2MacTestVM-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestVM;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2045,12 +2135,14 @@
|
||||
"TEST_VM=1",
|
||||
"TESTING=1",
|
||||
"CPU_TRACING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Apple2MacTests/Apple2MacTestVM-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestVM;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2115,6 +2207,7 @@
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
@ -2172,7 +2265,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
@ -2192,7 +2284,7 @@
|
||||
INFOPLIST_FILE = "Apple2Mac/Apple2Mac-Info.plist";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
||||
OTHER_LDFLAGS = "-lz";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = bxo.Apple2Mac;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.deadc0de.Apple2Mac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2203,7 +2295,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
@ -2224,7 +2315,7 @@
|
||||
INFOPLIST_FILE = "Apple2Mac/Apple2Mac-Info.plist";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
||||
OTHER_LDFLAGS = "-lz";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = bxo.Apple2Mac;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.deadc0de.Apple2Mac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2246,12 +2337,14 @@
|
||||
"KEYPAD_JOYSTICK=1",
|
||||
"TEST_CPU=1",
|
||||
"TESTING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "Apple2MacTests/Apple2MacTestCPU-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestCPU;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2274,12 +2367,14 @@
|
||||
"KEYPAD_JOYSTICK=1",
|
||||
"TEST_CPU=1",
|
||||
"TESTING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "Apple2MacTests/Apple2MacTestCPU-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestCPU;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2304,12 +2399,14 @@
|
||||
"CPU_TRACING=1",
|
||||
"DISK_TRACING=1",
|
||||
"VM_TRACING=1",
|
||||
"VIDEO_OPENGL=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Apple2MacTests/Apple2MacTestDisplay-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestDisplay;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2339,6 +2436,7 @@
|
||||
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Apple2MacTests/Apple2MacTestDisplay-Info.plist";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.deadc0de.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Apple2MacTestDisplay;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@ -2349,7 +2447,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
ARCHS = armv7;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
@ -2387,7 +2484,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
ARCHS = armv7;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
|
@ -21,7 +21,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.1</string>
|
||||
<string>0.9.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
@ -80,9 +80,9 @@
|
||||
{
|
||||
cpu_pause();
|
||||
timing_toggleCPUSpeed();
|
||||
if (video_backend && video_backend->animation_showCPUSpeed)
|
||||
if (video_animations && video_animations->animation_showCPUSpeed)
|
||||
{
|
||||
video_backend->animation_showCPUSpeed();
|
||||
video_animations->animation_showCPUSpeed();
|
||||
}
|
||||
cpu_resume();
|
||||
}
|
||||
@ -108,9 +108,9 @@
|
||||
{
|
||||
cpu_resume();
|
||||
}
|
||||
if (video_backend && video_backend->animation_showPaused)
|
||||
if (video_animations && video_animations->animation_showPaused)
|
||||
{
|
||||
video_backend->animation_showPaused();
|
||||
video_animations->animation_showPaused();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment version="1060" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="3zY-RA-n0f" id="Tyx-8E-lAx"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customObject id="3zY-RA-n0f" userLabel="App Delegate" customClass="CPUTestAppDelegate">
|
||||
<connections>
|
||||
<outlet property="window" destination="HyN-la-Rec" id="PzJ-8q-2Yu"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<menu title="AMainMenu" systemMenu="main" id="29">
|
||||
<items>
|
||||
<menuItem title="Apple2Mac" id="56">
|
||||
<menu key="submenu" title="Apple2Mac" systemMenu="apple" id="57">
|
||||
<items>
|
||||
<menuItem title="About Apple2Mac" id="58">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="236">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="129"/>
|
||||
<menuItem isSeparatorItem="YES" id="143">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Services" id="131">
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="130"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="144">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Apple2Mac" keyEquivalent="h" id="134">
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="367"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="145">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="368"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="150">
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="370"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="149">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Quit Apple2Mac" keyEquivalent="q" id="136">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-3" id="449"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="490">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="491">
|
||||
<items>
|
||||
<menuItem title="Apple2Mac Help" keyEquivalent="?" id="492" userLabel="Menu Item - Apple2Mac Help">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="493"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="HyN-la-Rec">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1178"/>
|
||||
<view key="contentView" id="6V4-fW-Bkm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</view>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
@ -1,45 +0,0 @@
|
||||
|
||||
/* Class = "NSMenu"; title = "AMainMenu"; ObjectID = "29"; */
|
||||
"29.title" = "AMainMenu";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Apple2Mac"; ObjectID = "56"; */
|
||||
"56.title" = "Apple2Mac";
|
||||
|
||||
/* Class = "NSMenu"; title = "Apple2Mac"; ObjectID = "57"; */
|
||||
"57.title" = "Apple2Mac";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "About Apple2Mac"; ObjectID = "58"; */
|
||||
"58.title" = "About Apple2Mac";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Preferences…"; ObjectID = "129"; */
|
||||
"129.title" = "Preferences…";
|
||||
|
||||
/* Class = "NSMenu"; title = "Services"; ObjectID = "130"; */
|
||||
"130.title" = "Services";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Services"; ObjectID = "131"; */
|
||||
"131.title" = "Services";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Hide Apple2Mac"; ObjectID = "134"; */
|
||||
"134.title" = "Hide Apple2Mac";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Quit Apple2Mac"; ObjectID = "136"; */
|
||||
"136.title" = "Quit Apple2Mac";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "145"; */
|
||||
"145.title" = "Hide Others";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "150"; */
|
||||
"150.title" = "Show All";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Help"; ObjectID = "490"; */
|
||||
"490.title" = "Help";
|
||||
|
||||
/* Class = "NSMenu"; title = "Help"; ObjectID = "491"; */
|
||||
"491.title" = "Help";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Apple2Mac Help"; ObjectID = "492"; */
|
||||
"492.title" = "Apple2Mac Help";
|
||||
|
||||
/* Class = "NSWindow"; title = "Window"; ObjectID = "HyN-la-Rec"; */
|
||||
"HyN-la-Rec.title" = "Window";
|
@ -77,7 +77,7 @@
|
||||
mode = COLOR_NONE;
|
||||
}
|
||||
//[self.videoModePicker d:mode];
|
||||
color_mode = (color_mode_t)mode;
|
||||
//color_mode = (color_mode_t)mode;
|
||||
|
||||
mode = [defaults integerForKey:kApple2JoystickConfig];
|
||||
if (! ((mode >= JOY_PCJOY) && (mode < NUM_JOYOPTS)) )
|
||||
@ -148,7 +148,7 @@
|
||||
[defaults setDouble:cpu_altscale_factor forKey:kApple2AltSpeed];
|
||||
// [defaults setBool:([self.cpuMaxChoice state] == NSOnState) forKey:kApple2CPUSpeedIsMax];
|
||||
// [defaults setBool:([self.altMaxChoice state] == NSOnState) forKey:kApple2AltSpeedIsMax];
|
||||
[defaults setInteger:color_mode forKey:kApple2ColorConfig];
|
||||
// [defaults setInteger:color_mode forKey:kApple2ColorConfig];
|
||||
[defaults setInteger:joy_mode forKey:kApple2JoystickConfig];
|
||||
// [defaults setInteger:joy_step forKey:kApple2JoystickStep];
|
||||
// [defaults setBool:joy_auto_recenter forKey:kApple2JoystickAutoRecenter];
|
||||
|
@ -9,7 +9,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.deadc0de.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@ -29,7 +29,7 @@
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2014 deadc0de.org. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu-Test</string>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.deadc0de.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@ -29,7 +29,7 @@
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2014 deadc0de.org. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu-Test</string>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.deadc0de.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@ -29,7 +29,7 @@
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2014 deadc0de.org. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu-Test</string>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.deadc0de.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@ -29,7 +29,7 @@
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2014 deadc0de.org. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu-Test</string>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Apple // emulator for *ix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*
|
||||
* Copyright 2013-2015 Aaron Culliney
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface CPUTestAppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
|
||||
@end
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Apple // emulator for *ix
|
||||
*
|
||||
* This software package is subject to the GNU General Public License
|
||||
* version 3 or later (your choice) as published by the Free Software
|
||||
* Foundation.
|
||||
*
|
||||
* Copyright 2013-2015 Aaron Culliney
|
||||
*
|
||||
*/
|
||||
|
||||
#import "CPUTestAppDelegate.h"
|
||||
|
||||
#import "common.h"
|
||||
|
||||
extern int test_cpu(int, char **);
|
||||
extern int test_vm(int argc, char **argv);
|
||||
extern int test_display(int argc, char **argv);
|
||||
|
||||
@implementation CPUTestAppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
char *local_argv[] = {
|
||||
"-f",
|
||||
NULL
|
||||
};
|
||||
int local_argc = 0;
|
||||
for (char **p = &local_argv[0]; *p != NULL; p++) {
|
||||
++local_argc;
|
||||
}
|
||||
|
||||
#if defined(TEST_CPU)
|
||||
test_cpu(local_argc, local_argv);
|
||||
#elif defined(TEST_VM)
|
||||
test_vm(local_argc, local_argv);
|
||||
#elif defined(TEST_DISPLAY)
|
||||
test_display(local_argc, local_argv);
|
||||
#elif defined(TEST_DISK)
|
||||
test_disk(local_argc, local_argv);
|
||||
#else
|
||||
#error "OOPS, no tests specified"
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
@ -12,6 +12,7 @@
|
||||
// Based on sample code from https://developer.apple.com/library/mac/samplecode/GLEssentials/Introduction/Intro.html
|
||||
|
||||
#import "EmulatorGLView.h"
|
||||
#import "EmulatorJoystickController.h"
|
||||
|
||||
// Apple //e common routines
|
||||
#import "common.h"
|
||||
@ -189,7 +190,45 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||
// to [self openGLContext])
|
||||
[[self openGLContext] makeCurrentContext];
|
||||
|
||||
[EmulatorJoystickController sharedInstance];
|
||||
|
||||
#if TESTING
|
||||
char *local_argv[] = {
|
||||
"-f",
|
||||
NULL
|
||||
};
|
||||
int local_argc = 0;
|
||||
for (char **p = &local_argv[0]; *p != NULL; p++) {
|
||||
++local_argc;
|
||||
}
|
||||
|
||||
# if TEST_CPU
|
||||
// Currently this test is the only one that blocks current thread and runs as a black screen
|
||||
extern int test_cpu(int, char *[]);
|
||||
test_cpu(local_argc, local_argv);
|
||||
# elif TEST_VM
|
||||
extern int test_vm(int, char *[]);
|
||||
test_vm(local_argc, local_argv);
|
||||
# elif TEST_DISPLAY
|
||||
extern int test_display(int, char *[]);
|
||||
test_display(local_argc, local_argv);
|
||||
# elif TEST_DISK
|
||||
extern int test_disk(int, char *[]);
|
||||
test_disk(local_argc, local_argv);
|
||||
# elif TEST_PREFS
|
||||
extern void test_prefs(int, char *[]);
|
||||
test_prefs(local_argc, local_argv);
|
||||
# elif TEST_TRACE
|
||||
extern void test_trace(int, char *[]);
|
||||
test_trace(local_argc, local_argv);
|
||||
# else
|
||||
# error "OOPS, no testsuite specified"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
cpu_pause();
|
||||
emulator_start();
|
||||
cpu_resume();
|
||||
|
||||
// Synchronize buffer swaps with vertical refresh rate
|
||||
GLint swapInt = 1;
|
||||
@ -198,10 +237,9 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||
// Init our renderer. Use 0 for the defaultFBO which is appropriate for
|
||||
// OSX (but not iOS since iOS apps must create their own FBO)
|
||||
#if TARGET_OS_MAC
|
||||
video_backend->init(0);
|
||||
video_init();
|
||||
#elif TARGET_OS_IPHONE
|
||||
# error "FBO FIXME TODO"
|
||||
video_backend->init(otherFBO);
|
||||
# error this is OSX specific
|
||||
#else
|
||||
# error "unknown/unsupported Apple platform
|
||||
#endif
|
||||
@ -248,7 +286,10 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||
#endif // !SUPPORT_RETINA_RESOLUTION
|
||||
|
||||
// Set the new dimensions in our renderer
|
||||
video_backend->reshape((int)viewRectPixels.size.width, (int)viewRectPixels.size.height);
|
||||
prefs_setLongValue(PREF_DOMAIN_INTERFACE, PREF_DEVICE_WIDTH, (int)viewRectPixels.size.width);
|
||||
prefs_setLongValue(PREF_DOMAIN_INTERFACE, PREF_DEVICE_HEIGHT, (int)viewRectPixels.size.height);
|
||||
prefs_setLongValue(PREF_DOMAIN_INTERFACE, PREF_DEVICE_LANDSCAPE, true);
|
||||
prefs_sync(PREF_DOMAIN_INTERFACE);
|
||||
|
||||
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
||||
}
|
||||
@ -278,7 +319,7 @@ static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||
- (void)drawView
|
||||
{
|
||||
CGLLockContext([[self openGLContext] CGLContextObj]);
|
||||
video_backend->render();
|
||||
video_render();
|
||||
CGLFlushDrawable([[self openGLContext] CGLContextObj]);
|
||||
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:(NSString *)kDrawTimerNotification object:nil];
|
||||
|
@ -21,10 +21,6 @@
|
||||
- (void)resetJoysticks;
|
||||
@end
|
||||
|
||||
void gldriver_joystick_reset(void) {
|
||||
[EmulatorJoystickController sharedInstance];
|
||||
}
|
||||
|
||||
@implementation EmulatorJoystickController
|
||||
|
||||
@synthesize allJoysticks = _allJoysticks;
|
||||
@ -136,8 +132,14 @@ void gldriver_joystick_reset(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t x = (uint8_t)((value+DDHID_JOYSTICK_VALUE_MAX) * DDHID_JOYSTICK_NORMALIZER);
|
||||
joydriver_setAxisValue(x, joydriver_getAxisY());
|
||||
int x = (int)((value+DDHID_JOYSTICK_VALUE_MAX) * DDHID_JOYSTICK_NORMALIZER);
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
}
|
||||
if (x >= JOY_RANGE) {
|
||||
x = JOY_RANGE-1;
|
||||
}
|
||||
joydriver_setAxisValue((uint8_t)x, joydriver_getAxisY());
|
||||
}
|
||||
|
||||
- (void)ddhidJoystick:(DDHidJoystick *)joystick stick:(unsigned int)stick yChanged:(int)value
|
||||
@ -148,8 +150,14 @@ void gldriver_joystick_reset(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t y = (uint8_t)((value+DDHID_JOYSTICK_VALUE_MAX) * DDHID_JOYSTICK_NORMALIZER);
|
||||
joydriver_setAxisValue(joydriver_getAxisX(), y);
|
||||
int y = (int)((value+DDHID_JOYSTICK_VALUE_MAX) * DDHID_JOYSTICK_NORMALIZER);
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
}
|
||||
if (y >= JOY_RANGE) {
|
||||
y = JOY_RANGE-1;
|
||||
}
|
||||
joydriver_setAxisValue(joydriver_getAxisX(), (uint8_t)y);
|
||||
}
|
||||
|
||||
- (void)ddhidJoystick:(DDHidJoystick *)joystick stick:(unsigned int)stick otherAxis:(unsigned)otherAxis valueChanged:(int)value
|
||||
|
@ -115,8 +115,9 @@
|
||||
mode = COLOR_NONE;
|
||||
}
|
||||
[self.colorChoice selectItemAtIndex:mode];
|
||||
color_mode = (color_mode_t)mode;
|
||||
|
||||
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, (color_mode_t)mode);
|
||||
prefs_sync(PREF_DOMAIN_VIDEO);
|
||||
|
||||
mode = [defaults integerForKey:kApple2JoystickConfig];
|
||||
if (! ((mode >= JOY_PCJOY) && (mode < NUM_JOYOPTS)) )
|
||||
{
|
||||
@ -126,15 +127,20 @@
|
||||
[self.joystickChoice selectItemAtIndex:mode];
|
||||
|
||||
#ifdef KEYPAD_JOYSTICK
|
||||
joy_auto_recenter = [defaults integerForKey:kApple2JoystickAutoRecenter];
|
||||
[self.joystickRecenter setState:joy_auto_recenter ? NSOnState : NSOffState];
|
||||
joy_step = [defaults integerForKey:kApple2JoystickStep];
|
||||
if (!joy_step)
|
||||
bool autoRecenter = [defaults integerForKey:kApple2JoystickAutoRecenter];
|
||||
[self.joystickRecenter setState:autoRecenter ? NSOnState : NSOffState];
|
||||
prefs_setBoolValue(PREF_DOMAIN_JOYSTICK, PREF_JOYSTICK_KPAD_AUTO_RECENTER, autoRecenter);
|
||||
|
||||
long joyStep = [defaults integerForKey:kApple2JoystickStep];
|
||||
if (!joyStep)
|
||||
{
|
||||
joy_step = 1;
|
||||
joyStep = 1;
|
||||
}
|
||||
[self.joystickStepLabel setIntegerValue:joy_step];
|
||||
[self.joystickStepper setIntegerValue:joy_step];
|
||||
[self.joystickStepLabel setIntegerValue:joyStep];
|
||||
[self.joystickStepper setIntegerValue:joyStep];
|
||||
prefs_setLongValue(PREF_DOMAIN_JOYSTICK, PREF_JOYSTICK_KPAD_STEP, joyStep);
|
||||
|
||||
prefs_sync(PREF_DOMAIN_JOYSTICK);
|
||||
#endif
|
||||
|
||||
joy_clip_to_radius = [defaults boolForKey:kApple2JoystickClipToRadius];
|
||||
@ -158,11 +164,21 @@
|
||||
[defaults setDouble:cpu_altscale_factor forKey:kApple2AltSpeed];
|
||||
[defaults setBool:([self.cpuMaxChoice state] == NSOnState) forKey:kApple2CPUSpeedIsMax];
|
||||
[defaults setBool:([self.altMaxChoice state] == NSOnState) forKey:kApple2AltSpeedIsMax];
|
||||
[defaults setInteger:color_mode forKey:kApple2ColorConfig];
|
||||
|
||||
long lVal = 0;
|
||||
color_mode_t mode = prefs_parseLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, &lVal, /*base:*/10) ? (color_mode_t)lVal : COLOR_INTERP;
|
||||
[defaults setInteger:mode forKey:kApple2ColorConfig];
|
||||
[defaults setInteger:joy_mode forKey:kApple2JoystickConfig];
|
||||
[defaults setInteger:joy_step forKey:kApple2JoystickStep];
|
||||
[defaults setBool:joy_auto_recenter forKey:kApple2JoystickAutoRecenter];
|
||||
|
||||
long joyStep = prefs_parseLongValue(PREF_DOMAIN_JOYSTICK, PREF_JOYSTICK_KPAD_STEP, &lVal, /*base:*/10) ? lVal : 1;
|
||||
[defaults setInteger:joyStep forKey:kApple2JoystickStep];
|
||||
|
||||
bool bVal = false;
|
||||
bool autoRecenter = prefs_parseBoolValue(PREF_DOMAIN_JOYSTICK, PREF_JOYSTICK_KPAD_AUTO_RECENTER, &bVal) ? bVal : true;
|
||||
[defaults setBool:autoRecenter forKey:kApple2JoystickAutoRecenter];
|
||||
[defaults setBool:joy_clip_to_radius forKey:kApple2JoystickClipToRadius];
|
||||
|
||||
prefs_sync(PREF_DOMAIN_JOYSTICK);
|
||||
}
|
||||
|
||||
- (IBAction)sliderDidMove:(id)sender
|
||||
@ -211,13 +227,12 @@
|
||||
{
|
||||
mode = COLOR_NONE;
|
||||
}
|
||||
color_mode = (color_mode_t)mode;
|
||||
prefs_setLongValue(PREF_DOMAIN_VIDEO, PREF_COLOR_MODE, mode);
|
||||
prefs_sync(PREF_DOMAIN_VIDEO);
|
||||
[self _savePrefs];
|
||||
|
||||
#warning HACK TODO FIXME need to refactor video resetting procedure
|
||||
video_reset();
|
||||
video_setpage(!!(softswitches & SS_SCREEN));
|
||||
video_redraw();
|
||||
}
|
||||
|
||||
- (IBAction)soundCardChoiceChanged:(id)sender
|
||||
@ -253,7 +268,8 @@
|
||||
|
||||
- (IBAction)autoRecenterChoiceChanged:(id)sender
|
||||
{
|
||||
joy_auto_recenter = ([self.joystickRecenter state] == NSOnState);
|
||||
bool autoRecenter = ([self.joystickRecenter state] == NSOnState);
|
||||
prefs_setBoolValue(PREF_DOMAIN_JOYSTICK, PREF_JOYSTICK_KPAD_AUTO_RECENTER, autoRecenter);
|
||||
[self _savePrefs];
|
||||
}
|
||||
|
||||
@ -265,8 +281,9 @@
|
||||
|
||||
- (IBAction)stepValueChanged:(id)sender
|
||||
{
|
||||
joy_step = [self.joystickStepper intValue];
|
||||
[self.joystickStepLabel setIntegerValue:joy_step];
|
||||
long joyStep = [self.joystickStepper intValue];
|
||||
[self.joystickStepLabel setIntegerValue:joyStep];
|
||||
prefs_setLongValue(PREF_DOMAIN_JOYSTICK, PREF_JOYSTICK_KPAD_AUTO_RECENTER, joyStep);
|
||||
[self _savePrefs];
|
||||
}
|
||||
|
||||
|
@ -106,9 +106,9 @@
|
||||
{
|
||||
cpu_pause();
|
||||
timing_toggleCPUSpeed();
|
||||
if (video_backend && video_backend->animation_showCPUSpeed)
|
||||
if (video_animations && video_animations->animation_showCPUSpeed)
|
||||
{
|
||||
video_backend->animation_showCPUSpeed();
|
||||
video_animations->animation_showCPUSpeed();
|
||||
}
|
||||
cpu_resume();
|
||||
}
|
||||
@ -141,9 +141,9 @@
|
||||
[[self pauseItem] setLabel:@"Running"];
|
||||
cpu_resume();
|
||||
}
|
||||
if (video_backend && video_backend->animation_showPaused)
|
||||
if (video_animations && video_animations->animation_showPaused)
|
||||
{
|
||||
video_backend->animation_showPaused();
|
||||
video_animations->animation_showPaused();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
// start emulator from paused state
|
||||
cpu_pause();
|
||||
emulator_start();
|
||||
video_backend->init(0);
|
||||
video_init();
|
||||
|
||||
_animating = NO;
|
||||
_renderFrameInterval = 1;
|
||||
@ -136,11 +136,11 @@
|
||||
}
|
||||
|
||||
- (void)drawView:(id)sender
|
||||
{
|
||||
{
|
||||
[EAGLContext setCurrentContext:_context];
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, _defaultFBOName);
|
||||
video_backend->render();
|
||||
video_render();
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, _colorRenderbuffer);
|
||||
|
||||
[_context presentRenderbuffer:GL_RENDERBUFFER];
|
||||
@ -158,7 +158,7 @@
|
||||
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &backingWidth);
|
||||
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &backingHeight);
|
||||
|
||||
video_backend->reshape((int)backingWidth, (int)backingHeight);
|
||||
//video_reshape((int)backingWidth, (int)backingHeight, /*landscape:*/true); // TODO : portrait is possible
|
||||
|
||||
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
|
||||
{
|
||||
@ -259,23 +259,23 @@ static inline void _handleTouch(EAGLView *self, SEL _cmd, UITouch *touch, interf
|
||||
{
|
||||
if ((flags & TOUCH_FLAGS_KBD) != 0)
|
||||
{
|
||||
keydriver_setTouchKeyboardOwnsScreen(true);
|
||||
joydriver_setTouchJoystickOwnsScreen(false);
|
||||
video_backend->animation_showTouchKeyboard();
|
||||
//keydriver_setTouchKeyboardOwnsScreen(true);
|
||||
//joydriver_setTouchJoystickOwnsScreen(false);
|
||||
video_animations->animation_showTouchKeyboard();
|
||||
}
|
||||
else if ((flags & TOUCH_FLAGS_JOY) != 0)
|
||||
{
|
||||
keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
joydriver_setTouchJoystickOwnsScreen(true);
|
||||
joydriver_setTouchVariant(EMULATED_JOYSTICK);
|
||||
video_backend->animation_showTouchJoystick();
|
||||
//keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
//joydriver_setTouchJoystickOwnsScreen(true);
|
||||
//joydriver_setTouchVariant(EMULATED_JOYSTICK);
|
||||
video_animations->animation_showTouchJoystick();
|
||||
}
|
||||
else if ((flags & TOUCH_FLAGS_JOY_KPAD) != 0)
|
||||
{
|
||||
keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
joydriver_setTouchJoystickOwnsScreen(true);
|
||||
joydriver_setTouchVariant(EMULATED_KEYPAD);
|
||||
video_backend->animation_showTouchJoystick();
|
||||
//keydriver_setTouchKeyboardOwnsScreen(false);
|
||||
//joydriver_setTouchJoystickOwnsScreen(true);
|
||||
//joydriver_setTouchVariant(EMULATED_KEYPAD);
|
||||
video_animations->animation_showTouchJoystick();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
59
Makefile.am
59
Makefile.am
@ -1,7 +1,7 @@
|
||||
|
||||
AM_CPPFLAGS = -Isrc -DCONFIG_DATADIR=\"@datadir@\"
|
||||
AM_CPPFLAGS += -I../src # work around some bug in make distcheck
|
||||
AM_LFLAGS = -i
|
||||
AM_LFLAGS = -i -D_GNU_SOURCE=1
|
||||
#AM_COLOR_TESTS = no
|
||||
#LDFLAGS =
|
||||
#LDADD =
|
||||
@ -63,11 +63,12 @@ EXTRA_apple2ix_SOURCES = \
|
||||
|
||||
apple2ix_SOURCES = src/font.c src/rom.c src/misc.c src/display.c src/vm.c \
|
||||
src/timing.c src/zlib-helpers.c src/joystick.c src/keys.c src/prefs.c \
|
||||
src/interface.c src/disk.c src/cpu-supp.c
|
||||
src/interface.c src/disk.c src/cpu-supp.c src/json_parse.c src/memmngt.c \
|
||||
externals/jsmn/jsmn.c
|
||||
|
||||
apple2ix_CFLAGS = @AM_CFLAGS@ @X_CFLAGS@
|
||||
apple2ix_CCASFLAGS = $(apple2ix_CFLAGS)
|
||||
apple2ix_LDFLAGS =
|
||||
apple2ix_LDFLAGS = -Wl,-z,noexecstack
|
||||
apple2ix_LDADD = @ASM_O@ @VIDEO_O@ @AUDIO_O@ @META_O@ @X_LIBS@
|
||||
apple2ix_DEPENDENCIES = @ASM_O@ @VIDEO_O@ @AUDIO_O@ @META_O@
|
||||
|
||||
@ -92,54 +93,70 @@ LOG_DRIVER = testcpu ## hack TODO/FIXME ... should be wrapper shell script acce
|
||||
A2_TEST_SOURCES = $(apple2ix_SOURCES) src/test/testcommon.c
|
||||
A2_TEST_CFLAGS = -DTESTING=1 -DCPU_TRACING=1 -DDISK_TRACING=1 -DVM_TRACING=1 -Isrc/test
|
||||
|
||||
TESTS = testcpu testdisplay testvm testdisk testtrace
|
||||
check_PROGRAMS = testcpu testdisplay testvm testdisk testtrace
|
||||
TESTS = testcpu testdisplay testvm testdisk testprefs testtrace
|
||||
check_PROGRAMS = testcpu testdisplay testvm testdisk testprefs testtrace
|
||||
|
||||
#######################################
|
||||
testcpu_SOURCES = src/test/testcpu.c $(A2_TEST_SOURCES) $(META_SRC)
|
||||
testcpu_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -UAUDIO_ENABLED -UINTERFACE_CLASSIC
|
||||
testcpu_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -DTEST_CPU=1
|
||||
testcpu_CCASFLAGS = $(testcpu_CFLAGS)
|
||||
testcpu_LDFLAGS = $(apple2ix_LDFLAGS)
|
||||
testcpu_LDADD = @ASM_O@ @VIDEO_O@
|
||||
testcpu_DEPENDENCIES = @ASM_O@ @META_O@ @VIDEO_O@
|
||||
testcpu_LDADD = @ASM_O@ @VIDEO_O@ @AUDIO_O@
|
||||
testcpu_DEPENDENCIES = @ASM_O@ @META_O@ @VIDEO_O@ @AUDIO_O@
|
||||
|
||||
EXTRA_testcpu_SOURCES = $(ASM_SRC_x86)
|
||||
|
||||
#######################################
|
||||
testdisplay_SOURCES = src/test/testdisplay.c $(A2_TEST_SOURCES) $(META_SRC)
|
||||
testdisplay_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -UAUDIO_ENABLED -UINTERFACE_CLASSIC
|
||||
testdisplay_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -DTEST_DISPLAY=1
|
||||
testdisplay_CCASFLAGS = $(testdisplay_CFLAGS)
|
||||
testdisplay_LDFLAGS = $(apple2ix_LDFLAGS)
|
||||
testdisplay_LDADD = @ASM_O@ @VIDEO_O@
|
||||
testdisplay_DEPENDENCIES = @ASM_O@ @META_O@ @VIDEO_O@
|
||||
testdisplay_LDADD = @ASM_O@ @VIDEO_O@ @AUDIO_O@
|
||||
testdisplay_DEPENDENCIES = @ASM_O@ @META_O@ @VIDEO_O@ @AUDIO_O@
|
||||
|
||||
EXTRA_testdisplay_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC)
|
||||
|
||||
#######################################
|
||||
testvm_SOURCES = src/test/testvm.c $(A2_TEST_SOURCES) $(META_SRC)
|
||||
testvm_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -UAUDIO_ENABLED -UINTERFACE_CLASSIC
|
||||
testvm_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -DTEST_VM=1
|
||||
testvm_CCASFLAGS = $(testvm_CFLAGS)
|
||||
testvm_LDFLAGS = $(apple2ix_LDFLAGS)
|
||||
# HACK FIXME TODO NOTE: specify TESTVM_ASM_O to force it to rebuild with proper CCASFLAGS ... automake bug?
|
||||
testvm_LDADD = @TESTVM_ASM_O@ @VIDEO_O@
|
||||
testvm_DEPENDENCIES = @TESTVM_ASM_O@ @META_O@ @VIDEO_O@
|
||||
testvm_LDADD = @TESTVM_ASM_O@ @VIDEO_O@ @AUDIO_O@
|
||||
testvm_DEPENDENCIES = @TESTVM_ASM_O@ @META_O@ @VIDEO_O@ @AUDIO_O@
|
||||
|
||||
EXTRA_testvm_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC)
|
||||
|
||||
#######################################
|
||||
testdisk_SOURCES = src/test/testdisk.c $(A2_TEST_SOURCES) $(META_SRC)
|
||||
testdisk_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -UAUDIO_ENABLED -UINTERFACE_CLASSIC
|
||||
testdisk_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -DTEST_DISK=1
|
||||
testdisk_CCASFLAGS = $(testdisk_CFLAGS)
|
||||
testdisk_LDFLAGS = $(apple2ix_LDFLAGS)
|
||||
# HACK FIXME TODO NOTE: specify testdisk_ASM_O to force it to rebuild with proper CCASFLAGS ... automake bug?
|
||||
testdisk_LDADD = @TESTDISK_ASM_O@ @VIDEO_O@
|
||||
testdisk_DEPENDENCIES = @TESTDISK_ASM_O@ @META_O@ @VIDEO_O@
|
||||
testdisk_LDADD = @TESTDISK_ASM_O@ @VIDEO_O@ @AUDIO_O@
|
||||
testdisk_DEPENDENCIES = @TESTDISK_ASM_O@ @META_O@ @VIDEO_O@ @AUDIO_O@
|
||||
|
||||
EXTRA_testdisk_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC)
|
||||
|
||||
#######################################
|
||||
testprefs_SOURCES = src/test/testprefs.c $(A2_TEST_SOURCES) $(META_SRC)
|
||||
testprefs_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -DTEST_PREFS=1
|
||||
testprefs_CCASFLAGS = $(testprefs_CFLAGS)
|
||||
testprefs_LDFLAGS = $(apple2ix_LDFLAGS)
|
||||
# HACK FIXME TODO NOTE: specify testprefs_ASM_O to force it to rebuild with proper CCASFLAGS ... automake bug?
|
||||
testprefs_LDADD = @TESTPREFS_ASM_O@ @VIDEO_O@ @AUDIO_O@
|
||||
testprefs_DEPENDENCIES = @TESTPREFS_ASM_O@ @META_O@ @VIDEO_O@ @AUDIO_O@
|
||||
|
||||
EXTRA_testprefs_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC)
|
||||
|
||||
#######################################
|
||||
testtrace_SOURCES = src/test/testtrace.c $(A2_TEST_SOURCES) $(META_SRC)
|
||||
testtrace_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -UAUDIO_ENABLED -UINTERFACE_CLASSIC
|
||||
testtrace_CFLAGS = $(apple2ix_CFLAGS) $(A2_TEST_CFLAGS) -DTEST_TRACE=1
|
||||
testtrace_CCASFLAGS = $(testtrace_CFLAGS)
|
||||
testtrace_LDFLAGS = $(apple2ix_LDFLAGS)
|
||||
# HACK FIXME TODO NOTE: specify testtrace_ASM_O to force it to rebuild with proper CCASFLAGS ... automake bug?
|
||||
testtrace_LDADD = @TESTTRACE_ASM_O@ @VIDEO_O@
|
||||
testtrace_DEPENDENCIES = @TESTTRACE_ASM_O@ @META_O@ @VIDEO_O@
|
||||
testtrace_LDADD = @TESTTRACE_ASM_O@ @VIDEO_O@ @AUDIO_O@
|
||||
testtrace_DEPENDENCIES = @TESTTRACE_ASM_O@ @META_O@ @VIDEO_O@ @AUDIO_O@
|
||||
|
||||
EXTRA_testtrace_SOURCES = $(ASM_SRC_x86) $(VIDEO_SRC)
|
||||
|
||||
@ -157,7 +174,7 @@ shaders_DATA = src/video/Basic.vsh src/video/Basic.fsh
|
||||
disksdir = @datadir@/@PACKAGE@/disks
|
||||
disks_DATA = \
|
||||
disks/README disks/blank.dsk.gz disks/blank.nib.gz disks/blank.po.gz disks/etc.dsk.gz \
|
||||
disks/mystery.dsk disks/speedtest.dsk disks/speedtest.txt disks/flapple140.po \
|
||||
disks/mystery.dsk.gz disks/speedtest.dsk.gz disks/speedtest.txt disks/flapple140.po.gz \
|
||||
disks/testdisplay1.dsk.gz disks/testdisplay1.nib.gz disks/testvm1.dsk.gz disks/testvm1.nib.gz
|
||||
|
||||
|
||||
|
@ -47,11 +47,11 @@ Mac Package
|
||||
|
||||

|
||||
|
||||
A dated binary package for Macintosh is available at [deadc0de.org](http://deadc0de.org/Apple2Mac/Apple2Mac-0.9.dmg)
|
||||
Size : 10240000 (10MB)
|
||||
SHASUM : 81f2d55c2daaa0d3f9b33af9b50f69f6789738bf
|
||||
A dated binary package for Macintosh is available at [deadc0de.org](https://deadc0de.org/Apple2Mac/Apple2Mac-0.9.dmg)
|
||||
Size : 10240000 (10MB)
|
||||
SHASUM : 81f2d55c2daaa0d3f9b33af9b50f69f6789738bf
|
||||
|
||||
Alt Size : 76820480 (75MB)
|
||||
Alt Size : 76820480 (75MB)
|
||||
ALTSUM : 488a40d7f1187bcfd16d0045258f606a95f448cb
|
||||
|
||||
Due to Apple's policy about emulators we are unlikely to ship this in the App Store any time soon.
|
||||
|
31
configure.ac
31
configure.ac
@ -22,6 +22,7 @@ dnl Arch checks
|
||||
ASM_O="src/x86/glue.o src/x86/cpu.o"
|
||||
TESTVM_ASM_O="src/x86/testvm-glue.o src/x86/testvm-cpu.o"
|
||||
TESTDISK_ASM_O="src/x86/testdisk-glue.o src/x86/testdisk-cpu.o"
|
||||
TESTPREFS_ASM_O="src/x86/testprefs-glue.o src/x86/testprefs-cpu.o"
|
||||
TESTTRACE_ASM_O="src/x86/testtrace-glue.o src/x86/testtrace-cpu.o"
|
||||
arch=''
|
||||
case $target in
|
||||
@ -78,6 +79,7 @@ fi
|
||||
AC_SUBST(ASM_O)
|
||||
AC_SUBST(TESTVM_ASM_O)
|
||||
AC_SUBST(TESTDISK_ASM_O)
|
||||
AC_SUBST(TESTPREFS_ASM_O)
|
||||
AC_SUBST(TESTTRACE_ASM_O)
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
|
||||
@ -123,14 +125,13 @@ AC_TRY_LINK([asm("_glibc_foobar:");], [glibc_foobar()], [
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
# Sometimes Flex is installed as Lex, e.g., NetBSD.
|
||||
AC_CHECK_PROG([FLEX], [flex lex], [flex])
|
||||
# Force the use of `missing' to wrap Flex invocations.
|
||||
AM_MISSING_PROG([LEX], [$FLEX])
|
||||
# Perform all the tests Automake and Autoconf need.
|
||||
AM_PROG_LEX
|
||||
|
||||
dnl AS_IF([test "x$LEX" = "xno"], [
|
||||
dnl AC_MSG_ERROR([Emulator needs lex/flex to build source...])
|
||||
dnl ], [
|
||||
dnl AC_MSG_RESULT([Found lex $LEX])
|
||||
dnl ])
|
||||
|
||||
dnl POSIX high-precision clock
|
||||
AC_SEARCH_LIBS(clock_gettime, rt, [], [
|
||||
AC_MSG_ERROR([Emulator needs realtime clocks (-lrt) to build...])
|
||||
@ -195,7 +196,7 @@ AS_IF([test "x$opengl_supported" = "xyes"], [
|
||||
], [
|
||||
dnl OpenGL not supported
|
||||
AS_IF([test "x$opengl_selected" = "xyes"], [
|
||||
AC_MSG_WARN([Did not find OpenGL libraries, will attempt to build legacy X11 variant ...])
|
||||
AC_MSG_WARN([!!! DID NOT FIND OPENGL LIBRARIES !!! will attempt to build legacy X11 variant (this is OKAY but LIMITED) ...])
|
||||
], [])
|
||||
|
||||
AC_CHECK_HEADER(X11/XKBlib.h, [
|
||||
@ -219,12 +220,16 @@ AC_SUBST(VIDEO_O)
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Sound ...
|
||||
|
||||
AC_ARG_ENABLE([audio], AS_HELP_STRING([--disable-audio], [Disable emulator audio output]), [], [
|
||||
openal_selected='yes'
|
||||
AC_ARG_ENABLE([audio], AS_HELP_STRING([--disable-audio], [Disable emulator audio output]), [
|
||||
openal_selected='no'
|
||||
], [
|
||||
AC_CHECK_HEADER(AL/al.h, [
|
||||
AC_CHECK_HEADER(AL/alc.h, [
|
||||
AC_CHECK_HEADER(AL/alext.h, [
|
||||
AC_SEARCH_LIBS(alcOpenDevice, openal, [
|
||||
dnl found OpenAL ...
|
||||
openal_supported='yes'
|
||||
AC_DEFINE(AUDIO_ENABLED, 1, [Enable sound module])
|
||||
AUDIO_GLUE_C="src/audio/speaker.c src/audio/mockingboard.c src/audio/playqueue.c"
|
||||
AUDIO_O="src/audio/soundcore.o src/audio/soundcore-openal.o src/audio/speaker.o src/audio/playqueue.o src/audio/alhelpers.o src/audio/mockingboard.o src/audio/AY8910.o"
|
||||
@ -247,9 +252,13 @@ AC_ARG_ENABLE([audio], AS_HELP_STRING([--disable-audio], [Disable emulator audio
|
||||
AC_SUBST(AUDIO_GLUE_C)
|
||||
AC_SUBST(AUDIO_O)
|
||||
|
||||
dnl AS_IF([test "x$audio_disabled" = "xno"], [
|
||||
dnl ...
|
||||
dnl ])
|
||||
AS_IF([test "x$openal_supported" = "xyes"], [
|
||||
], [
|
||||
dnl OpenAL not supported
|
||||
AS_IF([test "x$openal_selected" = "xyes"], [
|
||||
AC_MSG_WARN([!!! DID NOT FIND OPENAL LIBRARIES !!! audio will be disabled (this is OKAY but LIMITED) ...])
|
||||
], [])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
BIN
disks/NSCT.dsk
BIN
disks/NSCT.dsk
Binary file not shown.
BIN
disks/NSCT.dsk.gz
Normal file
BIN
disks/NSCT.dsk.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
disks/flapple140.po.gz
Normal file
BIN
disks/flapple140.po.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
disks/mystery.dsk.gz
Normal file
BIN
disks/mystery.dsk.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
disks/speedtest.dsk.gz
Normal file
BIN
disks/speedtest.dsk.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
externals/bin/dump_syms
vendored
BIN
externals/bin/dump_syms
vendored
Binary file not shown.
BIN
externals/bin/minidump_stackwalk
vendored
BIN
externals/bin/minidump_stackwalk
vendored
Binary file not shown.
2
externals/breakpad/.gitignore
vendored
2
externals/breakpad/.gitignore
vendored
@ -31,6 +31,7 @@
|
||||
|
||||
# Ignore common compiled artifacts.
|
||||
*~
|
||||
*.dwo
|
||||
*.o
|
||||
lib*.a
|
||||
/breakpad.pc
|
||||
@ -45,6 +46,7 @@ lib*.a
|
||||
/src/tools/linux/md2core/minidump-2-core
|
||||
/src/tools/linux/symupload/minidump_upload
|
||||
/src/tools/linux/symupload/sym_upload
|
||||
/src/tools/mac/dump_syms/dump_syms
|
||||
|
||||
# Ignore autotools generated artifacts.
|
||||
.deps
|
||||
|
26
externals/breakpad/.travis.yml
vendored
Normal file
26
externals/breakpad/.travis.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# Travis build integration.
|
||||
# https://docs.travis-ci.com/
|
||||
language: cpp
|
||||
# TODO: add a clang build as well.
|
||||
compiler:
|
||||
- gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- gcc-4.8
|
||||
- g++-4.8
|
||||
# Travis sets CC/CXX to the system toolchain based on the `compiler`
|
||||
# selection. If clang is added, this should move to be set inside the
|
||||
# matrix.
|
||||
env:
|
||||
- USE_CC=gcc-4.8 USE_CXX=g++-4.8
|
||||
before_install: ./scripts/travis-checkout.sh
|
||||
script: ./scripts/travis-build.sh
|
||||
# TODO: add mac support
|
||||
os:
|
||||
- linux
|
||||
notifications:
|
||||
email:
|
||||
- google-breakpad-dev@googlegroups.com
|
18
externals/breakpad/DEPS
vendored
18
externals/breakpad/DEPS
vendored
@ -35,18 +35,26 @@
|
||||
deps = {
|
||||
# Logging code.
|
||||
"src/src/third_party/glog":
|
||||
"http://google-glog.googlecode.com/svn/trunk@97",
|
||||
"https://github.com/google/glog.git" +
|
||||
"@v0.3.4",
|
||||
|
||||
# Testing libraries and utilities.
|
||||
"src/src/testing": "http://googlemock.googlecode.com/svn/trunk@408",
|
||||
"src/src/testing/gtest": "http://googletest.googlecode.com/svn/trunk@615",
|
||||
"src/src/testing":
|
||||
"https://github.com/google/googlemock.git" +
|
||||
"@release-1.7.0",
|
||||
"src/src/testing/gtest":
|
||||
"https://github.com/google/googletest.git" +
|
||||
"@release-1.7.0",
|
||||
|
||||
# Protobuf.
|
||||
"src/src/third_party/protobuf/protobuf":
|
||||
"http://protobuf.googlecode.com/svn/trunk@407",
|
||||
"https://github.com/google/protobuf.git" +
|
||||
"@cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac",
|
||||
|
||||
# GYP project generator.
|
||||
"src/src/tools/gyp": "http://gyp.googlecode.com/svn/trunk@1886",
|
||||
"src/src/tools/gyp":
|
||||
"https://chromium.googlesource.com/external/gyp/" +
|
||||
"@e8ab0833a42691cd2184bd4c45d779e43821d3e0",
|
||||
|
||||
# Linux syscall support.
|
||||
"src/src/third_party/lss":
|
||||
|
399
externals/breakpad/Makefile.am
vendored
399
externals/breakpad/Makefile.am
vendored
@ -83,6 +83,9 @@ if LINUX_HOST
|
||||
includeclhdir = $(includedir)/$(PACKAGE)/client/linux/handler
|
||||
includeclh_HEADERS = $(top_srcdir)/src/client/linux/handler/*.h
|
||||
|
||||
includecldwcdir = $(includedir)/$(PACKAGE)/client/linux/dump_writer_common
|
||||
includecldwc_HEADERS = $(top_srcdir)/src/client/linux/dump_writer_common/*.h
|
||||
|
||||
includeclmdir = $(includedir)/$(PACKAGE)/client/linux/minidump_writer
|
||||
includeclm_HEADERS = $(top_srcdir)/src/client/linux/minidump_writer/*.h
|
||||
|
||||
@ -109,11 +112,40 @@ includep_HEADERS = $(top_srcdir)/src/processor/*.h
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA =
|
||||
|
||||
## Common test logic
|
||||
if SYSTEM_TEST_LIBS
|
||||
TEST_CFLAGS = $(GTEST_CFLAGS) $(GMOCK_CFLAGS)
|
||||
TEST_LIBS = $(GTEST_LIBS) -lgtest_main $(GMOCK_LIBS)
|
||||
TEST_DEPS =
|
||||
else
|
||||
TEST_CFLAGS = \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
TEST_LIBS = src/testing/libtesting.a
|
||||
TEST_DEPS = $(TEST_LIBS)
|
||||
endif
|
||||
|
||||
## Libraries
|
||||
check_LIBRARIES =
|
||||
noinst_LIBRARIES =
|
||||
lib_LIBRARIES =
|
||||
bin_PROGRAMS =
|
||||
check_PROGRAMS =
|
||||
EXTRA_PROGRAMS =
|
||||
CLEANFILES =
|
||||
|
||||
check_LIBRARIES += src/testing/libtesting.a
|
||||
|
||||
if !SYSTEM_TEST_LIBS
|
||||
src_testing_libtesting_a_SOURCES = \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src_testing_libtesting_a_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
endif
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
lib_LIBRARIES += src/libbreakpad.a
|
||||
@ -134,6 +166,7 @@ src_client_linux_libbreakpad_client_a_SOURCES = \
|
||||
src/client/linux/handler/minidump_descriptor.cc \
|
||||
src/client/linux/log/log.cc \
|
||||
src/client/linux/microdump_writer/microdump_writer.cc \
|
||||
src/client/linux/minidump_writer/linux_core_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_dumper.cc \
|
||||
src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
|
||||
src/client/linux/minidump_writer/minidump_writer.cc \
|
||||
@ -141,6 +174,7 @@ src_client_linux_libbreakpad_client_a_SOURCES = \
|
||||
src/common/convert_UTF.c \
|
||||
src/common/md5.cc \
|
||||
src/common/string_conversion.cc \
|
||||
src/common/linux/elf_core_dump.cc \
|
||||
src/common/linux/elfutils.cc \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/guid_creator.cc \
|
||||
@ -270,8 +304,6 @@ src_libbreakpad_a_SOURCES = \
|
||||
src/processor/tokenize.cc \
|
||||
src/processor/tokenize.h
|
||||
|
||||
src_libbreakpad_a_LIBADD = src/third_party/libdisasm/libdisasm.a
|
||||
|
||||
src_third_party_libdisasm_libdisasm_a_SOURCES = \
|
||||
src/third_party/libdisasm/ia32_implicit.c \
|
||||
src/third_party/libdisasm/ia32_implicit.h \
|
||||
@ -308,7 +340,9 @@ bin_PROGRAMS += \
|
||||
endif !DISABLE_PROCESSOR
|
||||
|
||||
if LINUX_HOST
|
||||
bin_PROGRAMS += \
|
||||
EXTRA_PROGRAMS += \
|
||||
src/client/linux/linux_dumper_unittest_helper
|
||||
CLEANFILES += \
|
||||
src/client/linux/linux_dumper_unittest_helper
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
@ -317,8 +351,11 @@ bin_PROGRAMS += \
|
||||
src/tools/linux/dump_syms/dump_syms \
|
||||
src/tools/linux/md2core/minidump-2-core \
|
||||
src/tools/linux/symupload/minidump_upload \
|
||||
src/tools/linux/symupload/sym_upload \
|
||||
src/tools/mac/dump_syms/dump_syms
|
||||
src/tools/linux/symupload/sym_upload
|
||||
if X86_HOST
|
||||
bin_PROGRAMS += \
|
||||
src/tools/mac/dump_syms/dump_syms_mac
|
||||
endif
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
@ -351,12 +388,15 @@ check_PROGRAMS += \
|
||||
src/processor/stackwalker_arm64_unittest \
|
||||
src/processor/stackwalker_address_list_unittest \
|
||||
src/processor/stackwalker_mips_unittest \
|
||||
src/processor/stackwalker_mips64_unittest \
|
||||
src/processor/stackwalker_x86_unittest \
|
||||
src/processor/synth_minidump_unittest
|
||||
endif
|
||||
|
||||
if LINUX_HOST
|
||||
EXTRA_PROGRAMS = \
|
||||
EXTRA_PROGRAMS += \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
CLEANFILES += \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
|
||||
check_PROGRAMS += \
|
||||
@ -365,8 +405,11 @@ check_PROGRAMS += \
|
||||
if !DISABLE_TOOLS
|
||||
check_PROGRAMS += \
|
||||
src/common/dumper_unittest \
|
||||
src/common/mac/macho_reader_unittest \
|
||||
src/tools/linux/md2core/minidump_2_core_unittest
|
||||
if X86_HOST
|
||||
check_PROGRAMS += \
|
||||
src/common/mac/macho_reader_unittest
|
||||
endif
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
@ -413,6 +456,7 @@ src_client_linux_linux_dumper_unittest_helper_CXXFLAGS=$(PTHREAD_CFLAGS)
|
||||
endif
|
||||
|
||||
src_client_linux_linux_client_unittest_shlib_SOURCES = \
|
||||
$(src_testing_libtesting_a_SOURCES) \
|
||||
src/client/linux/handler/exception_handler_unittest.cc \
|
||||
src/client/linux/minidump_writer/directory_reader_unittest.cc \
|
||||
src/client/linux/minidump_writer/cpu_set_unittest.cc \
|
||||
@ -428,9 +472,6 @@ src_client_linux_linux_client_unittest_shlib_SOURCES = \
|
||||
src/common/linux/tests/crash_generator.cc \
|
||||
src/common/memory_unittest.cc \
|
||||
src/common/tests/file_utils.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc \
|
||||
src/processor/basic_code_modules.cc \
|
||||
src/processor/dump_context.cc \
|
||||
src/processor/dump_object.cc \
|
||||
@ -448,11 +489,7 @@ src_client_linux_linux_client_unittest_shlib_SOURCES += \
|
||||
endif
|
||||
|
||||
src_client_linux_linux_client_unittest_shlib_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_client_linux_linux_client_unittest_shlib_LDFLAGS = \
|
||||
-shared \
|
||||
-Wl,-h,linux_client_unittest_shlib
|
||||
@ -477,6 +514,7 @@ src_client_linux_linux_client_unittest_shlib_LDADD = \
|
||||
src/common/linux/memory_mapped_file.o \
|
||||
src/common/linux/safe_readlink.o \
|
||||
src/common/string_conversion.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
if ANDROID_HOST
|
||||
src_client_linux_linux_client_unittest_shlib_SOURCES += \
|
||||
@ -488,27 +526,29 @@ endif
|
||||
src_client_linux_linux_client_unittest_shlib_DEPENDENCIES = \
|
||||
src/client/linux/linux_dumper_unittest_helper \
|
||||
src/client/linux/libbreakpad_client.a \
|
||||
$(TEST_DEPS) \
|
||||
src/libbreakpad.a
|
||||
|
||||
src_client_linux_linux_client_unittest_SOURCES =
|
||||
# The extra-long build id is for a test in minidump_writer_unittest.cc.
|
||||
src_client_linux_linux_client_unittest_LDFLAGS = \
|
||||
-Wl,-rpath,'$$ORIGIN'
|
||||
-Wl,-rpath,'$$ORIGIN' \
|
||||
-Wl,--build-id=0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
|
||||
if ANDROID_HOST
|
||||
src_client_linux_linux_client_unittest_LDFLAGS += \
|
||||
-llog
|
||||
endif
|
||||
|
||||
src_client_linux_linux_client_unittest_LDADD = \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
src/client/linux/linux_client_unittest_shlib \
|
||||
$(TEST_LIBS)
|
||||
|
||||
src_client_linux_linux_client_unittest_DEPENDENCIES = \
|
||||
src/client/linux/linux_client_unittest_shlib
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
src_tools_linux_core2md_core2md_SOURCES = \
|
||||
src/tools/linux/core2md/core2md.cc \
|
||||
src/client/linux/minidump_writer/linux_core_dumper.cc \
|
||||
src/common/linux/elf_core_dump.cc
|
||||
src/tools/linux/core2md/core2md.cc
|
||||
|
||||
src_tools_linux_core2md_core2md_LDADD = \
|
||||
src/client/linux/libbreakpad_client.a
|
||||
@ -545,10 +585,11 @@ src_tools_linux_symupload_minidump_upload_LDADD = -ldl
|
||||
|
||||
src_tools_linux_symupload_sym_upload_SOURCES = \
|
||||
src/common/linux/http_upload.cc \
|
||||
src/common/linux/symbol_upload.cc \
|
||||
src/tools/linux/symupload/sym_upload.cc
|
||||
src_tools_linux_symupload_sym_upload_LDADD = -ldl
|
||||
|
||||
src_tools_mac_dump_syms_dump_syms_SOURCES = \
|
||||
src_tools_mac_dump_syms_dump_syms_mac_SOURCES = \
|
||||
src/common/dwarf_cfi_to_module.cc \
|
||||
src/common/dwarf_cu_to_module.cc \
|
||||
src/common/dwarf_line_to_module.cc \
|
||||
@ -568,7 +609,7 @@ src_tools_mac_dump_syms_dump_syms_SOURCES = \
|
||||
src/common/mac/macho_utilities.cc \
|
||||
src/common/mac/macho_walker.cc \
|
||||
src/tools/mac/dump_syms/dump_syms_tool.cc
|
||||
src_tools_mac_dump_syms_dump_syms_CXXFLAGS= \
|
||||
src_tools_mac_dump_syms_dump_syms_mac_CXXFLAGS= \
|
||||
-I$(top_srcdir)/src/third_party/mac_headers \
|
||||
-DHAVE_MACH_O_NLIST_H
|
||||
|
||||
@ -615,18 +656,13 @@ src_common_dumper_unittest_SOURCES = \
|
||||
src/common/linux/synth_elf.cc \
|
||||
src/common/linux/synth_elf_unittest.cc \
|
||||
src/common/linux/tests/crash_generator.cc \
|
||||
src/common/tests/file_utils.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/common/tests/file_utils.cc
|
||||
src_common_dumper_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS) \
|
||||
$(PTHREAD_CFLAGS)
|
||||
src_common_dumper_unittest_LDADD = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_common_dumper_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_common_mac_macho_reader_unittest_SOURCES = \
|
||||
src/common/dwarf_cfi_to_module.cc \
|
||||
@ -649,34 +685,23 @@ src_common_mac_macho_reader_unittest_SOURCES = \
|
||||
src/common/mac/macho_reader_unittest.cc \
|
||||
src/common/mac/macho_utilities.cc \
|
||||
src/common/mac/macho_walker.cc \
|
||||
src/common/tests/file_utils.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/common/tests/file_utils.cc
|
||||
src_common_mac_macho_reader_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS) \
|
||||
-I$(top_srcdir)/src/third_party/mac_headers \
|
||||
-DHAVE_MACH_O_NLIST_H \
|
||||
$(PTHREAD_CFLAGS)
|
||||
src_common_mac_macho_reader_unittest_LDADD = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_common_mac_macho_reader_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
endif
|
||||
|
||||
src_tools_linux_md2core_minidump_2_core_unittest_SOURCES = \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc \
|
||||
src/tools/linux/md2core/minidump_memory_range_unittest.cc
|
||||
src_tools_linux_md2core_minidump_2_core_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_tools_linux_md2core_minidump_2_core_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
endif LINUX_HOST
|
||||
@ -689,15 +714,9 @@ src_processor_address_map_unittest_LDADD = \
|
||||
src/processor/pathname_stripper.o
|
||||
|
||||
src_processor_basic_source_line_resolver_unittest_SOURCES = \
|
||||
src/processor/basic_source_line_resolver_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/basic_source_line_resolver_unittest.cc
|
||||
src_processor_basic_source_line_resolver_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_basic_source_line_resolver_unittest_LDADD = \
|
||||
src/processor/basic_source_line_resolver.o \
|
||||
src/processor/cfi_frame_info.o \
|
||||
@ -705,24 +724,19 @@ src_processor_basic_source_line_resolver_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/source_line_resolver_base.o \
|
||||
src/processor/tokenize.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_cfi_frame_info_unittest_SOURCES = \
|
||||
src/processor/cfi_frame_info_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/cfi_frame_info_unittest.cc
|
||||
src_processor_cfi_frame_info_unittest_LDADD = \
|
||||
src/processor/cfi_frame_info.o \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_cfi_frame_info_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_contained_range_map_unittest_SOURCES = \
|
||||
src/processor/contained_range_map_unittest.cc
|
||||
@ -731,16 +745,9 @@ src_processor_contained_range_map_unittest_LDADD = \
|
||||
src/processor/pathname_stripper.o
|
||||
|
||||
src_processor_exploitability_unittest_SOURCES = \
|
||||
src/processor/exploitability_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/exploitability_unittest.cc
|
||||
src_processor_exploitability_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_exploitability_unittest_LDADD = \
|
||||
src/processor/minidump_processor.o \
|
||||
src/processor/process_state.o \
|
||||
@ -775,34 +782,23 @@ src_processor_exploitability_unittest_LDADD = \
|
||||
src/processor/symbolic_constants_win.o \
|
||||
src/processor/tokenize.o \
|
||||
src/third_party/libdisasm/libdisasm.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_disassembler_x86_unittest_SOURCES = \
|
||||
src/processor/disassembler_x86_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/disassembler_x86_unittest.cc
|
||||
src_processor_disassembler_x86_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_disassembler_x86_unittest_LDADD = \
|
||||
src/processor/disassembler_x86.o \
|
||||
src/third_party/libdisasm/libdisasm.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_fast_source_line_resolver_unittest_SOURCES = \
|
||||
src/processor/fast_source_line_resolver_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/fast_source_line_resolver_unittest.cc
|
||||
src_processor_fast_source_line_resolver_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_fast_source_line_resolver_unittest_LDADD = \
|
||||
src/processor/fast_source_line_resolver.o \
|
||||
src/processor/basic_source_line_resolver.o \
|
||||
@ -813,33 +809,23 @@ src_processor_fast_source_line_resolver_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/source_line_resolver_base.o \
|
||||
src/processor/tokenize.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_map_serializers_unittest_SOURCES = \
|
||||
src/processor/map_serializers_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/map_serializers_unittest.cc
|
||||
src_processor_map_serializers_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_map_serializers_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_microdump_processor_unittest_SOURCES = \
|
||||
src/processor/microdump_processor_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/microdump_processor_unittest.cc
|
||||
src_processor_microdump_processor_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_microdump_processor_unittest_LDADD = \
|
||||
src/processor/basic_code_modules.o \
|
||||
src/processor/basic_source_line_resolver.o \
|
||||
@ -866,18 +852,13 @@ src_processor_microdump_processor_unittest_LDADD = \
|
||||
src/processor/stackwalker_sparc.o \
|
||||
src/processor/stackwalker_x86.o \
|
||||
src/processor/tokenize.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_minidump_processor_unittest_SOURCES = \
|
||||
src/processor/minidump_processor_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/minidump_processor_unittest.cc
|
||||
src_processor_minidump_processor_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_minidump_processor_unittest_LDADD = \
|
||||
src/processor/basic_code_modules.o \
|
||||
src/processor/basic_source_line_resolver.o \
|
||||
@ -911,21 +892,15 @@ src_processor_minidump_processor_unittest_LDADD = \
|
||||
src/processor/symbolic_constants_win.o \
|
||||
src/processor/tokenize.o \
|
||||
src/third_party/libdisasm/libdisasm.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_minidump_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/minidump_unittest.cc \
|
||||
src/processor/synth_minidump.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/synth_minidump.cc
|
||||
src_processor_minidump_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_minidump_unittest_LDADD = \
|
||||
src/processor/basic_code_modules.o \
|
||||
src/processor/dump_context.o \
|
||||
@ -934,84 +909,59 @@ src_processor_minidump_unittest_LDADD = \
|
||||
src/processor/minidump.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
src/processor/proc_maps_linux.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_proc_maps_linux_unittest_SOURCES = \
|
||||
src/processor/proc_maps_linux.cc \
|
||||
src/processor/proc_maps_linux_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/proc_maps_linux_unittest.cc
|
||||
src_processor_proc_maps_linux_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_proc_maps_linux_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
src/third_party/libdisasm/libdisasm.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_static_address_map_unittest_SOURCES = \
|
||||
src/processor/static_address_map_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/static_address_map_unittest.cc
|
||||
src_processor_static_address_map_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_static_address_map_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_static_contained_range_map_unittest_SOURCES = \
|
||||
src/processor/static_contained_range_map_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/static_contained_range_map_unittest.cc
|
||||
src_processor_static_contained_range_map_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_static_contained_range_map_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_static_map_unittest_SOURCES = \
|
||||
src/processor/static_map_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/static_map_unittest.cc
|
||||
src_processor_static_map_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_static_map_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_static_range_map_unittest_SOURCES = \
|
||||
src/processor/static_range_map_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/static_range_map_unittest.cc
|
||||
src_processor_static_range_map_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_static_range_map_unittest_LDADD = \
|
||||
src/processor/logging.o \
|
||||
src/processor/pathname_stripper.o \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_processor_pathname_stripper_unittest_SOURCES = \
|
||||
@ -1066,131 +1016,95 @@ src_processor_stackwalker_selftest_LDADD = \
|
||||
|
||||
src_processor_stackwalker_amd64_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_amd64_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/stackwalker_amd64_unittest.cc
|
||||
src_processor_stackwalker_amd64_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_amd64_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_arm_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_arm_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/stackwalker_arm_unittest.cc
|
||||
src_processor_stackwalker_arm_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_arm_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_arm64_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_arm64_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/stackwalker_arm64_unittest.cc
|
||||
src_processor_stackwalker_arm64_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_arm64_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_address_list_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_address_list_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/stackwalker_address_list_unittest.cc
|
||||
src_processor_stackwalker_address_list_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_address_list_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_mips_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_mips_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/stackwalker_mips_unittest.cc
|
||||
src_processor_stackwalker_mips_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_mips_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_mips64_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_mips64_unittest.cc
|
||||
src_processor_stackwalker_mips64_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_mips64_unittest_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_stackwalker_x86_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/processor/stackwalker_x86_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/processor/stackwalker_x86_unittest.cc
|
||||
src_processor_stackwalker_x86_unittest_LDADD = \
|
||||
src/libbreakpad.a \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
src_processor_stackwalker_x86_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
|
||||
src_processor_synth_minidump_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/common/test_assembler.h \
|
||||
src/processor/synth_minidump_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc \
|
||||
src/processor/synth_minidump.cc \
|
||||
src/processor/synth_minidump.h
|
||||
src_processor_synth_minidump_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
src_processor_synth_minidump_unittest_LDADD = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_processor_synth_minidump_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
src_common_test_assembler_unittest_SOURCES = \
|
||||
src/common/test_assembler.cc \
|
||||
src/common/test_assembler.h \
|
||||
src/common/test_assembler_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src/common/test_assembler_unittest.cc
|
||||
src_common_test_assembler_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
src_common_test_assembler_unittest_LDADD = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
$(AM_CPPFLAGS) $(TEST_CFLAGS)
|
||||
src_common_test_assembler_unittest_LDADD = \
|
||||
$(TEST_LIBS) \
|
||||
$(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
||||
## Non-installables
|
||||
noinst_PROGRAMS =
|
||||
@ -1346,6 +1260,8 @@ EXTRA_DIST = \
|
||||
src/common/linux/guid_creator.h \
|
||||
src/common/linux/http_upload.cc \
|
||||
src/common/linux/http_upload.h \
|
||||
src/common/linux/symbol_upload.cc \
|
||||
src/common/linux/symbol_upload.h \
|
||||
src/common/mac/HTTPMultipartUpload.h \
|
||||
src/common/mac/HTTPMultipartUpload.m \
|
||||
src/common/mac/dump_syms.h \
|
||||
@ -1423,3 +1339,6 @@ EXTRA_DIST = \
|
||||
src/tools/windows/dump_syms/testdata/dump_syms_regtest.sym \
|
||||
src/tools/windows/symupload/symupload.cc \
|
||||
src/tools/windows/symupload/symupload.vcproj
|
||||
|
||||
mostlyclean-local:
|
||||
-find src -name '*.dwo' -exec rm -f {} +
|
||||
|
2854
externals/breakpad/Makefile.in
vendored
2854
externals/breakpad/Makefile.in
vendored
File diff suppressed because it is too large
Load Diff
11
externals/breakpad/README.md
vendored
11
externals/breakpad/README.md
vendored
@ -3,6 +3,13 @@
|
||||
Breakpad is a set of client and server components which implement a
|
||||
crash-reporting system.
|
||||
|
||||
* [Homepage](https://chromium.googlesource.com/breakpad/breakpad/)
|
||||
* [Documentation](https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/)
|
||||
* [Bugs](https://bugs.chromium.org/p/google-breakpad/)
|
||||
* Discussion/Questions: [google-breakpad-discuss@googlegroups.com](https://groups.google.com/d/forum/google-breakpad-discuss)
|
||||
* Developer/Reviews: [google-breakpad-dev@googlegroups.com](https://groups.google.com/d/forum/google-breakpad-dev)
|
||||
* Tests: [](https://travis-ci.org/google/breakpad)
|
||||
|
||||
## Getting started in 32-bit mode (from trunk)
|
||||
|
||||
```sh
|
||||
@ -41,7 +48,3 @@ If you need to reconfigure your build be sure to run `make distclean` first.
|
||||
6. At https://codereview.chromium.org/ you'll find your issue listed; click on
|
||||
it, and select Publish+Mail, and enter in the code reviewer and CC
|
||||
google-breakpad-dev@googlegroups.com
|
||||
|
||||
## Documentation
|
||||
|
||||
Visit https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/
|
||||
|
60
externals/breakpad/aclocal.m4
vendored
60
externals/breakpad/aclocal.m4
vendored
@ -56,6 +56,66 @@ m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_AR([ACT-IF-FAIL])
|
||||
# -------------------------
|
||||
# Try to determine the archiver interface, and trigger the ar-lib wrapper
|
||||
# if it is needed. If the detection of archiver interface fails, run
|
||||
# ACT-IF-FAIL (default is to abort configure with a proper error message).
|
||||
AC_DEFUN([AM_PROG_AR],
|
||||
[AC_BEFORE([$0], [LT_INIT])dnl
|
||||
AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
|
||||
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([ar-lib])dnl
|
||||
AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
|
||||
: ${AR=ar}
|
||||
|
||||
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
|
||||
[AC_LANG_PUSH([C])
|
||||
am_cv_ar_interface=ar
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
|
||||
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
|
||||
AC_TRY_EVAL([am_ar_try])
|
||||
if test "$ac_status" -eq 0; then
|
||||
am_cv_ar_interface=ar
|
||||
else
|
||||
am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
|
||||
AC_TRY_EVAL([am_ar_try])
|
||||
if test "$ac_status" -eq 0; then
|
||||
am_cv_ar_interface=lib
|
||||
else
|
||||
am_cv_ar_interface=unknown
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.lib libconftest.a
|
||||
])
|
||||
AC_LANG_POP([C])])
|
||||
|
||||
case $am_cv_ar_interface in
|
||||
ar)
|
||||
;;
|
||||
lib)
|
||||
# Microsoft lib, so override with the ar-lib wrapper script.
|
||||
# FIXME: It is wrong to rewrite AR.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__AR in this case,
|
||||
# and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
|
||||
# similar.
|
||||
AR="$am_aux_dir/ar-lib $AR"
|
||||
;;
|
||||
unknown)
|
||||
m4_default([$1],
|
||||
[AC_MSG_ERROR([could not determine $AR interface])])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([AR])dnl
|
||||
])
|
||||
|
||||
# Figure out how to run the assembler. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||
|
@ -73,8 +73,8 @@ LOCAL_ARM_MODE := arm
|
||||
# List of client source files, directly taken from Makefile.am
|
||||
LOCAL_SRC_FILES := \
|
||||
src/client/linux/crash_generation/crash_generation_client.cc \
|
||||
src/client/linux/dump_writer_common/ucontext_reader.cc \
|
||||
src/client/linux/dump_writer_common/thread_info.cc \
|
||||
src/client/linux/dump_writer_common/ucontext_reader.cc \
|
||||
src/client/linux/handler/exception_handler.cc \
|
||||
src/client/linux/handler/minidump_descriptor.cc \
|
||||
src/client/linux/log/log.cc \
|
||||
|
@ -29,3 +29,4 @@
|
||||
|
||||
APP_STL := stlport_static
|
||||
APP_ABI := all
|
||||
APP_CXXFLAGS := -std=c++11 -D__STDC_LIMIT_MACROS
|
||||
|
270
externals/breakpad/autotools/ar-lib
vendored
Executable file
270
externals/breakpad/autotools/ar-lib
vendored
Executable file
@ -0,0 +1,270 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
|
||||
# Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# This program 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 Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
|
||||
# func_error message
|
||||
func_error ()
|
||||
{
|
||||
echo "$me: $1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv in
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_at_file at_file operation archive
|
||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
||||
# for each of them.
|
||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
||||
# since the user would need to supply preconverted file names to
|
||||
# binutils ar, at least for MinGW.
|
||||
func_at_file ()
|
||||
{
|
||||
operation=$2
|
||||
archive=$3
|
||||
at_file_contents=`cat "$1"`
|
||||
eval set x "$at_file_contents"
|
||||
shift
|
||||
|
||||
for member
|
||||
do
|
||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
func_error "no command. Try '$0 --help' for more information."
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<EOF
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $# -lt 3; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
|
||||
AR=$1
|
||||
shift
|
||||
while :
|
||||
do
|
||||
if test $# -lt 2; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
case $1 in
|
||||
-lib | -LIB \
|
||||
| -ltcg | -LTCG \
|
||||
| -machine* | -MACHINE* \
|
||||
| -subsystem* | -SUBSYSTEM* \
|
||||
| -verbose | -VERBOSE \
|
||||
| -wx* | -WX* )
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
orig_archive=$1
|
||||
shift
|
||||
func_file_conv "$orig_archive"
|
||||
archive=$file
|
||||
|
||||
# strip leading dash in $action
|
||||
action=${action#-}
|
||||
|
||||
delete=
|
||||
extract=
|
||||
list=
|
||||
quick=
|
||||
replace=
|
||||
index=
|
||||
create=
|
||||
|
||||
while test -n "$action"
|
||||
do
|
||||
case $action in
|
||||
d*) delete=yes ;;
|
||||
x*) extract=yes ;;
|
||||
t*) list=yes ;;
|
||||
q*) quick=yes ;;
|
||||
r*) replace=yes ;;
|
||||
s*) index=yes ;;
|
||||
S*) ;; # the index is always updated implicitly
|
||||
c*) create=yes ;;
|
||||
u*) ;; # TODO: don't ignore the update modifier
|
||||
v*) ;; # TODO: don't ignore the verbose modifier
|
||||
*)
|
||||
func_error "unknown action specified"
|
||||
;;
|
||||
esac
|
||||
action=${action#?}
|
||||
done
|
||||
|
||||
case $delete$extract$list$quick$replace,$index in
|
||||
yes,* | ,yes)
|
||||
;;
|
||||
yesyes*)
|
||||
func_error "more than one action specified"
|
||||
;;
|
||||
*)
|
||||
func_error "no action specified"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$delete"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -REMOVE "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
elif test -n "$extract"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
if test -z "$create"; then
|
||||
echo "$me: creating $orig_archive"
|
||||
fi
|
||||
orig_archive=
|
||||
else
|
||||
orig_archive=$archive
|
||||
fi
|
||||
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_file_conv "${1#@}"
|
||||
set x "$@" "@$file"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
set x "$@" "$file"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
done
|
||||
|
||||
if test -n "$orig_archive"; then
|
||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
||||
else
|
||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
||||
fi
|
||||
|
||||
elif test -n "$list"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
||||
fi
|
2
externals/breakpad/autotools/compile
vendored
2
externals/breakpad/autotools/compile
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
27
externals/breakpad/autotools/config.guess
vendored
27
externals/breakpad/autotools/config.guess
vendored
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2015-03-04'
|
||||
timestamp='2016-01-01'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -27,7 +27,7 @@ timestamp='2015-03-04'
|
||||
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
#
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
|
||||
@ -50,7 +50,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -221,7 +221,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
@ -249,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:Sortix:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-sortix
|
||||
exit ;;
|
||||
alpha:OSF1:*:*)
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
@ -962,6 +965,9 @@ EOF
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
k1om:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
@ -1038,7 +1044,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
@ -1117,7 +1123,7 @@ EOF
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# prints for the "djgpp" host, or else GDB configure will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
@ -1387,6 +1393,9 @@ EOF
|
||||
x86_64:VMkernel:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-esx
|
||||
exit ;;
|
||||
amd64:Isilon\ OneFS:*:*)
|
||||
echo x86_64-unknown-onefs
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
cat >&2 <<EOF
|
||||
@ -1396,9 +1405,9 @@ This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
and
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
25
externals/breakpad/autotools/config.sub
vendored
25
externals/breakpad/autotools/config.sub
vendored
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2015-03-08'
|
||||
timestamp='2016-01-01'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -33,7 +33,7 @@ timestamp='2015-03-08'
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
@ -53,8 +53,7 @@ timestamp='2015-03-08'
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
$0 [OPTION] ALIAS
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
||||
|
||||
Canonicalize a configuration name.
|
||||
|
||||
@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
Copyright 1992-2016 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -255,6 +254,7 @@ case $basic_machine in
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| ba \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | c8051 | clipper \
|
||||
@ -305,7 +305,7 @@ case $basic_machine in
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
@ -376,6 +376,7 @@ case $basic_machine in
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| ba-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
@ -428,12 +429,13 @@ case $basic_machine in
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pyramid-* \
|
||||
| riscv32-* | riscv64-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
@ -518,7 +520,7 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
asmjs)
|
||||
asmjs)
|
||||
basic_machine=asmjs-unknown
|
||||
;;
|
||||
aux)
|
||||
@ -1376,7 +1378,7 @@ case $os in
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* | -cloudabi* \
|
||||
| -aos* | -aros* | -cloudabi* | -sortix* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
@ -1396,7 +1398,8 @@ case $os in
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
||||
| -onefs* | -tirtos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
2
externals/breakpad/autotools/depcomp
vendored
2
externals/breakpad/autotools/depcomp
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
354
externals/breakpad/autotools/install-sh
vendored
354
externals/breakpad/autotools/install-sh
vendored
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
@ -97,7 +82,7 @@ dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
@ -137,46 +122,57 @@ while test $# -ne 0; do
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
@ -207,6 +203,15 @@ if test $# -eq 0; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
@ -269,41 +274,15 @@ do
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
@ -314,74 +293,74 @@ do
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
@ -391,53 +370,51 @@ do
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -472,15 +449,12 @@ do
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
@ -493,24 +467,24 @@ do
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
|
2
externals/breakpad/autotools/missing
vendored
2
externals/breakpad/autotools/missing
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
15
externals/breakpad/autotools/test-driver
vendored
15
externals/breakpad/autotools/test-driver
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
|
||||
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -106,11 +106,14 @@ trap "st=143; $do_exit" 15
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
estatus=1
|
||||
tweaked_estatus=1
|
||||
else
|
||||
tweaked_estatus=$estatus
|
||||
fi
|
||||
|
||||
case $estatus:$expect_failure in
|
||||
case $tweaked_estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
@ -119,6 +122,12 @@ case $estatus:$expect_failure in
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report the test outcome and exit status in the logs, so that one can
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
|
1186
externals/breakpad/configure
vendored
1186
externals/breakpad/configure
vendored
File diff suppressed because it is too large
Load Diff
45
externals/breakpad/configure.ac
vendored
45
externals/breakpad/configure.ac
vendored
@ -41,6 +41,7 @@ AM_INIT_AUTOMAKE(subdir-objects tar-ustar 1.11.1)
|
||||
AM_CONFIG_HEADER(src/config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AM_PROG_AR
|
||||
AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
@ -75,6 +76,9 @@ m4_include(m4/ax_pthread.m4)
|
||||
AX_PTHREAD
|
||||
AC_CHECK_HEADERS([a.out.h])
|
||||
|
||||
m4_include(m4/ax_cxx_compile_stdcxx.m4)
|
||||
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
|
||||
|
||||
# Only build Linux client libs when compiling for Linux
|
||||
case $host in
|
||||
*-*-linux* | *-android* )
|
||||
@ -91,6 +95,14 @@ case $host in
|
||||
esac
|
||||
AM_CONDITIONAL(ANDROID_HOST, test x$ANDROID_HOST = xtrue)
|
||||
|
||||
# Some tools (like mac ones) only support x86 currently.
|
||||
case $host_cpu in
|
||||
i?86|x86_64)
|
||||
X86_HOST=true
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(X86_HOST, test x$X86_HOST = xtrue)
|
||||
|
||||
AC_ARG_ENABLE(processor,
|
||||
AS_HELP_STRING([--disable-processor],
|
||||
[Don't build processor library]
|
||||
@ -131,6 +143,39 @@ if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools
|
||||
AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(system-test-libs,
|
||||
AS_HELP_STRING([--enable-system-test-libs],
|
||||
[Use gtest/gmock/etc... from the system instead ]
|
||||
[of the local copies (default is local)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
system_test_libs=true
|
||||
;;
|
||||
no)
|
||||
system_test_libs=false
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --enable-system-test-libs)
|
||||
;;
|
||||
esac],
|
||||
[system_test_libs=false])
|
||||
AM_CONDITIONAL(SYSTEM_TEST_LIBS, test x$system_test_libs = xtrue)
|
||||
|
||||
AC_ARG_VAR([GMOCK_CONFIG], [Path to gmock-config script])
|
||||
AC_ARG_VAR([GMOCK_CFLAGS], [Compiler flags for gmock])
|
||||
AC_ARG_VAR([GMOCK_LIBS], [Linker flags for gmock])
|
||||
AC_ARG_VAR([GTEST_CONFIG], [Path to gtest-config script])
|
||||
AC_ARG_VAR([GTEST_CFLAGS], [Compiler flags for gtest])
|
||||
AC_ARG_VAR([GTEST_LIBS], [Linker flags for gtest])
|
||||
if test x$system_test_libs = xtrue; then
|
||||
AC_CHECK_TOOL([GMOCK_CONFIG], [gmock-config])
|
||||
AC_CHECK_TOOL([GTEST_CONFIG], [gtest-config])
|
||||
GMOCK_CFLAGS=`$GMOCK_CONFIG --cppflags --cxxflags`
|
||||
GMOCK_LIBS=`$GMOCK_CONFIG --ldflags --libs`
|
||||
GTEST_CFLAGS=`$GTEST_CONFIG --cppflags --cxxflags`
|
||||
GTEST_LIBS=`$GTEST_CONFIG --ldflags --libs`
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(selftest,
|
||||
AS_HELP_STRING([--enable-selftest],
|
||||
[Run extra tests with "make check" ]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user