Commit graph

3915 commits

Author SHA1 Message Date
Sam Lantinga
d627939049 Making the API simpler, the renderer present semantics are always having a backbuffer and then discarding it. This is best for hardware accelerated rendering.
--HG--
extra : rebase_source : bbe6641fce097c79ccd47f4e1ea6b27683fd0acb
2011-02-01 12:19:46 -08:00
Sam Lantinga
4c06e58153 Making the API simpler, texture color and alpha modulation are supported by all renderers.
--HG--
extra : rebase_source : 880752438aae8f6526503d220bad91aabc3a7d1c
2011-01-31 23:37:30 -08:00
Sam Lantinga
825e1da54d Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
--HG--
extra : rebase_source : f06ea01caa64c8ad14170c723e5af52dad64d779
2011-01-31 23:23:57 -08:00
Sam Lantinga
372693d86f Removed more partially functional renderers
--HG--
extra : rebase_source : d00f0590e133604070f978762a6728b4afde02ca
2011-01-31 22:53:45 -08:00
Sam Lantinga
df1f384c5b Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
--HG--
extra : rebase_source : 4edac7fd162a2eb37a50159b958db37a03e944a5
2011-01-31 22:44:43 -08:00
Sam Lantinga
9c12618379 Removed partially functional renderers
--HG--
extra : rebase_source : 3fc2560c02393bf9e7c46360fc24f2585c9409be
2011-01-31 22:21:29 -08:00
Sam Lantinga
886e947679 Spacing for documentation tweaks 2011-02-01 12:01:37 -08:00
Sam Lantinga
2cdadc64b5 Tweak for documentation 2011-02-01 11:53:29 -08:00
Sam Lantinga
64ac326041 Fixed bug #1025 (iphone keyboard doesn't send 'return' and 'backspace' events)
Vittorio Giovara      2011-02-01 02:25:48 PST

i have attached an updated patch that fixes this behaviour
2011-02-01 09:04:43 -08:00
Sam Lantinga
3752cf5872 Fixed spacing, adding vim spacing hints 2011-02-01 09:02:53 -08:00
Sam Lantinga
220fd4679a Added vim spacing hints 2011-02-01 09:00:47 -08:00
Sam Lantinga
c9c3d0381a Fixed spacing 2011-02-01 08:59:22 -08:00
Sam Lantinga
3a83076de1 Fixed bug #1112 (retina display support)
Vittorio Giovara      2011-02-01 02:21:50 PST

with the attached patch, the opengles context will always use the maximum
screensize available; this is particularly useful for supporting retina display
on latest iphone.

please note: Apple documentation warns that using the "upscaled" gl context
actually uses more memory and bandwitdh, so it might be worth to let the user
decide whether to disable it or not, either with a flag or a sdl function...
2011-02-01 08:54:34 -08:00
Sam Lantinga
6391828105 Fixed spacing 2011-02-01 08:53:22 -08:00
Sam Lantinga
b13cdc5d2c Fixed bug #1111
kwm@rainbow-runner.nl      2011-01-30 06:28:27 PST

Created attachment 562 [details]
Build fix with clang.

When building sdl 1.2.14 with the Clang compiler http://clang.llvm.org .
The build fails in src/video/mmx.h with the following error:

--------------------------------------------------
./src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
./src/video/SDL_RLEaccel.c:831:17: note: instantiated from:
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
                ^
./src/video/SDL_RLEaccel.c:831:5: note: instantiated from:
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
./src/video/SDL_RLEaccel.c:647:23: note: instantiated from:
                                blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
                                                  ^
./src/video/SDL_RLEaccel.c:282:4: note: instantiated from:
          movq_r2m(mm3, *dstp);                         \
          ^
In file included from ./src/video/SDL_RLEaccel.c:99:
./src/video/mmx.h:379:28: note: instantiated from:
#define movq_r2m(reg, var)      mmx_r2m(movq, reg, var)
                                ^
