Commit Graph

1906 Commits

Author SHA1 Message Date
Ryan C. Gordon
1cb422c52f Moved hardcoding of "/proc/apm" elsewhere. 2009-06-30 06:27:08 +00:00
Ryan C. Gordon
1d704b5829 Linux /proc/apm: handle hex and decimal (and octal!) values. 2009-06-30 06:26:02 +00:00
Ryan C. Gordon
f9b58538d9 Linux /proc/acpi: check for ac_adapter states, other cleanup.
Still not tested, though!
2009-06-30 05:44:00 +00:00
Ryan C. Gordon
89521cccdb Removed stub for Linux /sys/power processing.
Apparently /sys/power doesn't expose battery information at this time.
2009-06-30 05:27:11 +00:00
Ryan C. Gordon
9a2c54efec Power: First shot at Linux /proc/acpi/battery support.
Untested, not even tried to compile yet.
2009-06-30 03:50:30 +00:00
Bob Pendleton
e53cd95852 I've made so many changes I don't dare continue until I check the current stuff in.
/test/testatomic.c performs absolutely basic tests to show that the function work as expected. Need a second test to do more detailed tests.

/include/SDL_atomic.h provides declarations for all included functions.

/src/atomic/linux/SDL_atomic.c provided all the functions. On a generic built the 64 bit functions work, but they are emulated. On a build for -march=pentium and above the 64 bit functions use native instructions
/src/atomic/dummy/SDL_atomic.c emulates all the operations using SDL_mutex.h.
/src/atomic/win32/SDL_atomic.c is a copy of dummy
/src/atomic/macosx/SDL_atomic.s is a copy of dummy

These versions of SDL_atomic.c provide a frame work for building the library with a mixture of native and emulated functions. This allows the whole library to be provided on all platforms. (I hope.)
I hope this fits with the SDL philosophy of either providing a common subset or emulating when the platform is missing a feature.

I have not added dummy, macosx, or win32 to the build. They are there as place holders for future work.

