forked from len0rd/rockbox
sdl: a couple minor fixes
Prevents system SDL from interfering with thread driver selection. Also adds test code for alignment faults. Change-Id: I8bc181922c4a9e764429897dbbaa1ffaabd01126
This commit is contained in:
parent
c7f26de2bf
commit
71922db6cf
3 changed files with 18 additions and 20 deletions
|
@ -163,7 +163,7 @@
|
|||
#define vsnprintf rb->vsnprintf
|
||||
#define vsprintf vsprintf_wrapper
|
||||
|
||||
#define M_PI 3.141592
|
||||
#define M_PI 3.14159265358979323846
|
||||
#define EOF 0xff
|
||||
|
||||
#define LOAD_XPM
|
||||
|
|
|
@ -174,10 +174,21 @@ enum plugin_status plugin_start(const void *param)
|
|||
(void) param;
|
||||
|
||||
#if defined(CPU_ARM) && !defined(SIMULATOR)
|
||||
/* (don't) set alignment trap */
|
||||
/* (don't) set alignment trap. Will generate a data abort
|
||||
* exception on ARM. */
|
||||
//set_cr(get_cr() | CR_A);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
char c = *((char*)NULL);
|
||||
|
||||
/* test alignment trap */
|
||||
unsigned int x = 0x12345678;
|
||||
char *p = ((char*)&x) + 1;
|
||||
unsigned short *p2 = (unsigned short*)p;
|
||||
rb->splashf(HZ, "%04x, %02x%02x", *p2, *(p+1), *p);
|
||||
#endif
|
||||
|
||||
/* don't confuse this with the main SDL thread! */
|
||||
main_thread_id = rb->thread_self();
|
||||
|
||||
|
|
|
@ -24,24 +24,11 @@
|
|||
#ifndef _SDL_thread_c_h
|
||||
#define _SDL_thread_c_h
|
||||
|
||||
/* Need the definitions of SYS_ThreadHandle */
|
||||
#if SDL_THREADS_DISABLED
|
||||
#include "generic/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_BEOS
|
||||
#include "beos/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_DC
|
||||
#include "dc/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_OS2
|
||||
#include "os2/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_PTH
|
||||
#include "pth/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_SPROC
|
||||
#include "irix/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_WIN32
|
||||
#include "win32/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_SYMBIAN
|
||||
#include "symbian/SDL_systhread_c.h"
|
||||
#elif SDL_THREAD_ROCKBOX
|
||||
#ifndef SDL_THREAD_ROCKBOX
|
||||
#define SDL_THREAD_ROCKBOX 1
|
||||
#endif
|
||||
|
||||
#if SDL_THREAD_ROCKBOX
|
||||
#include "rockbox/SDL_systhread_c.h"
|
||||
#else
|
||||
#error Need thread implementation for this platform
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue