move UI plane when toggled in VR, fix vr start/stop on Quest
This commit is contained in:
@@ -492,6 +492,10 @@ static int engine_init_display(struct engine* engine) {
|
||||
g_display = display;
|
||||
g_context = context;
|
||||
|
||||
#ifdef __QUEST__
|
||||
oculus_init_vr(display, context, engine->app->window);
|
||||
#endif
|
||||
|
||||
if (resuming_context)
|
||||
{
|
||||
LOG("RESUME APP");
|
||||
@@ -588,9 +592,6 @@ static int engine_init_display(struct engine* engine) {
|
||||
LOG("PROP Brand: %s", os_props["ro.product.brand"].c_str());
|
||||
LOG("PROP Maker: %s", os_props["ro.product.manufacturer"].c_str());
|
||||
LOG("PROP Mode: %s", os_props["ro.product.model"].c_str());
|
||||
//LOG("PROP: %s", os_props[""].c_str());
|
||||
//LOG("PROP: %s", os_props[""].c_str());
|
||||
//LOG("PROP: %s", os_props[""].c_str());
|
||||
|
||||
// Initialize GL state.
|
||||
|
||||
@@ -619,7 +620,6 @@ static int engine_init_display(struct engine* engine) {
|
||||
App::I.redraw = true;
|
||||
App::I.init();
|
||||
App::I.resize(1024, 1024);
|
||||
oculus_init_vr(display, context, engine->app->window);
|
||||
App::I.vr_active = true;
|
||||
App::I.has_vr = true;
|
||||
App::I.vr_only = true;
|
||||
@@ -706,6 +706,9 @@ static void engine_term_display(struct engine* engine) {
|
||||
engine->display = EGL_NO_DISPLAY;
|
||||
engine->context = EGL_NO_CONTEXT;
|
||||
engine->surface = EGL_NO_SURFACE;
|
||||
#ifdef __QUEST__
|
||||
oculus_release_vr();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user