Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/XProger/OpenLara
Browse files Browse the repository at this point in the history
  • Loading branch information
XProger committed Mar 14, 2019
2 parents 3d5fc24 + c9a5582 commit 193c6c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/platform/psc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ GIT_COMMIT=$(echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- |
# Build Rules
[ -z "CXX" ] && CXX="arm-linux-gnueabihf-g++-8"
CFLAGS="-std=c++11 -Os -s -g -marm -march=armv8-a -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections"
LDFLAGS="-Wl,--gc-sections -Wno-invalid-source-encoding -static-libgcc -static-libstdc++"
LDFLAGS="-Wl,--gc-sections -static-libgcc -static-libstdc++"
DEFINES="-DNDEBUG -D__PSC__"
SRC="main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c"
INCLUDES="-I/usr/arm-linux-gnueabihf/include/ -I../../"
LIBS="-L$LD_LIBRARY_PATH -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev"
LIBS="-L$LD_LIBRARY_PATH -lGLESv2 -lEGL -lm -lrt -lpthread -lasound -ludev -lwayland-client -lwayland-egl"
TARGET="-o../../../bin/OpenLara"

clear
Expand Down
14 changes: 7 additions & 7 deletions src/platform/psc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ EGLContext context;
// Wayland Listeners
void wlEventObjectAdd(void* data, wl_registry* registry, uint32_t name, const char* interface, uint32_t version) {
if (!strcmp(interface, "wl_compositor")) {
wlCompositor = wl_registry_bind(registry, name, &wl_compositor_interface, 1);
wlCompositor = (wl_compositor*)wl_registry_bind(registry, name, &wl_compositor_interface, 1);
} else if (!strcmp(interface, "wl_shell")) {
wlShell = wl_registry_bind(registry, name, &wl_shell_interface, 1);
wlShell = (wl_shell*)wl_registry_bind(registry, name, &wl_shell_interface, 1);
}
}

Expand Down Expand Up @@ -200,7 +200,7 @@ bool eglInit() {
EGL_NONE
};

display = eglGetDisplay(wlDisplay);
display = eglGetDisplay((EGLNativeDisplayType)wlDisplay);;
if (display == EGL_NO_DISPLAY) {
LOG("eglGetDisplay = EGL_NO_DISPLAY\n");
return false;
Expand Down Expand Up @@ -254,7 +254,7 @@ void eglFree() {
eglDestroySurface(display, surface);
wl_egl_window_destroy(wlEGLWindow);
wl_shell_surface_destroy(wlShellSurface);
wl_surface_destroy(wlSurface)
wl_surface_destroy(wlSurface);
eglDestroyContext(display, context);
eglTerminate(display);
wl_display_disconnect(wlDisplay);
Expand Down Expand Up @@ -585,8 +585,8 @@ int main(int argc, char **argv) {
return -1;
}

Core::width = fb.width;
Core::height = fb.height;
//Core::width = fb.width;
//Core::height = fb.height;

cacheDir[0] = saveDir[0] = contentDir[0] = 0;

Expand All @@ -603,7 +603,7 @@ int main(int argc, char **argv) {
strcpy(cacheDir, contentDir);
strcat(cacheDir, "cache/");

stat st = {0};
struct stat st = {0};
if (stat(cacheDir, &st) == -1 && mkdir(cacheDir, 0777) == -1)
cacheDir[0] = 0;

Expand Down

0 comments on commit 193c6c9

Please sign in to comment.