mirror of https://github.com/mgba-emu/mgba.git
All: Pandora buildfixes
This commit is contained in:
parent
642ed65ee2
commit
808855f377
|
@ -82,8 +82,11 @@ static inline int ThreadSetName(const char* name) {
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
pthread_set_name_np(pthread_self(), name);
|
pthread_set_name_np(pthread_self(), name);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#elif !defined(BUILD_PANDORA) // Pandora's glibc is too old
|
||||||
return pthread_setname_np(pthread_self(), name);
|
return pthread_setname_np(pthread_self(), name);
|
||||||
|
#else
|
||||||
|
UNUSED(name);
|
||||||
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,10 @@ elseif(APPLE)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" PARENT_SCOPE)
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT SDLMAIN_LIBRARY)
|
||||||
|
set(SDLMAIN_LIBRARY "")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libsdl${SDL_VERSION_DEBIAN}" PARENT_SCOPE)
|
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)
|
file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-*.c)
|
||||||
|
|
|
@ -12,17 +12,27 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
static bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer);
|
#ifndef FBIO_WAITFORVSYNC
|
||||||
static void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer);
|
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
|
||||||
static void GBASDLGLDeinit(struct SDLSoftwareRenderer* renderer);
|
#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) {
|
void GBASDLGLCreate(struct SDLSoftwareRenderer* renderer) {
|
||||||
renderer->init = GBASDLGLInit;
|
renderer->init = GBASDLInit;
|
||||||
renderer->deinit = GBASDLGLDeinit;
|
renderer->deinit = GBASDLDeinit;
|
||||||
renderer->runloop = GBASDLGLRunloop;
|
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);
|
SDL_SetVideoMode(800, 480, 16, SDL_FULLSCREEN);
|
||||||
|
|
||||||
renderer->odd = 0;
|
renderer->odd = 0;
|
||||||
|
@ -73,7 +83,7 @@ bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer) {
|
void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
while (context->state < THREAD_EXITING) {
|
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);
|
munmap(renderer->base[0], VIDEO_HORIZONTAL_PIXELS * VIDEO_VERTICAL_PIXELS * 4);
|
||||||
|
|
||||||
struct omapfb_plane_info plane;
|
struct omapfb_plane_info plane;
|
||||||
|
|
Loading…
Reference in New Issue