diff --git a/Projects/Android/AndroidManifest.xml b/Projects/Android/AndroidManifest.xml index e0ed84a..bb844c1 100644 --- a/Projects/Android/AndroidManifest.xml +++ b/Projects/Android/AndroidManifest.xml @@ -1,8 +1,8 @@ + package="com.drbeef.questzdoom" + android:versionCode="2" + android:versionName="0.1.0" android:installLocation="auto" > @@ -24,7 +24,7 @@ - + diff --git a/Projects/Android/build.gradle b/Projects/Android/build.gradle index d3bc797..489d75d 100644 --- a/Projects/Android/build.gradle +++ b/Projects/Android/build.gradle @@ -6,7 +6,7 @@ android { // -debug.apk or -release.apk appended to it. // The filename doesn't effect the Android installation process. // Use only letters to remain compatible with the package name. - project.archivesBaseName = "qzdoom" + project.archivesBaseName = "questzdoom" defaultConfig { // Gradle replaces the manifest package with this value, which must diff --git a/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c b/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c index 2cd0b35..a28bc35 100644 --- a/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c +++ b/Projects/Android/jni/QzDoom/QzDoom_SurfaceView.c @@ -1474,7 +1474,7 @@ void * AppThreadFunction(void * parm ) { // Create the scene if not yet created. ovrScene_Create( m_width, m_height, &gAppState.Scene, &java ); - chdir("/sdcard/QzDoom"); + chdir("/sdcard/QuestZDoom"); //Run loading loop until we are ready to start QzDoom while (!destroyed && !qzdoom_initialised) { @@ -1733,7 +1733,7 @@ int JNI_OnLoad(JavaVM* vm, void* reserved) return JNI_VERSION_1_4; } -JNIEXPORT jlong JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onCreate( JNIEnv * env, jclass activityClass, jobject activity, +JNIEXPORT jlong JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onCreate( JNIEnv * env, jclass activityClass, jobject activity, jstring commandLineParams) { ALOGV( " GLES3JNILib::onCreate()" ); @@ -1796,7 +1796,7 @@ JNIEXPORT jlong JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onCreate( JNIEnv * en } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onStart( JNIEnv * env, jobject obj, jlong handle) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onStart( JNIEnv * env, jobject obj, jlong handle) { ALOGV( " GLES3JNILib::onStart()" ); @@ -1806,7 +1806,7 @@ JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onStart( JNIEnv * env, ovrMessageQueue_PostMessage( &appThread->MessageQueue, &message ); } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onResume( JNIEnv * env, jobject obj, jlong handle ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onResume( JNIEnv * env, jobject obj, jlong handle ) { ALOGV( " GLES3JNILib::onResume()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); @@ -1815,7 +1815,7 @@ JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onResume( JNIEnv * env ovrMessageQueue_PostMessage( &appThread->MessageQueue, &message ); } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onPause( JNIEnv * env, jobject obj, jlong handle ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onPause( JNIEnv * env, jobject obj, jlong handle ) { ALOGV( " GLES3JNILib::onPause()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); @@ -1824,7 +1824,7 @@ JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onPause( JNIEnv * env, ovrMessageQueue_PostMessage( &appThread->MessageQueue, &message ); } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onStop( JNIEnv * env, jobject obj, jlong handle ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onStop( JNIEnv * env, jobject obj, jlong handle ) { ALOGV( " GLES3JNILib::onStop()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); @@ -1833,7 +1833,7 @@ JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onStop( JNIEnv * env, ovrMessageQueue_PostMessage( &appThread->MessageQueue, &message ); } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onDestroy( JNIEnv * env, jobject obj, jlong handle ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onDestroy( JNIEnv * env, jobject obj, jlong handle ) { ALOGV( " GLES3JNILib::onDestroy()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); @@ -1854,7 +1854,7 @@ Surface lifecycle ================================================================================ */ -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onSurfaceCreated( JNIEnv * env, jobject obj, jlong handle, jobject surface ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onSurfaceCreated( JNIEnv * env, jobject obj, jlong handle, jobject surface ) { ALOGV( " GLES3JNILib::onSurfaceCreated()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); @@ -1877,7 +1877,7 @@ JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onSurfaceCreated( JNIE ovrMessageQueue_PostMessage( &appThread->MessageQueue, &message ); } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onSurfaceChanged( JNIEnv * env, jobject obj, jlong handle, jobject surface ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onSurfaceChanged( JNIEnv * env, jobject obj, jlong handle, jobject surface ) { ALOGV( " GLES3JNILib::onSurfaceChanged()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); @@ -1919,7 +1919,7 @@ JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onSurfaceChanged( JNIE } } -JNIEXPORT void JNICALL Java_com_drbeef_qzdoom_GLES3JNILib_onSurfaceDestroyed( JNIEnv * env, jobject obj, jlong handle ) +JNIEXPORT void JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onSurfaceDestroyed( JNIEnv * env, jobject obj, jlong handle ) { ALOGV( " GLES3JNILib::onSurfaceDestroyed()" ); ovrAppThread * appThread = (ovrAppThread *)((size_t)handle); diff --git a/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/d_main.cpp b/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/d_main.cpp index b183461..3b93973 100644 --- a/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/d_main.cpp +++ b/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/d_main.cpp @@ -2344,7 +2344,7 @@ FArgs *Args; void VR_DoomMain(int argc, char** argv) { - progdir = "/sdcard/QzDoom/"; + progdir = "/sdcard/QuestZDoom/"; Args = new FArgs(argc, argv); C_InitConsole (80*8, 25*8, false); D_DoomMain (); diff --git a/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/posix/nosdl/glvideo.cpp b/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/posix/nosdl/glvideo.cpp index e7f86a7..eb2e76a 100644 --- a/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/posix/nosdl/glvideo.cpp +++ b/Projects/Android/jni/gzdoom-g3.3mgw_mobile/src/posix/nosdl/glvideo.cpp @@ -165,7 +165,7 @@ DFrameBuffer *NoSDLGLVideo::CreateFrameBuffer (int width, int height, bool bgra, NoSDLBaseFB *fb; const char *hwBuffers = Args->CheckValue("-hwbuffers"); - int buffers = 2; + int buffers = 4; if (hwBuffers) { buffers = atoi(hwBuffers); diff --git a/java/com/drbeef/qzdoom/GLES3JNIActivity.java b/java/com/drbeef/questzdoom/GLES3JNIActivity.java similarity index 86% rename from java/com/drbeef/qzdoom/GLES3JNIActivity.java rename to java/com/drbeef/questzdoom/GLES3JNIActivity.java index 9eca7e8..c908e08 100644 --- a/java/com/drbeef/qzdoom/GLES3JNIActivity.java +++ b/java/com/drbeef/questzdoom/GLES3JNIActivity.java @@ -1,5 +1,5 @@ -package com.drbeef.qzdoom; +package com.drbeef.questzdoom; import java.io.BufferedReader; @@ -10,7 +10,6 @@ import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.nio.ByteBuffer; import android.Manifest; import android.annotation.SuppressLint; @@ -18,24 +17,17 @@ import android.app.Activity; import android.content.pm.PackageManager; import android.content.res.AssetManager; -import android.media.AudioFormat; -import android.media.AudioManager; import android.media.AudioRecord; import android.media.AudioTrack; -import android.media.MediaRecorder; import android.os.Bundle; -import android.os.SystemClock; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.WindowManager; -import android.view.KeyEvent; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; -import static android.system.Os.setenv; - @SuppressLint("SdCardPath") public class GLES3JNIActivity extends Activity implements SurfaceHolder.Callback { // Load the gles3jni library right away to make sure JNI_OnLoad() gets called as the very first thing. @@ -44,7 +36,7 @@ import static android.system.Os.setenv; System.loadLibrary( "qzdoom" ); } - private static final String TAG = "QzDoom"; + private static final String TAG = "QuestZDoom"; private int permissionCount = 0; private static final int READ_EXTERNAL_STORAGE_PERMISSION_ID = 1; @@ -161,31 +153,31 @@ import static android.system.Os.setenv; public void create() { - copy_asset("/sdcard/QzDoom", "commandline.txt"); + copy_asset("/sdcard/QuestZDoom", "commandline.txt"); //Create all required folders - new File("/sdcard/QzDoom/res").mkdirs(); - new File("/sdcard/QzDoom/mods").mkdirs(); - new File("/sdcard/QzDoom/audiopack/snd_fluidsynth").mkdirs(); + new File("/sdcard/QuestZDoom/res").mkdirs(); + new File("/sdcard/QuestZDoom/mods").mkdirs(); + new File("/sdcard/QuestZDoom/audiopack/snd_fluidsynth").mkdirs(); - copy_asset("/sdcard/QzDoom", "res/lzdoom.pk3"); - copy_asset("/sdcard/QzDoom", "res/lz_game_support.pk3"); - copy_asset("/sdcard/QzDoom", "res/lights.pk3"); - copy_asset("/sdcard/QzDoom", "res/brightmaps.pk3"); - copy_asset("/sdcard/QzDoom/audiopack", "snd_fluidsynth/fluidsynth.sf2"); + copy_asset("/sdcard/QuestZDoom", "res/lzdoom.pk3"); + copy_asset("/sdcard/QuestZDoom", "res/lz_game_support.pk3"); + copy_asset("/sdcard/QuestZDoom", "res/lights.pk3"); + copy_asset("/sdcard/QuestZDoom", "res/brightmaps.pk3"); + copy_asset("/sdcard/QuestZDoom/audiopack", "snd_fluidsynth/fluidsynth.sf2"); //Doom Sharware WAD - copy_asset("/sdcard/QzDoom", "wads/DOOM1.WAD"); + copy_asset("/sdcard/QuestZDoom", "wads/DOOM1.WAD"); //Read these from a file and pass through commandLineParams = new String("doom"); //See if user is trying to use command line params - if(new File("/sdcard/QzDoom/commandline.txt").exists()) // should exist! + if(new File("/sdcard/QuestZDoom/commandline.txt").exists()) // should exist! { BufferedReader br; try { - br = new BufferedReader(new FileReader("/sdcard/QzDoom/commandline.txt")); + br = new BufferedReader(new FileReader("/sdcard/QuestZDoom/commandline.txt")); String s; StringBuilder sb=new StringBuilder(0); while ((s=br.readLine())!=null) @@ -202,14 +194,6 @@ import static android.system.Os.setenv; } } - try { - //setenv("YQUAKE2_GAMELIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true); - } - catch (Exception e) - { - - } - mNativeHandle = GLES3JNILib.onCreate( this, commandLineParams ); } diff --git a/java/com/drbeef/qzdoom/GLES3JNILib.java b/java/com/drbeef/questzdoom/GLES3JNILib.java similarity index 92% rename from java/com/drbeef/qzdoom/GLES3JNILib.java rename to java/com/drbeef/questzdoom/GLES3JNILib.java index f2774da..1f27704 100644 --- a/java/com/drbeef/qzdoom/GLES3JNILib.java +++ b/java/com/drbeef/questzdoom/GLES3JNILib.java @@ -1,11 +1,9 @@ -package com.drbeef.qzdoom; +package com.drbeef.questzdoom; import android.app.Activity; import android.view.Surface; -import java.nio.ByteBuffer; - // Wrapper for native library public class GLES3JNILib diff --git a/res/values/strings.xml b/res/values/strings.xml index 6e48d11..ea0a61e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5,6 +5,6 @@ - QzDoom + QuestZDoom