Commit graph

2738 commits

Author SHA1 Message Date
Sam Lantinga
0e665950e9 Added SDL_atomic.h, SDL_power.h, and SDL_revision.h to public API headers
Added dummy atomic source files for now

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403720
2009-08-02 13:46:34 +00:00
Sam Lantinga
d942501bf9 Added SDL_atomic.h and SDL_power.h to public API headers
Added atomic source files (which don't compile currently)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403719
2009-08-02 13:08:19 +00:00
Sam Lantinga
51273d8424 Better check which includes #define used in stdint.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403718
2009-08-02 12:54:59 +00:00
Sam Lantinga
72e444bb08 Don't redefine types if HAVE_STDINT_H is defined
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403717
2009-08-02 12:45:20 +00:00
Sam Lantinga
8a68fef797 Patch from David Carre:
I fixed a bug in the "SDL_DestroyRenderer()" function in the pandora x11 renderer (in fact the bug was in the "X11_GLES_MakeCurrent()" function) that was causing a crash when exiting SDL.

There was a problem while terminating the x11 egl window, that was preventing to quit/close SDL/SDL-window then reload SDL/SDL-window inside the same application.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403715
2009-07-30 14:53:57 +00:00
Mike Gorchak
01700524c1 Support for native and emulated atomic operations has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403710
2009-07-19 08:04:59 +00:00
Bob Pendleton
66de021c3d volitile... duh, yeah the variable need to be labeled volitile
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403698
2009-07-09 21:31:27 +00:00
Sam Lantinga
29167b5730 Documentation fix fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403692
2009-07-07 14:02:57 +00:00
Bob Pendleton
5f0c128f01 Applied patch from bug id=762 provided by Pierre Phaneuf
this patch enables compilation of SDL_atomic stuff on the Mac.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403689
2009-07-06 21:56:38 +00:00
Bob Pendleton
5d3a5aa3bd Documentation fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403688
2009-07-06 21:48:52 +00:00
Bob Pendleton
46b21a2522 This is a cosmetic fix, I found a stupid typo
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403687
2009-07-02 21:47:02 +00:00
Bob Pendleton
29a81c8167 Another documentation fix, Thanks to Mason Wheeler for finding these.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403686
2009-07-02 16:53:56 +00:00
Bob Pendleton
8625a0991d Documentation fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403685
2009-07-02 16:15:55 +00:00
Bob Pendleton
58ee3a8b76 Corrected documentation error for SDL_RenderFill.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403678
2009-06-30 22:19:10 +00:00
Ryan C. Gordon
77773a07a2 Added testpower to svn:ignore
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403677
2009-06-30 06:53:17 +00:00
Ryan C. Gordon
6924cd9e8a Moved hardcoding of "/proc/apm" elsewhere.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403676
2009-06-30 06:27:08 +00:00
Ryan C. Gordon
fc45904c3c Linux /proc/apm: handle hex and decimal (and octal!) values.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403675
2009-06-30 06:26:02 +00:00
Ryan C. Gordon
090a6d4f81 Linux /proc/acpi: check for ac_adapter states, other cleanup.
Still not tested, though!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403674
2009-06-30 05:44:00 +00:00
Ryan C. Gordon
0fef127841 Removed stub for Linux /sys/power processing.
Apparently /sys/power doesn't expose battery information at this time.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403673
2009-06-30 05:27:11 +00:00
Ryan C. Gordon
3bcb033219 Power: First shot at Linux /proc/acpi/battery support.
Untested, not even tried to compile yet.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403672
2009-06-30 03:50:30 +00:00
Bob Pendleton
dad8f05067 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. :-)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403671
2009-06-29 19:54:43 +00:00
Bob Pendleton
9b4d5550f8 Disabling 64 bit atomics operations until I figure out why they do not link.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403669
2009-06-24 22:24:23 +00:00
Bob Pendleton
bd15ea1fd5 First draft of atomic operations code for GCC and linux.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403668
2009-06-24 20:20:57 +00:00
Bob Pendleton
386dceedb4 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403667
2009-06-24 20:04:08 +00:00
Ryan C. Gordon
3688382625 Added power API and test program to Visual C++ project files.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403659
2009-06-17 04:26:19 +00:00
Sam Lantinga
dd86ee0d76 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403658
2009-06-16 14:34:15 +00:00
Sam Lantinga
e2f3d399b5 Fixed some compile errors and warnings under Visual C++
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403655
2009-06-12 08:41:48 +00:00
Bob Pendleton
75ffaf1d21 Mouse events now report the correct window id and window enter/leave events are now reported.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403654
2009-06-11 20:08:33 +00:00
Mike Gorchak
fa620100d8 Proper window resize handling in GLES test application.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403653
2009-06-11 06:03:05 +00:00
Mike Gorchak
83ca32e544 Fixed problems with OpenGL ES window resizing.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403652
2009-06-11 05:57:32 +00:00
Mike Gorchak
b099397c9c Note about hardware mouse cursor has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403651
2009-06-10 18:32:42 +00:00
Sam Lantinga
17db454b5c 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;

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403650
2009-06-10 14:00:21 +00:00
Sam Lantinga
8aa58621a6 Added missing files for OpenGL ES support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403649
2009-06-10 13:54:13 +00:00
Sam Lantinga
63be31556a Added missing header file for Pandora support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403648
2009-06-10 13:53:53 +00:00
Sam Lantinga
0ce493da65 Whoops, didn't mean to commit unfinished patch
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403647
2009-06-10 13:46:54 +00:00
Sam Lantinga
388df73e0d indent is really bad at handling assembly
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403646
2009-06-10 13:38:19 +00:00
Sam Lantinga
d03a7700eb indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403645
2009-06-10 13:34:20 +00:00
Mike Gorchak
e74bc6f89f Continue working on QNX GF and Photon support.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403643
2009-06-10 08:09:04 +00:00
Mike Gorchak
e51e3cfd1c SDL pixel format string is printed near mode number in form of SDL_PIXELFORMAT_XXXXX, when --info option is passed. It is usefull for debugging.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403642
2009-06-10 05:56:36 +00:00
Mike Gorchak
05b71a0fbd Support for 15/16/24/32 bpps of icon.bmp has been added, in case if not an original icon.bmp (8bpp with palette) is used for tests.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403641
2009-06-10 05:54:19 +00:00
Mike Gorchak
66dca33f37 Support for 24 bpp pixel formats has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403640
2009-06-10 05:51:44 +00:00
Bob Pendleton
5424dfae24 OK, had to add some casts to get SDL_atomic.h to compile with C++. testatomic still compiles and runs.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403639
2009-06-09 19:39:23 +00:00
Bob Pendleton
d813a7eac5 First commit for SDL atomic operations.
On my linux box it compiles and installs correctly and testatomic runs without errors.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403638
2009-06-09 17:33:44 +00:00
Bob Pendleton
d083f30b19 zeroing out the rest of the unititialize fields in mouse motion events.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403637
2009-06-09 15:45:33 +00:00
Mike Gorchak
d499c5f023 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403636
2009-06-09 08:56:43 +00:00
Sam Lantinga
b280ab9e6c Fixed 4 bit-per-pixel definition. Thanks Mike!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403635
2009-06-09 04:34:50 +00:00
Bob Pendleton
1148da112d make sure that mouse.z == 0 until it is used.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403634
2009-06-09 03:27:48 +00:00
Mike Gorchak
591381aed6 Fixed support for 4bpp video modes enumeration, otherwise mode with zero bpp appears in the list.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403633
2009-06-08 21:00:52 +00:00
Bob Pendleton
372f9b063f 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403632
2009-06-08 19:24:38 +00:00
Ryan C. Gordon
2af9ddbafd BeOS support for power subsystem.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403631
2009-06-07 22:44:59 +00:00