All: Pandora buildfixes

This commit is contained in:
Jeffrey Pfau 2015-10-11 23:59:48 -07:00
parent 642ed65ee2
commit 808855f377
3 changed files with 27 additions and 10 deletions

View File

@ -82,8 +82,11 @@ static inline int ThreadSetName(const char* name) {
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
pthread_set_name_np(pthread_self(), name);
return 0;
#else
#elif !defined(BUILD_PANDORA) // Pandora's glibc is too old
return pthread_setname_np(pthread_self(), name);
#else
UNUSED(name);
return 0;
#endif
}

View File

@ -37,6 +37,10 @@ elseif(APPLE)
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)

View File

@ -12,17 +12,27 @@
#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 @@ bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer) {
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 @@ void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* rend
}
}
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;