Commit Graph

489 Commits

Author SHA1 Message Date
Sam Lantinga
2d4e47a5a7 Added a function to create color cursors: SDL_CreateColorCursor() 2011-03-11 14:14:38 -08:00
Sam Lantinga
93c94e872e Fixing permissions 2011-03-11 13:22:43 -08:00
Sam Lantinga
069fbf4861 Gamma support is back!
New API functions:
	SDL_SetWindowBrightness()
	SDL_GetWindowBrightness()
	SDL_SetWindowGammaRamp()
	SDL_GetWindowGammaRamp()
	SDL_CalculateGammaRamp()
2011-03-11 08:49:20 -08:00
Sam Lantinga
9a54623af4 Added screenshot support for tests using the common framework. 2011-03-10 00:58:45 -08:00
Sam Lantinga
5bd2b6863a Fixed bug 1163 (SDL_TEXTINPUT not being received on iPhoneOS) 2011-03-09 17:38:12 -08:00
Sam Lantinga
5dcb9d6a2a Removed newlines from log messages
Slightly speeded up event history processing each frame
2011-03-09 15:51:51 -08:00
Sam Lantinga
f2f0596d35 Use SDL_Log() so the messages show up on iPhone and Android 2011-03-09 15:08:41 -08:00
Sam Lantinga
ee32f9fe9d Make the globals static so they're initialized to zero. 2011-03-09 14:47:37 -08:00
Sam Lantinga
848802dbb4 Fixed testgesture to work on the iPhone 2011-03-09 14:46:09 -08:00
Sam Lantinga
8261852483 Fixed warning on Windows 2011-02-28 23:50:07 -08:00
Sam Lantinga
f0ee261c7b Implemented mouse relative mode on Mac OS X. 2011-02-27 22:06:46 -08:00
Sam Lantinga
0068b61c49 Added a cleaner way to set the default cursor.
Added a way to cycle through the default cursor in testcursor.c
2011-02-27 21:36:23 -08:00
Sam Lantinga
8b92536842 Fixed minimizing fullscreen windows.
Removed misleading hide/unhide Cocoa notifications.
We have no way of knowing when a Cocoa window is maximized and then restored (right?)
Disabled spamy mouse motion events by default.
2011-02-27 21:17:06 -08:00
Sam Lantinga
7fa84f6a78 Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
437682d6dc Fixed testgles on iOS (bug 1136) 2011-02-20 14:16:11 -08:00
Sam Lantinga
2788694b17 Simple rumble API for haptic
Edgar Simo      2011-02-20 10:27:52 PST

Adding patch that adds a simplified API for the haptic subsystem built ontop of
the "real one" for those who want simple rumble without jumping through hoops.

Adds 4 functions:

- extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float
strength, Uint32 length );
- extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);

Also provided is test/testrumble.c which does test this.

This has all been tested on linux and has worked, but due to being built ontop
of the other haptic API it should work on all OS the same.
2011-02-20 10:54:44 -08:00
Sam Lantinga
a0a3c805a2 Added a revision number for easy compile-time tests. 2011-02-20 10:42:51 -08:00
Sam Lantinga
d72eb6eedc Reset the viewport since we're stretching to the entire window. 2011-02-20 09:24:02 -08:00
Sam Lantinga
b8b0cce2e0 We have the correct window, we don't have to search for it, duh. :) 2011-02-19 11:26:49 -08:00
Sam Lantinga
307a90d292 Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.

You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.
2011-02-16 02:37:09 -08:00
Sam Lantinga
dc4e118053 Hot damn, SDL_WM_ToggleFullScreen() works on all platforms now. :) 2011-02-16 00:45:10 -08:00
Sam Lantinga
749abb9261 Allow centering on a different display 2011-02-15 22:51:29 -08:00
Sam Lantinga
b59da3ffdc Changed the concept of a render clip rect to a render viewport.
The render viewport is automatically re-centered when the window changes size, so applications that don't care will not have to handle recalculating their rendering coordinates.

