add focus project, fix recovery save on ui thread, fix grid commit, wave_sdk submodule, use PlatformActivity as base for android/quest/focus and extend VRActivity on focus.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <android/window.h>
|
||||
#include <android/asset_manager_jni.h>
|
||||
#include <sys/prctl.h> // for prctl( PR_SET_NAME )
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -37,6 +38,8 @@
|
||||
|
||||
#ifdef __QUEST__
|
||||
#include "oculus_vr.h"
|
||||
#elif __FOCUS__
|
||||
#include "wave_vr.h"
|
||||
#endif
|
||||
|
||||
typedef void (*GLDEBUGPROC)(GLenum source,
|
||||
@@ -234,6 +237,13 @@ std::function<void(std::string)> pick_file_callback;
|
||||
std::function<void()> pick_file_callback_context;
|
||||
extern "C"
|
||||
{
|
||||
#ifdef __FOCUS__
|
||||
JNIEXPORT void JNICALL Java_com_omixlab_panopainter_MainActivity_init_vr(JNIEnv *env, jobject activity, jobject am)
|
||||
{
|
||||
Asset::m_am = AAssetManager_fromJava(env, am);
|
||||
wave_init(0, 0, 0);
|
||||
}
|
||||
#endif
|
||||
JNIEXPORT void JNICALL Java_com_omixlab_panopainter_MainActivity_pickFileCallback(JNIEnv *env, jobject, jstring path)
|
||||
{
|
||||
const char* path_utf = env->GetStringUTFChars(path, nullptr);
|
||||
@@ -538,6 +548,8 @@ static int engine_init_display(struct engine* engine) {
|
||||
|
||||
#ifdef __QUEST__
|
||||
oculus_init_vr(display, context, engine->app->window);
|
||||
#elif __FOCUS__
|
||||
wave_init_vr(display, context, engine->app->window);
|
||||
#endif
|
||||
|
||||
if (resuming_context)
|
||||
@@ -663,7 +675,7 @@ static int engine_init_display(struct engine* engine) {
|
||||
#else
|
||||
float density = get_display_density();
|
||||
LOG("density %f", density);
|
||||
App::I->zoom = density;// / 1.5;
|
||||
App::I->zoom = density / 1.5;
|
||||
App::I->width = w;
|
||||
App::I->height = h;
|
||||
App::I->redraw = true;
|
||||
@@ -1017,6 +1029,8 @@ void android_main(struct android_app* state) {
|
||||
|
||||
#ifdef __QUEST__
|
||||
oculus_init(state->activity->vm, jni, state->activity->clazz);
|
||||
#elif __FOCUS__
|
||||
wave_init(state->activity->vm, jni, state->activity->clazz);
|
||||
#endif
|
||||
|
||||
// Note that AttachCurrentThread will reset the thread name.
|
||||
|
||||
Reference in New Issue
Block a user