All possible last minute changes and cleanup before release
This commit is contained in:
parent
bac4ee15ec
commit
f670a39787
|
@ -77,6 +77,7 @@
|
||||||
<string name="beta_site">Betas: http://reicast.loungekatt.com</string>
|
<string name="beta_site">Betas: http://reicast.loungekatt.com</string>
|
||||||
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
<string name="git_api">https://api.github.com/repos/reicast/reicast-emulator/commits</string>
|
||||||
<string name="git_issues">https://github.com/reicast/reicast-emulator/issues/</string>
|
<string name="git_issues">https://github.com/reicast/reicast-emulator/issues/</string>
|
||||||
|
<string name="log_url">http://twisted.dyndns.tv:3194/ReicastBot/report/submit.php</string>
|
||||||
|
|
||||||
<string-array name="controllers">
|
<string-array name="controllers">
|
||||||
<item>Controller A</item>
|
<item>Controller A</item>
|
||||||
|
|
|
@ -73,6 +73,7 @@ import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
@ -94,6 +95,7 @@ import android.widget.Toast;
|
||||||
|
|
||||||
import com.reicast.emulator.debug.GitAdapter;
|
import com.reicast.emulator.debug.GitAdapter;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class AboutFragment extends Fragment {
|
public class AboutFragment extends Fragment {
|
||||||
|
|
||||||
SlidingDrawer slidingGithub;
|
SlidingDrawer slidingGithub;
|
||||||
|
@ -153,6 +155,7 @@ public class AboutFragment extends Fragment {
|
||||||
slidingGithub = (SlidingDrawer) getView().findViewById(
|
slidingGithub = (SlidingDrawer) getView().findViewById(
|
||||||
R.id.slidingGithub);
|
R.id.slidingGithub);
|
||||||
slidingGithub.setOnDrawerOpenListener(new OnDrawerOpenListener() {
|
slidingGithub.setOnDrawerOpenListener(new OnDrawerOpenListener() {
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
public void onDrawerOpened() {
|
public void onDrawerOpened() {
|
||||||
String git = parentActivity.getString(R.string.git_api);
|
String git = parentActivity.getString(R.string.git_api);
|
||||||
retrieveGitTask queryGithub = new retrieveGitTask();
|
retrieveGitTask queryGithub = new retrieveGitTask();
|
||||||
|
@ -278,6 +281,7 @@ public class AboutFragment extends Fragment {
|
||||||
ArrayList<HashMap<String, String>> commitList) {
|
ArrayList<HashMap<String, String>> commitList) {
|
||||||
if (commitList != null && commitList.size() > 0) {
|
if (commitList != null && commitList.size() > 0) {
|
||||||
list = (ListView) getView().findViewById(R.id.list);
|
list = (ListView) getView().findViewById(R.id.list);
|
||||||
|
list.setSelector(R.drawable.list_selector);
|
||||||
list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
|
list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
|
||||||
adapter = new GitAdapter(parentActivity, commitList);
|
adapter = new GitAdapter(parentActivity, commitList);
|
||||||
// Set adapter as specified collection
|
// Set adapter as specified collection
|
||||||
|
|
|
@ -18,6 +18,7 @@ import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
@ -283,6 +284,8 @@ public class FileBrowser extends Fragment {
|
||||||
.setImageResource(R.drawable.open_folder);
|
.setImageResource(R.drawable.open_folder);
|
||||||
((TextView) headerView.findViewById(R.id.item_name))
|
((TextView) headerView.findViewById(R.id.item_name))
|
||||||
.setText(header_text);
|
.setText(header_text);
|
||||||
|
((TextView) headerView.findViewById(R.id.item_name))
|
||||||
|
.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
((ViewGroup) view).addView(headerView);
|
((ViewGroup) view).addView(headerView);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.io.InputStreamReader;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.reicast.emulator.R;
|
import com.reicast.emulator.R;
|
||||||
|
@ -90,7 +89,7 @@ public class GenerateLogs extends AsyncTask<String, Integer, String> {
|
||||||
/**
|
/**
|
||||||
* Read the output of a shell command
|
* Read the output of a shell command
|
||||||
*
|
*
|
||||||
* @param string
|
* @param command
|
||||||
* The shell command being issued to the terminal
|
* The shell command being issued to the terminal
|
||||||
*/
|
*/
|
||||||
public static String readOutput(String command) {
|
public static String readOutput(String command) {
|
||||||
|
@ -184,7 +183,7 @@ public class GenerateLogs extends AsyncTask<String, Integer, String> {
|
||||||
mLogcatProc = null;
|
mLogcatProc = null;
|
||||||
reader = null;
|
reader = null;
|
||||||
mLogcatProc = Runtime.getRuntime().exec(
|
mLogcatProc = Runtime.getRuntime().exec(
|
||||||
new String[] { "logcat", "-d", "GL3JNIView:E *:S" });
|
new String[] { "logcat", "-d", "GL2JNIView:E *:S" });
|
||||||
reader = new BufferedReader(new InputStreamReader(
|
reader = new BufferedReader(new InputStreamReader(
|
||||||
mLogcatProc.getInputStream()));
|
mLogcatProc.getInputStream()));
|
||||||
log.append(separator);
|
log.append(separator);
|
||||||
|
|
|
@ -58,6 +58,8 @@ package com.reicast.emulator.debug;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -74,7 +76,6 @@ import android.webkit.WebSettings;
|
||||||
import android.webkit.WebSettings.PluginState;
|
import android.webkit.WebSettings.PluginState;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
import android.webkit.WebViewDatabase;
|
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
@ -98,16 +99,14 @@ public class GitAdapter extends BaseAdapter {
|
||||||
this.data = d;
|
this.data = d;
|
||||||
this.inflater = (LayoutInflater) activity
|
this.inflater = (LayoutInflater) activity
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
ImageLoaderConfiguration configicon = new ImageLoaderConfiguration.Builder(activity)
|
ImageLoaderConfiguration configicon = new ImageLoaderConfiguration.Builder(
|
||||||
.memoryCacheExtraOptions(96, 96)
|
activity).memoryCacheExtraOptions(96, 96).build();
|
||||||
.build();
|
this.options = new DisplayImageOptions.Builder()
|
||||||
this.options = new DisplayImageOptions.Builder()
|
.showStubImage(R.drawable.ic_github)
|
||||||
.showStubImage(R.drawable.ic_github)
|
.showImageForEmptyUri(R.drawable.ic_github)
|
||||||
.showImageForEmptyUri(R.drawable.ic_github)
|
.imageScaleType(ImageScaleType.EXACTLY_STRETCHED).build();
|
||||||
.imageScaleType(ImageScaleType.EXACTLY_STRETCHED)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
ImageLoader.getInstance().init(configicon);
|
ImageLoader.getInstance().init(configicon);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +153,8 @@ public class GitAdapter extends BaseAdapter {
|
||||||
dateText.setText(date);
|
dateText.setText(date);
|
||||||
committerText.setText(committer);
|
committerText.setText(committer);
|
||||||
titleText.setText(title);
|
titleText.setText(title);
|
||||||
ImageLoader.getInstance().displayImage(avatar, avatarIcon, this.options);
|
ImageLoader.getInstance()
|
||||||
|
.displayImage(avatar, avatarIcon, this.options);
|
||||||
|
|
||||||
vi.setOnClickListener(new OnClickListener() {
|
vi.setOnClickListener(new OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -167,6 +167,7 @@ public class GitAdapter extends BaseAdapter {
|
||||||
|
|
||||||
return vi;
|
return vi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void displayCommit(String title, String message, String url,
|
public static void displayCommit(String title, String message, String url,
|
||||||
Context context) {
|
Context context) {
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||||
|
@ -187,19 +188,22 @@ public class GitAdapter extends BaseAdapter {
|
||||||
});
|
});
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public static WebView configureWebview(String url, Context context,
|
public static WebView configureWebview(String url, Context context,
|
||||||
WebView mWebView) {
|
WebView mWebView) {
|
||||||
mWebView.getSettings().setSupportZoom(true);
|
mWebView.getSettings().setSupportZoom(true);
|
||||||
mWebView.getSettings().setBuiltInZoomControls(true);
|
mWebView.getSettings().setBuiltInZoomControls(true);
|
||||||
if (Integer.parseInt(Build.VERSION.SDK) >= Build.VERSION_CODES.HONEYCOMB) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
mWebView.getSettings().setDisplayZoomControls(false);
|
mWebView.getSettings().setDisplayZoomControls(false);
|
||||||
}
|
}
|
||||||
mWebView.setInitialScale(1);
|
mWebView.setInitialScale(1);
|
||||||
if (Integer.parseInt(Build.VERSION.SDK) >= Build.VERSION_CODES.ECLAIR) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
|
||||||
mWebView.getSettings().setUseWideViewPort(true);
|
mWebView.getSettings().setUseWideViewPort(true);
|
||||||
}
|
}
|
||||||
if (Integer.parseInt(Build.VERSION.SDK) >= Build.VERSION_CODES.ECLAIR_MR1) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR_MR1) {
|
||||||
mWebView.getSettings().setLoadWithOverviewMode(true);
|
mWebView.getSettings().setLoadWithOverviewMode(true);
|
||||||
}
|
}
|
||||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||||
|
@ -208,13 +212,10 @@ public class GitAdapter extends BaseAdapter {
|
||||||
mWebView.clearHistory();
|
mWebView.clearHistory();
|
||||||
mWebView.clearFormData();
|
mWebView.clearFormData();
|
||||||
mWebView.clearCache(true);
|
mWebView.clearCache(true);
|
||||||
WebViewDatabase mDatabase = WebViewDatabase.getInstance(context);
|
|
||||||
mDatabase.clearUsernamePassword();
|
|
||||||
CookieSyncManager.createInstance(context);
|
CookieSyncManager.createInstance(context);
|
||||||
CookieManager cookieManager = CookieManager.getInstance();
|
CookieManager cookieManager = CookieManager.getInstance();
|
||||||
cookieManager.removeAllCookie();
|
cookieManager.removeAllCookie();
|
||||||
CookieSyncManager.getInstance().stopSync();
|
CookieSyncManager.getInstance().stopSync();
|
||||||
mWebView.getSettings().setSavePassword(false);
|
|
||||||
mWebView.setWebViewClient(new WebViewClient() {
|
mWebView.setWebViewClient(new WebViewClient() {
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import org.apache.http.message.BasicNameValuePair;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -28,9 +29,9 @@ import com.reicast.emulator.R;
|
||||||
/**
|
/**
|
||||||
* Upload the specialized logcat to reicast issues
|
* Upload the specialized logcat to reicast issues
|
||||||
*
|
*
|
||||||
* @param context
|
* @param mContext
|
||||||
* The context this method will be executed from
|
* The context this method will be executed from
|
||||||
* @param string
|
* @param currentTime
|
||||||
* The system time at which the log was made
|
* The system time at which the log was made
|
||||||
*/
|
*/
|
||||||
public class UploadLogs extends AsyncTask<String, Integer, Object> {
|
public class UploadLogs extends AsyncTask<String, Integer, Object> {
|
||||||
|
@ -60,7 +61,7 @@ public class UploadLogs extends AsyncTask<String, Integer, Object> {
|
||||||
/**
|
/**
|
||||||
* Set the URL for where the log will be uploaded
|
* Set the URL for where the log will be uploaded
|
||||||
*
|
*
|
||||||
* @param string
|
* @param logUrl
|
||||||
* The URL of the log upload server
|
* The URL of the log upload server
|
||||||
*/
|
*/
|
||||||
public void setPostUrl(String logUrl) {
|
public void setPostUrl(String logUrl) {
|
||||||
|
@ -70,7 +71,7 @@ public class UploadLogs extends AsyncTask<String, Integer, Object> {
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
if (logUrl == null || logUrl.equals(null)) {
|
if (logUrl == null || logUrl.equals(null)) {
|
||||||
logUrl = "http://twisted.dyndns.tv:3194/ReicastBot/report/submit.php";
|
logUrl = mContext.getString(R.string.log_url);
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
|
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
|
||||||
|
@ -79,6 +80,7 @@ public class UploadLogs extends AsyncTask<String, Integer, Object> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
@Override
|
@Override
|
||||||
protected Object doInBackground(String... params) {
|
protected Object doInBackground(String... params) {
|
||||||
HttpClient client = new DefaultHttpClient();
|
HttpClient client = new DefaultHttpClient();
|
||||||
|
@ -113,6 +115,8 @@ public class UploadLogs extends AsyncTask<String, Integer, Object> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Object response) {
|
protected void onPostExecute(Object response) {
|
||||||
if (response != null && !response.equals(null)) {
|
if (response != null && !response.equals(null)) {
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
package com.reicast.emulator.emu;
|
package com.reicast.emulator.emu;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.microedition.khronos.egl.EGL10;
|
import javax.microedition.khronos.egl.EGL10;
|
||||||
import javax.microedition.khronos.egl.EGLConfig;
|
import javax.microedition.khronos.egl.EGLConfig;
|
||||||
import javax.microedition.khronos.egl.EGLContext;
|
import javax.microedition.khronos.egl.EGLContext;
|
||||||
import javax.microedition.khronos.egl.EGLDisplay;
|
import javax.microedition.khronos.egl.EGLDisplay;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.opengl.EGL14;
|
import android.opengl.EGL14;
|
||||||
import android.opengl.EGLExt;
|
import android.opengl.EGLExt;
|
||||||
import android.opengl.GLSurfaceView;
|
import android.opengl.GLSurfaceView;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||||
public class GLCFactory6 {
|
public class GLCFactory6 {
|
||||||
|
|
||||||
private static void LOGI(String S) { Log.i("GL2JNIView-v6",S); }
|
private static void LOGI(String S) { Log.i("GL2JNIView-v6",S); }
|
||||||
|
@ -44,7 +49,7 @@ public class GLCFactory6 {
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
while((error=egl.eglGetError()) != EGL14.EGL_SUCCESS)
|
while((error=egl.eglGetError()) != EGL14.EGL_SUCCESS)
|
||||||
LOGE(String.format("%s: EGL error: 0x%x",prompt,error));
|
LOGE(String.format(Locale.getDefault(), "%s: EGL error: 0x%x",prompt,error));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ConfigChooser implements GLSurfaceView.EGLConfigChooser
|
public static class ConfigChooser implements GLSurfaceView.EGLConfigChooser
|
||||||
|
@ -93,7 +98,7 @@ public class GLCFactory6 {
|
||||||
EGL14.EGL_GREEN_SIZE, 4,
|
EGL14.EGL_GREEN_SIZE, 4,
|
||||||
EGL14.EGL_BLUE_SIZE, 4,
|
EGL14.EGL_BLUE_SIZE, 4,
|
||||||
EGL14.EGL_RENDERABLE_TYPE, renderableType,
|
EGL14.EGL_RENDERABLE_TYPE, renderableType,
|
||||||
EGL14.EGL_DEPTH_SIZE, 16,
|
EGL14.EGL_DEPTH_SIZE, 24,
|
||||||
EGL14.EGL_NONE
|
EGL14.EGL_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -113,7 +118,7 @@ public class GLCFactory6 {
|
||||||
// Get all matching configurations.
|
// Get all matching configurations.
|
||||||
EGLConfig[] configs = new EGLConfig[mValue[0]];
|
EGLConfig[] configs = new EGLConfig[mValue[0]];
|
||||||
if (GL2JNIView.DEBUG)
|
if (GL2JNIView.DEBUG)
|
||||||
LOGW(String.format("%d configurations", configs.length));
|
LOGW(String.format(Locale.getDefault(), "%d configurations", configs.length));
|
||||||
if (!egl.eglChooseConfig(display, configSpec, configs, mValue[0], mValue)) {
|
if (!egl.eglChooseConfig(display, configSpec, configs, mValue[0], mValue)) {
|
||||||
throw new IllegalArgumentException("Could not get config data");
|
throw new IllegalArgumentException("Could not get config data");
|
||||||
}
|
}
|
||||||
|
@ -235,7 +240,7 @@ public class GLCFactory6 {
|
||||||
|
|
||||||
for(int i=0 ; i<attributes.length ; i++)
|
for(int i=0 ; i<attributes.length ; i++)
|
||||||
if(egl.eglGetConfigAttrib(display,config,attributes[i],value))
|
if(egl.eglGetConfigAttrib(display,config,attributes[i],value))
|
||||||
LOGI(String.format(" %s: %d\n",names[i],value[0]));
|
LOGI(String.format(Locale.getDefault(), " %s: %d\n",names[i],value[0]));
|
||||||
else
|
else
|
||||||
while(egl.eglGetError()!=EGL14.EGL_SUCCESS);
|
while(egl.eglGetError()!=EGL14.EGL_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class JNIdc
|
||||||
public static native int send(int cmd, int opt);
|
public static native int send(int cmd, int opt);
|
||||||
public static native int data(int cmd, byte[] data);
|
public static native int data(int cmd, byte[] data);
|
||||||
|
|
||||||
public static native void rendinit(int w,int y);
|
public static native void rendinit(int w, int y);
|
||||||
public static native void rendframe();
|
public static native void rendframe();
|
||||||
|
|
||||||
public static native void kcode(int[] kcode, int[] lt, int[] rt, int[] jx, int[] jy);
|
public static native void kcode(int[] kcode, int[] lt, int[] rt, int[] jx, int[] jy);
|
||||||
|
|
Loading…
Reference in New Issue