<scratch space>:192:1: note: instantiated from:
"movq"
^
<inline asm>:1:2: note: instantiated into assembly here
        movq %mm3, %dx
        ^
--------------------------------------------------

According to the clang developers this is a invalid inline assembly.
Using the attached patch from the last commit in the below bug report fixes the
compile.
More details from: http://llvm.org/bugs/show_bug.cgi?id=6730
2011-01-30 13:42:05 -08:00
Sam Lantinga
250faf507b Added Edgar's blog to the haptic documentation 2011-01-28 12:09:25 -08:00
Sam Lantinga
48e11c3665 Updated main.c for API changes
Kees Bakker to sdl

The main.c for the template is still targeting SDL1.2. Here
is the patch to make it work for SDL1.3 (I'm hoping
the mailing lists accepts attachments.)

In this patch I have also changed the shell script that
assembles the Template. Since there is now only one lib
target (same name for "device" and "simulator" version)
I copy the simulator library to the destination with
the name libSDLSimulator.a. This is not a satisfactory
solution, because both libraries are included in the project
while only one is needed (depending on the selected
environment). However, I'm not fluent with Xcode to
say what a better solution would be.

Kind regards,
Kees Bakker
2011-01-28 10:37:36 -08:00
Sam Lantinga
e64d0e8d85 Fixed bug #1056 (Frequent crashes in Touch events by simply touching the screen)
Joseba García Echebarria      2010-12-15 01:55:22 PST

I believe the crash is caused by a check not being performed on wether an
SDL_Touch element is NULL before using it in the SDL_SendTouchMotion function
in src/events/SDL_touch.c around line 400.
Judging from the rest of the code, there's a missing

    if (!touch) {
        return 0;
    }

before using "touch" as SDL_GetFinger(), SDL_GetFingerIndexId() use
touch->num_fingers without checking.

I can attach a patch if you like. It seems pretty straightforward, though.

I have yet to discover why touch is being returned as NULL as this error is
only triggered when an actual gesture has been performed, maybe something
related to SDL_AddTouch()?
2011-01-28 10:21:58 -08:00
Sam Lantinga
c3daf0f0cd Removed completely non-portable event thread hack.
Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
2011-01-27 22:44:08 -08:00
Sam Lantinga
95dbe47cf3 Fixed test 2011-01-27 20:51:54 -08:00
Sam Lantinga
858c92ff35 Added CPU cache line size to the test output. 2011-01-27 20:49:07 -08:00
Sam Lantinga
b2ff9dc39f Added API function to get CPU cache line size. 2011-01-27 20:46:45 -08:00
Sam Lantinga
b0a2a8957e Fixed quotes around Mercurial revision text 2011-01-27 20:37:54 -08:00
Sam Lantinga
7d33cf09be 0 isn't a valid Mercurial revision 2011-01-27 20:14:10 -08:00
krogoway
7f1b3595cc Always copy the SDL_config_windows.h to SDL_config.h for VisualC 2005, 2008 and 2010 projects. 2011-01-27 20:30:39 -06:00
Sam Lantinga
772009b691 Bump up the default cache line size. 2011-01-27 16:51:47 -08:00
Sam Lantinga
fb824f9a04 Added cache line size info in SDL_cpuinfo.h
I also added an implementation to dynamically query it, but didn't expose it since most x86 CPUs have an L1 cache line size of 64 bytes.
2011-01-27 16:46:15 -08:00
Sam Lantinga
1d518f0d73 Fixed compiling under Visual Studio 2011-01-27 15:31:00 -08:00
krogoway
e253e1d991 When the last window is closed and the SDL_WINDOWEVENT_CLOSE event is sent, send the SDL_QUIT event.
Common.c now destroys the SDL_Window upon a SDL_WINDOWEVENT_CLOSE event to ensure that all windows get closed properly and the new code to handle the last window closes gets executed.
2011-01-27 15:58:30 -06:00
Sam Lantinga
be54c8a0d5 This patch fixes the issue of configure generating broken Makefile
when .cc files are used due to bad sed substitution on multiple passes:
$(objects)/SDL_BeApp.lo:
$(objects)/SDL_BeApp.lo: ./src/main/beos/SDL_BeApp.c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS)  -c $< -o $@c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS)  -c $< -o $@

Signed-off-by: François Revol
2011-01-27 14:54:20 -08:00
Sam Lantinga
dd4f2c1339 Improved timer implementation
The new timer model is formalized as using a separate thread to handle timer callbacks.  This was the case on almost every platform before, but it's now a requirement, and simplifies the implementation and makes it perform consistently across platforms.

Goals:
 * Minimize timer thread blocking
 * Dispatch timers as accurately as possible
 * SDL_AddTimer() and SDL_RemoveTimer() are completely threadsafe
 * SDL_RemoveTimer() doesn't crash with a timer that's expired or removed
2011-01-27 14:45:06 -08:00
Sam Lantinga
2fd57ffe61 Improved condition variable documentation 2011-01-27 10:40:17 -08:00
Sam Lantinga
86e36cceab Scott Smith volunteered to maintain the Pandora port. 2011-01-27 10:07:14 -08:00
Sam Lantinga
1bdfc84ec9 Fixed bug #1109
Ozkan Sezer      2011-01-26 12:33:42 PST

I got warnings from SDL_windowskeyboard.c when I compiled for win64.
2011-01-27 08:40:06 -08:00
Sam Lantinga
e2a13f8922 Only document the public API, not the whole source tree. 2011-01-27 07:05:13 -08:00
Sam Lantinga
b58487d8bb Colin Leroy 2011-01-26 04:24:20 PST
the pthread implementation of SDL_SemWaitTimeout() uses busy waiting, while
pthread's sem_timedwait() does work. Attached are patches that make use of it
2011-01-27 00:34:12 -08:00
Sam Lantinga
71a8858bd9 Added a list of platforms, for my own sanity. :) 2011-01-27 00:19:46 -08:00
Sam Lantinga
d06966d7f2 Nobody is maintaining RISC OS code, so I'm removing it for now. 2011-01-27 00:06:36 -08:00
Sam Lantinga
9b3ce56bfd Since we're directly reading and writing 'active' from different threads, it needs to be flagged volatile. 2011-01-26 19:20:16 -08:00
Sam Lantinga
9edcf9bc9b Ozkan Sezer to slouken
The attached small patch updates SDL's libtoolized files for
pe-x86_64 magic, ie win/x64.
2011-01-26 12:23:32 -08:00
Sam Lantinga
b609519a5c Added a test to measure the impact of a separate thread periodically locking the queue entirely. 2011-01-26 00:03:34 -08:00
Sam Lantinga
bbc1ba223a Added a FIFO test to the atomic test suite.
This is really useful because we might be able to use something like this
for the SDL event queue.
2011-01-25 23:23:52 -08:00
Sam Lantinga
fc5dc0ddb2 More fixes for compilation on Visual Studio 2011-01-25 18:02:41 -08:00
Sam Lantinga
81dee4358f Fixed compile error on Visual C++ 2011-01-25 17:44:17 -08:00
Sam Lantinga
29e0bf97e0 Improvements based on feedback from Anthony Williams 2011-01-25 17:40:06 -08:00
krogoway
c8cd5b9028 Added SDL_window.* to the project. 2011-01-24 23:54:21 -06:00
Sam Lantinga
7327ef6bb9 Fixed cross-compiling for Windows 2011-01-24 21:41:36 -08:00
Sam Lantinga
ada074623f Fixed Android build 2011-01-24 21:31:32 -08:00
Sam Lantinga
f98d804282 Only include windows.h on Windows. :) 2011-01-24 21:22:00 -08:00
Sam Lantinga
b4497865bd Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c

--HG--
rename : src/SDL_android.cpp => src/core/android/SDL_android.cpp
rename : src/SDL_android.h => src/core/android/SDL_android.h
2011-01-24 21:20:30 -08:00