1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-13 16:44:50 +02:00
This commit is contained in:
XProger
2019-03-15 00:18:26 +03:00
2 changed files with 9 additions and 9 deletions

View File

@@ -7,11 +7,11 @@ GIT_COMMIT=$(echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- |
# Build Rules # Build Rules
[ -z "CXX" ] && CXX="arm-linux-gnueabihf-g++-8" [ -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" 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__" DEFINES="-DNDEBUG -D__PSC__"
SRC="main.cpp ../../libs/stb_vorbis/stb_vorbis.c ../../libs/minimp3/minimp3.cpp ../../libs/tinf/tinflate.c" 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../../" 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" TARGET="-o../../../bin/OpenLara"
clear clear

View File

@@ -142,9 +142,9 @@ EGLContext context;
// Wayland Listeners // Wayland Listeners
void wlEventObjectAdd(void* data, wl_registry* registry, uint32_t name, const char* interface, uint32_t version) { void wlEventObjectAdd(void* data, wl_registry* registry, uint32_t name, const char* interface, uint32_t version) {
if (!strcmp(interface, "wl_compositor")) { 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")) { } 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);
} }
} }
@@ -200,7 +200,7 @@ bool eglInit() {
EGL_NONE EGL_NONE
}; };
display = eglGetDisplay(wlDisplay); display = eglGetDisplay((EGLNativeDisplayType)wlDisplay);;
if (display == EGL_NO_DISPLAY) { if (display == EGL_NO_DISPLAY) {
LOG("eglGetDisplay = EGL_NO_DISPLAY\n"); LOG("eglGetDisplay = EGL_NO_DISPLAY\n");
return false; return false;
@@ -254,7 +254,7 @@ void eglFree() {
eglDestroySurface(display, surface); eglDestroySurface(display, surface);
wl_egl_window_destroy(wlEGLWindow); wl_egl_window_destroy(wlEGLWindow);
wl_shell_surface_destroy(wlShellSurface); wl_shell_surface_destroy(wlShellSurface);
wl_surface_destroy(wlSurface) wl_surface_destroy(wlSurface);
eglDestroyContext(display, context); eglDestroyContext(display, context);
eglTerminate(display); eglTerminate(display);
wl_display_disconnect(wlDisplay); wl_display_disconnect(wlDisplay);
@@ -585,8 +585,8 @@ int main(int argc, char **argv) {
return -1; return -1;
} }
Core::width = fb.width; //Core::width = fb.width;
Core::height = fb.height; //Core::height = fb.height;
cacheDir[0] = saveDir[0] = contentDir[0] = 0; cacheDir[0] = saveDir[0] = contentDir[0] = 0;
@@ -603,7 +603,7 @@ int main(int argc, char **argv) {
strcpy(cacheDir, contentDir); strcpy(cacheDir, contentDir);
strcat(cacheDir, "cache/"); strcat(cacheDir, "cache/");
stat st = {0}; struct stat st = {0};
if (stat(cacheDir, &st) == -1 && mkdir(cacheDir, 0777) == -1) if (stat(cacheDir, &st) == -1 && mkdir(cacheDir, 0777) == -1)
cacheDir[0] = 0; cacheDir[0] = 0;