Fixed API for drawing and filling multiple rectangles - the parameter should be an array of rects, not an array of pointers to rects.

Fixed API for updating window rects for consistency with other APIs - the order is pointer to array followed by count in array.
2011-02-15 13:59:59 -08:00
Sam Lantinga
e66826bbdf Patch from Ken Rogoway:
Migrate all of the recent changes into the SDL VS2005 project file.
Fix missing return value in SDL_pixels.c
Fix compile error in testscale.c, variable was incorrectly named.
Added VS2005 project file for testscale
2011-02-14 00:45:16 -08:00
Sam Lantinga
ea3c0c473a Updated the platform test for the new CPU feature functions. 2011-02-13 01:29:29 -08:00
Sam Lantinga
f1441f7929 changeset: 5278:b4b71ec2af73
tag: tip
user: Martin Decky <martin@decky.cz>
date: Sat Feb 12 22:27:14 2011 +0100
summary: fix typo (assigning height value into displayrect.w instead of displayrect.h)
2011-02-12 17:36:09 -08:00
Sam Lantinga
362639036a Frank Zago to sdl
The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
2011-02-12 11:36:56 -08:00
Sam Lantinga
5e1535525c Initial pass at shader YV12 support - doesn't quite work yet. 2011-02-12 00:25:02 -08:00
Sam Lantinga
aef6fb230a Fixed SSE4 detection, and split it into SSE 4.1 and 4.2 2011-02-11 23:02:35 -08:00
Sam Lantinga
2af371cc2e Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
395873376b Cleaned up the file a bit for tutorial viewing 2011-02-11 13:06:35 -08:00
Sam Lantinga
30ee8f3440 Added a very simple example of texture streaming 2011-02-11 12:24:59 -08:00
Sam Lantinga
37522ace07 Fixed error check 2011-02-11 11:43:58 -08:00
Sam Lantinga
d43d02f3c3 Allow windows to be created on non-primary displays. 2011-02-10 22:37:01 -08:00
Sam Lantinga
37993063c6 Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
2011-02-10 14:44:25 -08:00
Sam Lantinga
debc4678c8 Be explicit about what display you're querying. The default display is 0. 2011-02-10 12:14:37 -08:00
Sam Lantinga
f2729d2d2c Removed gamma support since it wasn't widely used and not well supported. 2011-02-10 11:39:08 -08:00
Sam Lantinga
19fcc31c58 Added a scaling test program 2011-02-09 15:37:07 -08:00
Sam Lantinga
dac85c6457 Fixed crash when shaders are not supported 2011-02-09 09:36:40 -08:00
Sam Lantinga
16627e0975 Added the ability to turn on logging output to the test programs 2011-02-08 23:13:28 -08:00
Sam Lantinga
0bed887c78 Added a simple GLSL example using SDL 2011-02-08 22:11:16 -08:00
Sam Lantinga
23370c8928 Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased. 2011-02-07 09:37:11 -08:00
Sam Lantinga
1163ebc192 Updated testoverlay2 to use the SDL 2D rendering API 2011-02-07 00:46:43 -08:00
Sam Lantinga
295ea455df Fixed compiling the automated test 2011-02-05 13:06:50 -08:00
Sam Lantinga
7558f02067 Allow resizing of testsprite 2011-02-04 21:46:38 -08:00
Sam Lantinga
4f6e1878af Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
e4569cfdca Making the API simpler, moved the surface drawing functions to the software renderer. 2011-02-03 02:45:29 -08:00
Sam Lantinga
ff6324fb43 Updated for API changes 2011-02-03 02:42:50 -08:00
Sam Lantinga
533d4862d6 Simplified and improved the process of creating a texture from a surface. 2011-02-03 00:54:29 -08:00
Sam Lantinga
3f10d86ed9 Fixed compiling with the latest API changes 2011-02-02 14:34:24 -08:00