I have modified congifure.in to compile sources in /src/atomic/linux. (The SDL configure.in file is an amazing piece of work and I hope I didn't mess it up. :-)
2009-06-29 19:54:43 +00:00
Bob Pendleton
9302a68559 Disabling 64 bit atomics operations until I figure out why they do not link. 2009-06-24 22:24:23 +00:00
Bob Pendleton
c0646fda71 First draft of atomic operations code for GCC and linux. 2009-06-24 20:20:57 +00:00
Bob Pendleton
0b5bc4d23b This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
It also update configure.in to compile the linux version of the library. The three versions are all dummies
implementations that do nothing. They are being checked in as place holders. Mostly, I just wanted to get
place holders and the configure.in checked in.
2009-06-24 20:04:08 +00:00
Sam Lantinga
d62da4b117 Alexei Tereschenko
Why not to use hardware vertex processing instead of software one if
it is available in D3D render driver? With hardware processing
testsprite2 runs three times faster on all videocards which I could
test.
2009-06-16 14:34:15 +00:00
Sam Lantinga
41c5df7eae Fixed some compile errors and warnings under Visual C++ 2009-06-12 08:41:48 +00:00
Bob Pendleton
eb924e9a2d Mouse events now report the correct window id and window enter/leave events are now reported. 2009-06-11 20:08:33 +00:00
Mike Gorchak
bfe3c0a653 Fixed problems with OpenGL ES window resizing. 2009-06-11 05:57:32 +00:00
Sam Lantinga
dd18a26edd Fixed bug #750
Since many different event structures include windowID it should be placed near
the beginning of the structure (preferably right after type) so it's position
is the same between different events.

This is to avoid code like this:
if (event.type == SDL_WINDOWEVENT)
    win = event.window.windowID;
else if ((SDL_EVENTMASK(event.type) & SDL_KEYEVENTMASK) != 0)
    win = event.key.windowID;
else if (event.type == SDL_TEXTINPUT)
    win = event.text.windowID;
else if (event.type == SDL_MOUSEMOTION)
    win = event.motion.windowID;
else if ((SDL_EVENTMASK(event.type) & (SDL_MOUBUTTONDOWNMASK |
SDL_MOUBUTTONUPMASK)) != 0)
    win = event.button.windowID;
else if (event.type == SDL_MOUSEWHEEL)
    win = event.wheel.windowID;
...

in favor of:
win = event.window.windowID;
2009-06-10 14:00:21 +00:00
Sam Lantinga
8d455c1b26 Added missing files for OpenGL ES support 2009-06-10 13:54:13 +00:00
Sam Lantinga
16a9ead7ce Whoops, didn't mean to commit unfinished patch 2009-06-10 13:46:54 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +00:00
Mike Gorchak
e51eed13d1 Continue working on QNX GF and Photon support. 2009-06-10 08:09:04 +00:00
Mike Gorchak
7c053e089d Support for 24 bpp pixel formats has been added. 2009-06-10 05:51:44 +00:00
Bob Pendleton
6170e003a1 zeroing out the rest of the unititialize fields in mouse motion events. 2009-06-09 15:45:33 +00:00
Mike Gorchak
181b01f4cb 1. SDL_CreateTextureFromSurface() now tries to find surface's pixel format.
2. SDL_CreateTextureFromSurface() now has best texture format search for non-alpha pixel formats.
3. Added comparision for pixels packed order to the video mode sorting callback to avoid mixing 1555/565/4444 pixel formats.
4. Added sorting call for current video mode list after each new video mode addition, because SDL_GetClosestDisplayMode() requires video modes to be sorted, and this is one place only where we can detect video modes addition.
2009-06-09 08:56:43 +00:00
Bob Pendleton
e6138ea9b7 make sure that mouse.z == 0 until it is used. 2009-06-09 03:27:48 +00:00
Mike Gorchak
3f23cab959 Fixed support for 4bpp video modes enumeration, otherwise mode with zero bpp appears in the list. 2009-06-08 21:00:52 +00:00
Bob Pendleton
09e48fa834 Fixed some typos and added a couple of includes. All were need to get SDL_power to compile on Linux.
Sam, you might want to check to see that the spellings I picked are the spellings you wanted.
2009-06-08 19:24:38 +00:00
Ryan C. Gordon
fdfe1d4f41 BeOS support for power subsystem. 2009-06-07 22:44:59 +00:00
Ryan C. Gordon
1a2c2eebd2 Initial work on power subsystem for SDL 1.3. 2009-06-07 06:06:35 +00:00
Sam Lantinga
218766a241 indent 2009-06-07 02:45:55 +00:00
Sam Lantinga
62c7087a99 Hi,
I have prepared a set of patches to readd WindowsCE support to SDL 1.3.
I've created a new GAPI/Rawframebuffer and a DirectDraw renderer.
Both renderers are work in progress and there are several unimplemented
cases. (Notably
RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and
texture blending )
Nevertheless I am successfully using these renderers together with the
SDL software renderer. (On most devices the SDL software renderer will
be much faster as there are only badly optimized vendor drivers available)

I send these patches now in this unpolished state because there seems to
be some interest in win ce and someone has to start supporting SDL 1.3

Now on to the patches:
wince_events_window_fixes.patch
fixes some wince incompatibilities and adds fullscreen support via
SHFullScreen. NOTE: This patch shouldn't have any side effects on
Windows, but I have NOT tested it on Windows, so please double-check.
This patch doesn't dependent on the following ones.

wince_renderers_system.patch
This patch does all necessary modifications to the SDL system.
- it adds the renderers to the configure system
- it adds the renderers to win32video

SDL_ceddrawrender.c
SDL_ceddrawrender.h
SDL_gapirender_c.h
SDL_gapirender.c
SDL_gapirender.h
these files add the new render drivers and should be placed in
src/video/win32

Some notes to people who want to test this:
- I have only compiled sdl with ming32ce, so the VisualC files are not
up to date
- As mingw32ce has no ddraw.h this file must be taken from the MS SDK
and modified to work with gcc
- I had to modify line 2611 in configure.in to
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer
-Wl,--image-base -Wl,0x10000"
otherwise GetCPinfo wouldn't link. If someone knows whats causing this
I'd be happy to hear about it.

It would be great if these patches could make their way into SVN as this
would make collaboration much much easier.

I'm out of office for the next week and therefore will be unavailable
via email.

Regards
Stefan
2009-06-07 02:44:46 +00:00
Mike Gorchak
d89513cb8e Best pixel formats with alpha search code has been added to function which converts surface to texture with enabled color keys. Now "testsprite2 --renderer opengl_es" works fine with all pixel formats with alpha. This affects other renderers too. 2009-06-05 07:35:06 +00:00
Mike Gorchak
bb4afb26ac QNX quirk has been added, QNX OpenGL ES implementation is broken regarding support of textures with packed pixel formats. 2009-06-05 07:30:51 +00:00
Mike Gorchak
bd93cb0220 Support for BGR565 pixel format has been added, mainly for OpenGL ES renderer. OpenGL ES renderer now have new texture formats. 2009-06-03 10:40:44 +00:00
Sam Lantinga
306f1dc431 Von: Thomas Zimmermann
Betreff: [SDL] [PATCH] Make static variables const
Datum: Tue, 19 May 2009 19:45:37 +0200

Hi,

this is a set of simple changes which make some of SDL's internal static
arrays constant. The purpose is to shrink the number of write-able
static bytes and thus increase the number of memory pages shared between
SDL applications.

The patch set is against trunk@4513. Each of the attached patch files is
specific to a sub-system. The set is completed by a second mail, because
of the list's 40 KiB limit.

The files readelf-r4513.txt and readelf-const-patch.txt where made by
calling 'readelf -S libSDL.so'. They show the difference in ELF sections
without and with the patch. Some numbers measured on my x86-64:

Before

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000008170  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         00000000003045e0  001045e0
      00000000000023d0  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         00000000003076e0  001076e0
      0000000000004988  0000000000000000  WA       0     0     32

After

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000009a50  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         0000000000306040  00106040
      0000000000002608  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         0000000000309360  00109360
      0000000000002e88  0000000000000000  WA       0     0     32

The size of the write-able data section decreased considerably. Some
entries became const-after-relocation, while most of its content went
straight into the read-only data section.

Best regards, Thomas
2009-06-03 04:37:27 +00:00
Sam Lantinga
a7a0cefe2a OpenPandora support added by David Carré 2009-05-31 11:53:12 +00:00
Sam Lantinga
8a25c7d1e0 error message typo fix 2009-05-28 09:39:14 +00:00
Sam Lantinga
83d7309416 indent 2009-05-23 22:41:08 +00:00
Mike Gorchak
1491423d60 Few new video modes have been added. 2009-05-15 15:47:37 +00:00
Mike Gorchak
5166d1ba84 More checks for current GF state were added. 2009-05-14 11:51:42 +00:00
Mike Gorchak
a0f9e311d5 Set audio device handle to NULL in case of open was not successful. 2009-05-14 11:50:05 +00:00
Mike Gorchak
fd6b697764 OpenGL ES renderer state fixes. Now GL_TEXTURE_2D is not enabled by default. 2009-05-14 10:54:34 +00:00
Sam Lantinga
1ca04d4468 Temporary workaround for building on 64-bit Mac OS X 2009-05-07 12:27:42 +00:00
Sam Lantinga
78c6fc38ac Fixed dynamic loading on Windows CE 2009-05-07 12:04:53 +00:00
Mike Gorchak
f894d68e55 Added support for single buffering, if double buffering is not available. 2009-05-05 17:50:34 +00:00
Mike Gorchak
4536d205e5 Added handler for all window events. 2009-05-05 17:47:41 +00:00
Mike Gorchak
62b9cc7933 New last cursor position must rely on the clamped coordinates. 2009-04-28 04:43:21 +00:00
Mike Gorchak
8a34711a2c Support for HID devices (mice and keyboards only for now) has been added 2009-04-28 04:33:30 +00:00
Mike Gorchak
835d78cd32 Continue working on QNX Photon with OpenGL ES support 2009-04-28 04:30:52 +00:00
Sam Lantinga
574bd25fc8 Fixed bug #721
From  michalziulek@gmail.com   2009-03-28 07:43:34   (-) [reply]

There is a bug in OpenGL 3.x context creation code.
Function glXGetProcAddress is used directly where it should be:
_this->gl_data->glXGetProcAddress. I have attached patch which fixes this on
x11 and win32. Thanks.
2009-04-03 17:19:05 +00:00
Sam Lantinga
d6c62e184a Fixed undefined references to joystick code 2009-04-03 13:35:05 +00:00
Sam Lantinga
eb3fc668d0 Added SDL_GetColorKey() 2009-04-03 13:27:33 +00:00
Sam Lantinga
9f9eefc08b Oops 2009-03-28 06:00:42 +00:00