SDL: Fix Pandora build
Jeffrey Pfau jeffrey@endrift.com
Sun, 11 Oct 2015 20:31:01 -0700
1 files changed,
13 insertions(+),
3 deletions(-)
jump to
M
src/platform/sdl/pandora-sdl.c
→
src/platform/sdl/pandora-sdl.c
@@ -12,7 +12,17 @@ #include <linux/fb.h>
#include <sys/ioctl.h> #include <sys/mman.h> -bool GBASDLInit(struct SDLSoftwareRenderer* renderer) { +static bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer); +static void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer); +static void GBASDLGLDeinit(struct SDLSoftwareRenderer* renderer); + +void GBASDLGLCreate(struct SDLSoftwareRenderer* renderer) { + renderer->init = GBASDLGLInit; + renderer->deinit = GBASDLGLDeinit; + renderer->runloop = GBASDLGLRunloop; +} + +bool GBASDLGLInit(struct SDLSoftwareRenderer* renderer) { SDL_SetVideoMode(800, 480, 16, SDL_FULLSCREEN); renderer->odd = 0;@@ -63,7 +73,7 @@ renderer->d.outputBufferStride = VIDEO_HORIZONTAL_PIXELS;
return true; } -void GBASDLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer) { +void GBASDLGLRunloop(struct GBAThread* context, struct SDLSoftwareRenderer* renderer) { SDL_Event event; while (context->state < THREAD_EXITING) {@@ -87,7 +97,7 @@ GBASyncWaitFrameEnd(&context->sync);
} } -void GBASDLDeinit(struct SDLSoftwareRenderer* renderer) { +void GBASDLGLDeinit(struct SDLSoftwareRenderer* renderer) { munmap(renderer->base[0], VIDEO_HORIZONTAL_PIXELS * VIDEO_VERTICAL_PIXELS * 4); struct omapfb_plane_info plane;