All: Pandora buildfixes
Jeffrey Pfau jeffrey@endrift.com
Sun, 11 Oct 2015 23:59:48 -0700
3 files changed,
27 insertions(+),
10 deletions(-)
M
src/platform/posix/threading.h
→
src/platform/posix/threading.h
@@ -82,8 +82,11 @@ return pthread_setname_np(name);
#elif defined(__FreeBSD__) || defined(__OpenBSD__) pthread_set_name_np(pthread_self(), name); return 0; +#elif !defined(BUILD_PANDORA) // Pandora's glibc is too old + return pthread_setname_np(pthread_self(), name); #else - return pthread_setname_np(pthread_self(), name); + UNUSED(name); + return 0; #endif }
M
src/platform/sdl/CMakeLists.txt
→
src/platform/sdl/CMakeLists.txt
@@ -37,6 +37,10 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit -framework AudioUnit -framework Carbon -framework CoreAudio -framework ForceFeedback -framework IOKit")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" PARENT_SCOPE) endif() +if(NOT SDLMAIN_LIBRARY) + set(SDLMAIN_LIBRARY "") +endif() + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libsdl${SDL_VERSION_DEBIAN}" PARENT_SCOPE) file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-*.c)
M
src/platform/sdl/pandora-sdl.c
→
src/platform/sdl/pandora-sdl.c
@@ -12,17 +12,27 @@ #include <linux/fb.h>
#include <sys/ioctl.h> #include <sys/mman.h> -static bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer); -static void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer); -static void GBASDLGLDeinit(struct SDLSoftwareRenderer* renderer); +#ifndef FBIO_WAITFORVSYNC +#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) +#endif + +static bool GBASDLInit(struct SDLSoftwareRenderer* renderer); +static void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer); +static void GBASDLDeinit(struct SDLSoftwareRenderer* renderer); void GBASDLGLCreate(struct SDLSoftwareRenderer* renderer) { - renderer->init = GBASDLGLInit; - renderer->deinit = GBASDLGLDeinit; - renderer->runloop = GBASDLGLRunloop; + renderer->init = GBASDLInit; + renderer->deinit = GBASDLDeinit; + renderer->runloop = GBASDLRunloop; } -bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer) { +void GBASDLSWCreate(struct SDLSoftwareRenderer* renderer) { + renderer->init = GBASDLInit; + renderer->deinit = GBASDLDeinit; + renderer->runloop = GBASDLRunloop; +} + +bool GBASDLInit(struct SDLSoftwareRenderer* renderer) { SDL_SetVideoMode(800, 480, 16, SDL_FULLSCREEN); renderer->odd = 0;@@ -73,7 +83,7 @@ renderer->d.outputBufferStride = VIDEO_HORIZONTAL_PIXELS;
return true; } -void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer) { +void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer) { SDL_Event event; while (context->state < THREAD_EXITING) {@@ -97,7 +107,7 @@ GBASyncWaitFrameEnd(&context->sync);
} } -void GBASDLGLDeinit(struct SDLSoftwareRenderer* renderer) { +void GBASDLDeinit(struct SDLSoftwareRenderer* renderer) { munmap(renderer->base[0], VIDEO_HORIZONTAL_PIXELS * VIDEO_VERTICAL_PIXELS * 4); struct omapfb_plane_info plane;