Author: titmuss
Date: Tue May 27 06:04:06 2008
New Revision: 2529
URL: http://svn.slimdevices.com?rev=2529&root=Jive&view=rev
Log:
Bug: N/A
Description:
SqueezePlay SDL patches merged to SDL 1.2.13.
Added:
7.2/trunk/squeezeplay/src/SDL-1.2.13/VisualC/include/
7.2/trunk/squeezeplay/src/SDL-1.2.13/VisualC/include/SDL_config.h
Modified:
7.2/trunk/squeezeplay/src/SDL-1.2.13/include/SDL_events.h
7.2/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c
7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/SDL_timer.c
7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/unix/SDL_systimer.c
7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_blit.c
7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/fbcon/SDL_fbvideo.c
Added: 7.2/trunk/squeezeplay/src/SDL-1.2.13/VisualC/include/SDL_config.h
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/VisualC/include/SDL_config.h?rev=2529&root=Jive&view=auto
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/VisualC/include/SDL_config.h (added)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/VisualC/include/SDL_config.h Tue May
27 06:04:06 2008
@@ -1,0 +1,173 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ [EMAIL PROTECTED]
+*/
+
+#ifndef _SDL_config_win32_h
+#define _SDL_config_win32_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#ifdef __GNUC__
+#define HAVE_STDINT_H 1
+#elif defined(_MSC_VER)
+typedef signed __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef signed __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef signed __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#ifndef _UINTPTR_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef unsigned int uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+#else /* !__GNUC__ && !_MSC_VER */
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
+#endif
+typedef unsigned int uintptr_t;
+#endif /* __GNUC__ || _MSC_VER */
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Enabled for SDL 1.2 (binary compatibility) */
+#define HAVE_LIBC 1
+#ifdef HAVE_LIBC
+/* Useful headers */
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#ifndef _WIN32_WCE
+#define HAVE_SIGNAL_H 1
+#endif
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE__STRREV 1
+#define HAVE__STRUPR 1
+#define HAVE__STRLWR 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE__LTOA 1
+#define HAVE__ULTOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE__STRICMP 1
+#define HAVE__STRNICMP 1
+#define HAVE_SSCANF 1
+#else
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#endif
+
+/* Enable various audio drivers */
+#ifndef _WIN32_WCE
+//#define SDL_AUDIO_DRIVER_DSOUND 1
+#endif
+#define SDL_AUDIO_DRIVER_WAVEOUT 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#ifdef _WIN32_WCE
+#define SDL_CDROM_DISABLED 1
+#else
+#define SDL_CDROM_WIN32 1
+#endif
+
+/* Enable various input drivers */
+#ifdef _WIN32_WCE
+#define SDL_JOYSTICK_DISABLED 1
+#else
+#define SDL_JOYSTICK_WINMM 1
+#endif
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_WIN32 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_WIN32 1
+
+/* Enable various timer systems */
+#ifdef _WIN32_WCE
+#define SDL_TIMER_WINCE 1
+#else
+#define SDL_TIMER_WIN32 1
+#endif
+
+/* Enable various video drivers */
+#ifdef _WIN32_WCE
+#define SDL_VIDEO_DRIVER_GAPI 1
+#endif
+#ifndef _WIN32_WCE
+//#define SDL_VIDEO_DRIVER_DDRAW 1
+#endif
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDIB 1
+
+/* Enable OpenGL support */
+#ifndef _WIN32_WCE
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_WGL 1
+#endif
+
+/* Enable assembly routines (Win64 doesn't have inline asm) */
+#ifndef _WIN64
+#define SDL_ASSEMBLY_ROUTINES 1
+#endif
+
+#endif /* _SDL_config_win32_h */
Modified: 7.2/trunk/squeezeplay/src/SDL-1.2.13/include/SDL_events.h
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/include/SDL_events.h?rev=2529&root=Jive&r1=2528&r2=2529&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/include/SDL_events.h (original)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/include/SDL_events.h Tue May 27
06:04:06 2008
@@ -328,6 +328,12 @@
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
+/*
+ Added for jive - return number of events in the event queue
+*/
+extern DECLSPEC int SDLCALL SDL_EventQueueLength(void);
+
+
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
Modified: 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c?rev=2529&root=Jive&r1=2528&r2=2529&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c (original)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c Tue May 27
06:04:06 2008
@@ -498,3 +498,13 @@
/* Update internal event state */
return(posted);
}
+
+
+/* Added for jive - return number of events in the event queue
+*/
+int SDL_EventQueueLength(void)
+{
+ return (SDL_EventQ.tail - SDL_EventQ.head + MAXEVENTS) % MAXEVENTS;
+}
+
+
Modified: 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/SDL_timer.c
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/SDL_timer.c?rev=2529&root=Jive&r1=2528&r2=2529&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/SDL_timer.c (original)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/SDL_timer.c Tue May 27
06:04:06 2008
@@ -108,6 +108,12 @@
SDL_bool removed;
SDL_mutexP(SDL_timer_mutex);
+
+ if ( !SDL_timer_running ) {
+ SDL_mutexV(SDL_timer_mutex);
+ return;
+ }
+
list_changed = SDL_FALSE;
now = SDL_GetTicks();
for ( prev = NULL, t = SDL_timers; t; t = next ) {
@@ -135,23 +141,21 @@
/* FIXME: what if ms was changed? */
break;
}
- if ( ms != t->interval ) {
- if ( ms ) {
- t->interval = ROUND_RESOLUTION(ms);
+ if ( ms ) {
+ t->interval = ROUND_RESOLUTION(ms);
+ } else {
+ /* Remove timer from the list */
+#ifdef DEBUG_TIMERS
+ printf("SDL: Removing timer %p\n", t);
+#endif
+ if ( prev ) {
+ prev->next = next;
} else {
- /* Remove timer from the list */
-#ifdef DEBUG_TIMERS
- printf("SDL: Removing timer %p\n", t);
-#endif
- if ( prev ) {
- prev->next = next;
- } else {
- SDL_timers = next;
- }
- SDL_free(t);
- --SDL_timer_running;
- removed = SDL_TRUE;
+ SDL_timers = next;
}
+ SDL_free(t);
+ --SDL_timer_running;
+ removed = SDL_TRUE;
}
}
/* Don't update prev if the timer has disappeared */
Modified: 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/unix/SDL_systimer.c
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/unix/SDL_systimer.c?rev=2529&root=Jive&r1=2528&r2=2529&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/unix/SDL_systimer.c
(original)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/timer/unix/SDL_systimer.c Tue May
27 06:04:06 2008
@@ -197,9 +197,7 @@
static int RunTimer(void *unused)
{
while ( timer_alive ) {
- if ( SDL_timer_running ) {
- SDL_ThreadedTimerCheck();
- }
+ SDL_ThreadedTimerCheck();
SDL_Delay(1);
}
return(0);
Modified: 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_blit.c
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_blit.c?rev=2529&root=Jive&r1=2528&r2=2529&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_blit.c (original)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_blit.c Tue May 27
06:04:06 2008
@@ -193,6 +193,9 @@
}
else
#endif
+ if(srcskip == dstskip && srcskip == w)
+ SDL_memcpy(dst, src, w*h);
+ else
while ( h-- ) {
SDL_memcpy(dst, src, w);
src += srcskip;
Modified: 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/fbcon/SDL_fbvideo.c
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/fbcon/SDL_fbvideo.c?rev=2529&root=Jive&r1=2528&r2=2529&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/fbcon/SDL_fbvideo.c
(original)
+++ 7.2/trunk/squeezeplay/src/SDL-1.2.13/src/video/fbcon/SDL_fbvideo.c Tue May
27 06:04:06 2008
@@ -80,7 +80,8 @@
{ 0, 0, 640, 400 }, /* 8 bpp: 0x100, or 256 */
{ 0, 0, 512, 384 },
{ 0, 0, 320, 240 },
- { 0, 0, 320, 200 }
+ { 0, 0, 320, 200 },
+ { 0, 0, 240, 320 }, /* PAD LCD */
};
static const struct {
int xres;
@@ -96,6 +97,7 @@
int vmode;
} vesa_timings[] = {
#ifdef USE_VESA_TIMINGS /* Only tested on Matrox Millenium I */
+ { 240, 320, 287820000, 2, 2, 2, 1, 2, 2, 0, 0 }, /* PAD LCD */
{ 640, 400, 39771, 48, 16, 39, 8, 96, 2, 2, 0 }, /* 70 Hz */
{ 640, 480, 39683, 48, 16, 33, 10, 96, 2, 0, 0 }, /* 60 Hz */
{ 768, 576, 26101, 144, 16, 28, 6, 112, 4, 0, 0 }, /* 60 Hz */
@@ -111,6 +113,7 @@
the 'modeline2fb' perl script included with the fbset package.
These timings were generated for Matrox Millenium I, 15" monitor.
*/
+ { 240, 320, 287820000, 2, 2, 2, 1, 2, 2, 0, 0 }, /* PAD LCD */
{ 320, 200, 79440, 16, 16, 20, 4, 48, 1, 0, 2 }, /* 70 Hz */
{ 320, 240, 63492, 16, 16, 16, 4, 48, 2, 0, 2 }, /* 72 Hz */
{ 512, 384, 49603, 48, 16, 16, 1, 64, 3, 0, 0 }, /* 78 Hz */
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins