mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-17 18:36:43 +02:00
#15 fix graphics settings
This commit is contained in:
@@ -19,12 +19,17 @@ namespace Game {
|
|||||||
void init(Stream *lvl, Stream *snd) {
|
void init(Stream *lvl, Stream *snd) {
|
||||||
Core::init();
|
Core::init();
|
||||||
|
|
||||||
Core::settings.detail.ambient = false;
|
Core::settings.detail.ambient = true;
|
||||||
Core::settings.detail.lighting = 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.water = Core::support.texFloat || Core::support.texHalf;
|
||||||
Core::settings.detail.contact = false;
|
Core::settings.detail.contact = false;
|
||||||
|
|
||||||
|
#ifdef __RPI__
|
||||||
|
Core::settings.detail.ambient = false;
|
||||||
|
Core::settings.detail.shadows = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
Core::settings.controls.retarget = true;
|
Core::settings.controls.retarget = true;
|
||||||
|
|
||||||
level = NULL;
|
level = NULL;
|
||||||
|
@@ -161,7 +161,7 @@ bool eglInit(EGL_DISPMANX_WINDOW_T &window, EGLDisplay &display, EGLSurface &sur
|
|||||||
|
|
||||||
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE)
|
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//eglSwapInterval(display, 0); // turn off vsync
|
//eglSwapInterval(display, 0); // turn off vsync
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -288,7 +288,7 @@ bool inputInit() {
|
|||||||
|
|
||||||
for (int i = 0; i < MAX_INPUT_DEVICES; i++)
|
for (int i = 0; i < MAX_INPUT_DEVICES; i++)
|
||||||
inputDevices[i] = -1;
|
inputDevices[i] = -1;
|
||||||
|
|
||||||
udevObj = udev_new();
|
udevObj = udev_new();
|
||||||
if (!udevObj)
|
if (!udevObj)
|
||||||
return false;
|
return false;
|
||||||
@@ -341,7 +341,7 @@ void inputUpdate() {
|
|||||||
switch (e->type) {
|
switch (e->type) {
|
||||||
case EV_KEY : {
|
case EV_KEY : {
|
||||||
InputKey key = codeToInputKey(e->code);
|
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::setPos(key, Input::mouse.pos);
|
||||||
Input::setDown(key, e->value != 0);
|
Input::setDown(key, e->value != 0);
|
||||||
break;
|
break;
|
||||||
@@ -425,8 +425,8 @@ int main() {
|
|||||||
home = getpwuid(getuid())->pw_dir;
|
home = getpwuid(getuid())->pw_dir;
|
||||||
strcat(Stream::cacheDir, home);
|
strcat(Stream::cacheDir, home);
|
||||||
strcat(Stream::cacheDir, "/.OpenLara/");
|
strcat(Stream::cacheDir, "/.OpenLara/");
|
||||||
|
|
||||||
struct stat st = {0};
|
struct stat st = {0};
|
||||||
if (stat(Stream::cacheDir, &st) == -1 && mkdir(Stream::cacheDir, 0777) == -1)
|
if (stat(Stream::cacheDir, &st) == -1 && mkdir(Stream::cacheDir, 0777) == -1)
|
||||||
Stream::cacheDir[0] = 0;
|
Stream::cacheDir[0] = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user