mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
OpenXR - Enable 6DoF mode when in game
This commit is contained in:
parent
b1e3d8beb3
commit
7a787bd6bf
@ -96,6 +96,10 @@ using namespace std::placeholders;
|
||||
static AVIDump avi;
|
||||
#endif
|
||||
|
||||
#ifdef OPENXR
|
||||
#include <VR/VRRenderer.h>
|
||||
#endif
|
||||
|
||||
// TODO: Ugly!
|
||||
static bool frameStep_;
|
||||
static int lastNumFlips;
|
||||
@ -821,6 +825,9 @@ protected:
|
||||
};
|
||||
|
||||
void EmuScreen::CreateViews() {
|
||||
#ifdef OPENXR
|
||||
VR_SetMode(VR_MODE_MONO_6DOF);
|
||||
#endif
|
||||
using namespace UI;
|
||||
|
||||
auto dev = GetI18NCategory("Developer");
|
||||
|
@ -48,6 +48,10 @@
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
#include "UI/GameInfoCache.h"
|
||||
|
||||
#ifdef OPENXR
|
||||
#include <VR/VRRenderer.h>
|
||||
#endif
|
||||
|
||||
AsyncImageFileView::AsyncImageFileView(const Path &filename, UI::ImageSizeMode sizeMode, UI::LayoutParams *layoutParams)
|
||||
: UI::Clickable(layoutParams), canFocus_(true), filename_(filename), color_(0xFFFFFFFF), sizeMode_(sizeMode), textureFailed_(false), fixedSizeW_(0.0f), fixedSizeH_(0.0f) {}
|
||||
|
||||
@ -364,6 +368,10 @@ GamePauseScreen::~GamePauseScreen() {
|
||||
}
|
||||
|
||||
void GamePauseScreen::CreateViews() {
|
||||
#ifdef OPENXR
|
||||
VR_SetMode(VR_MODE_FLAT_SCREEN);
|
||||
#endif
|
||||
|
||||
static const int NUM_SAVESLOTS = 5;
|
||||
|
||||
using namespace UI;
|
||||
|
@ -422,6 +422,10 @@ void VR_EndFrame( engine_t* engine ) {
|
||||
}
|
||||
}
|
||||
|
||||
void VR_SetMode( VRMode mode ) {
|
||||
vrMode = mode;
|
||||
}
|
||||
|
||||
void VR_BindFramebuffer( engine_t* engine, int eye ) {
|
||||
if (!initialized) return;
|
||||
ovrFramebuffer* frameBuffer = &engine->appState.Renderer.FrameBuffer[eye];
|
||||
|
Loading…
Reference in New Issue
Block a user