1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-16 18:14:05 +02:00

#15 fix graphics settings

This commit is contained in:
XProger
2017-07-30 09:13:30 +03:00
parent 5d1d03f421
commit 40a218f855
2 changed files with 12 additions and 7 deletions

View File

@@ -19,12 +19,17 @@ namespace Game {
void init(Stream *lvl, Stream *snd) {
Core::init();
Core::settings.detail.ambient = false;
Core::settings.detail.ambient = true;
Core::settings.detail.lighting = true;
Core::settings.detail.shadows = false;
Core::settings.detail.shadows = true;
Core::settings.detail.water = Core::support.texFloat || Core::support.texHalf;
Core::settings.detail.contact = false;
#ifdef __RPI__
Core::settings.detail.ambient = false;
Core::settings.detail.shadows = false;
#endif
Core::settings.controls.retarget = true;
level = NULL;

View File

@@ -161,7 +161,7 @@ bool eglInit(EGL_DISPMANX_WINDOW_T &window, EGLDisplay &display, EGLSurface &sur
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE)
return false;
//eglSwapInterval(display, 0); // turn off vsync
return true;
@@ -288,7 +288,7 @@ bool inputInit() {
for (int i = 0; i < MAX_INPUT_DEVICES; i++)
inputDevices[i] = -1;
udevObj = udev_new();
if (!udevObj)
return false;
@@ -341,7 +341,7 @@ void inputUpdate() {
switch (e->type) {
case EV_KEY : {
InputKey key = codeToInputKey(e->code);
if (key == ikMouseL || key == ikMouseR || key == ikMouseM)
if (key == ikMouseL || key == ikMouseR || key == ikMouseM)
Input::setPos(key, Input::mouse.pos);
Input::setDown(key, e->value != 0);
break;
@@ -425,8 +425,8 @@ int main() {
home = getpwuid(getuid())->pw_dir;
strcat(Stream::cacheDir, home);
strcat(Stream::cacheDir, "/.OpenLara/");
struct stat st = {0};
struct stat st = {0};
if (stat(Stream::cacheDir, &st) == -1 && mkdir(Stream::cacheDir, 0777) == -1)
Stream::cacheDir[0] = 0;