mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-05 12:47:53 +02:00
fixed #212
This commit is contained in:
15
src/core.h
15
src/core.h
@@ -22,11 +22,16 @@
|
|||||||
|
|
||||||
#undef OS_PTHREAD_MT
|
#undef OS_PTHREAD_MT
|
||||||
|
|
||||||
|
#ifdef _GAPI_GL
|
||||||
|
#define VR_SUPPORT
|
||||||
|
#endif
|
||||||
#elif ANDROID
|
#elif ANDROID
|
||||||
#define _OS_ANDROID 1
|
#define _OS_ANDROID 1
|
||||||
#define _GAPI_GL 1
|
#define _GAPI_GL 1
|
||||||
#define _GAPI_GLES 1
|
#define _GAPI_GLES 1
|
||||||
//#define _GAPI_VULKAN
|
//#define _GAPI_VULKAN
|
||||||
|
|
||||||
|
#define VR_SUPPORT
|
||||||
#elif __SDL2__
|
#elif __SDL2__
|
||||||
#define _GAPI_GL 1
|
#define _GAPI_GL 1
|
||||||
#ifdef SDL2_GLES
|
#ifdef SDL2_GLES
|
||||||
@@ -127,8 +132,6 @@
|
|||||||
#define SHADOW_TEX_SIZE 2048
|
#define SHADOW_TEX_SIZE 2048
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void osToggleVR(bool enable);
|
|
||||||
|
|
||||||
extern void* osMutexInit ();
|
extern void* osMutexInit ();
|
||||||
extern void osMutexFree (void *obj);
|
extern void osMutexFree (void *obj);
|
||||||
extern void osMutexLock (void *obj);
|
extern void osMutexLock (void *obj);
|
||||||
@@ -330,6 +333,14 @@ namespace Core {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VR_SUPPORT
|
||||||
|
extern void osToggleVR(bool enable);
|
||||||
|
#else
|
||||||
|
void osToggleVR(bool enable) {
|
||||||
|
Core::settings.detail.stereo = Core::Settings::STEREO_OFF;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
struct TimingCPU {
|
struct TimingCPU {
|
||||||
int &result;
|
int &result;
|
||||||
|
@@ -130,10 +130,6 @@ void osJoyVibrate(int index, float L, float R) {
|
|||||||
joyDevice[index].vR = R;
|
joyDevice[index].vR = R;
|
||||||
}
|
}
|
||||||
|
|
||||||
void osToggleVR(bool enable) {
|
|
||||||
Core::settings.detail.stereo = Core::Settings::STEREO_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
void joyInit() {
|
void joyInit() {
|
||||||
LOG("init gamepads:\n");
|
LOG("init gamepads:\n");
|
||||||
char name[128];
|
char name[128];
|
||||||
|
@@ -103,10 +103,6 @@ void osJoyVibrate(int index, float L, float R) {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void osToggleVR(bool enable) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isKeyPressed (SDL_Scancode scancode) {
|
bool isKeyPressed (SDL_Scancode scancode) {
|
||||||
const Uint8 *state = SDL_GetKeyboardState(NULL);
|
const Uint8 *state = SDL_GetKeyboardState(NULL);
|
||||||
if (state[scancode]) {
|
if (state[scancode]) {
|
||||||
|
@@ -661,10 +661,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
|
|||||||
}
|
}
|
||||||
|
|
||||||
//VR Support
|
//VR Support
|
||||||
#ifdef _GAPI_GL
|
|
||||||
#define VR_SUPPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VR_SUPPORT
|
#ifdef VR_SUPPORT
|
||||||
// TODO: fix depth precision
|
// TODO: fix depth precision
|
||||||
// TODO: fix water surface rendering
|
// TODO: fix water surface rendering
|
||||||
@@ -886,10 +882,6 @@ void osToggleVR(bool enable) {
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
void osToggleVR(bool enable) {
|
|
||||||
Core::settings.detail.stereo = Core::Settings::STEREO_OFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vrUpdate() {}
|
void vrUpdate() {}
|
||||||
void vrCompose() {}
|
void vrCompose() {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user