Commit Graph

11015 Commits

Author SHA1 Message Date
Sam Lantinga
ac080d02da Fixed permissions for C source files 2011-03-11 11:52:41 -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
9f5b3c27ae Fixed bug 1162 (Error calling SDL_RenderReadPixels() with format=0) 2011-03-10 01:03:43 -08:00
Sam Lantinga
cd9a0cf8a6 SDL_RenderReadPixels() is restricted to the viewport area. 2011-03-10 01:00:43 -08:00
Sam Lantinga
9a54623af4 Added screenshot support for tests using the common framework. 2011-03-10 00:58:45 -08:00
Sam Lantinga
b206d7290d Include an updated Version.rc in Visual Studio builds 2011-03-09 18:26:35 -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
ba49be2cf0 Fixed touches for the !IPHONE_TOUCH_EFFICIENT_DANGEROUS case 2011-03-09 15:09:00 -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
f69f8b93cd Fixed linking x64 with Visual Studio 2010. 2011-03-08 22:48:21 -08:00
Sam Lantinga
f07d066c37 Removed obsolete test program 2011-03-08 16:58:45 -08:00
Sam Lantinga
fbf176acb4 Added missing test program 2011-03-08 16:58:25 -08:00
Sam Lantinga
cd962003a0 Fixed 64-bit compiling 2011-03-07 23:27:51 -08:00
Sam Lantinga
6b919539d3 The msimg library isn't needed anymore. 2011-03-07 22:06:12 -08:00
Sam Lantinga
634567b09a The MMX and 3DNow! instructions can't be compiled by 64-bit Visual Studio. 2011-03-07 22:04:10 -08:00
Sam Lantinga
923def6446 The msimg library isn't needed anymore. 2011-03-07 22:03:29 -08:00
Sam Lantinga
89d7238dbf Fixed the libraries linked with Visual Studio 2010, the msimg library isn't needed anymore. 2011-03-07 22:03:11 -08:00
Sam Lantinga
63ca2547e6 Fixed compiler warning on Visual C++ 2011-03-07 14:07:08 -08:00
Sam Lantinga
71bdd88dbf Fixed bug 1161 (Setting GL_ACCELERATED_VISUAL to 1 forces software rendering in Windows XP)
Jesse Anders      2011-03-05 23:30:09 PST

It seems that in Windows XP, setting SDL_GL_ACCELERATED_VISUAL to 1 actually
disables hardware acceleration and puts OpenGL in software mode.

In the source code, the corresponding WGL attribute is first set here:

*iAttr++ = WGL_ACCELERATION_ARB;
*iAttr++ = WGL_FULL_ACCELERATION_ARB;

Later, this code:

if (_this->gl_config.accelerated >= 0) {
    *iAttr++ = WGL_ACCELERATION_ARB;
    *iAttr++ =
        (_this->gl_config.accelerated ? WGL_GENERIC_ACCELERATION_ARB :
         WGL_NO_ACCELERATION_ARB);
}

Sets it again if SDL_GL_ACCELERATED_VISUAL has a value other than the default.

More importantly, the documentation I found states that
WGL_GENERIC_ACCELERATION_ARB asks for an MDC driver, which, although I don't
know much about this topic, doesn't seem like the correct choice here. As
mentioned previously, the end effect is that requesting hardware acceleration
in Windows XP actually forces the renderer into software mode (on my system at
least), which I'm guessing isn't the desired behavior.
2011-03-07 14:06:46 -08:00
Sam Lantinga
469fecbf1f Enabled multi-touch 2011-03-07 09:58:21 -08:00
Sam Lantinga
f03c39f88c Added gesture test program 2011-03-07 09:57:59 -08:00
Sam Lantinga
8038957962 Removed associated source files 2011-03-07 09:35:53 -08:00
Sam Lantinga
26cffe715d Removed associated resources 2011-03-07 09:35:26 -08:00
Sam Lantinga
4c09dda3ed Removed old test 2011-03-07 09:35:01 -08:00
Sam Lantinga
89e173550c Fixed compile error 2011-03-07 09:25:42 -08:00
Sam Lantinga
ef468aa07f Removed the NDS hack for ARGB1555 surfaces, since it's a general problem; added full color expansion for 16 bpp packed pixels. 2011-03-07 01:34:38 -08:00
Sam Lantinga
821c92eab1 Fixed bitmap order interpretation; SDL defaults to MSB ordering so a bitstream corresponds to a pixel stream.
The bitmap ordering is defined such that the numbering refers to the pixel index from left to right, and the number position refers to the bit position in the byte.

SDL_BITMAPORDER_4321 is the fourth pixel at the high bit and the first pixel at the low bit (LSBFirst)

SDL_BITMAPORDER_1234 is the first pixel at the high bit and the fourth pixel at the low bit (MSBFirst)
2011-03-07 00:30:05 -08:00
Sam Lantinga
1279ca64b1 We explicitly don't know how to handle 1 and 4 bpp pixel formats. 2011-03-07 00:08:23 -08:00
Sam Lantinga
581f9824ef Fixed memory corruption with invalid pixel values. 2011-03-06 23:56:23 -08:00
Sam Lantinga
3e0f876567 Fixed up structure to match header, added missing Aloss 2011-03-06 23:54:50 -08:00
Sam Lantinga
f78f25504b Added padding for better aligned access to *shift/*loss members 2011-03-06 23:54:20 -08:00
Sam Lantinga
551dbb0ab2 Better error reporting in allocating a pixel format. 2011-03-06 21:49:52 -08:00
Sam Lantinga
57b2784f3b Fixed garbage trying to create a FourCC pixel format. 2011-03-06 21:47:48 -08:00
Sam Lantinga
b29c9da5c8 Fixed initializing pixel format for indexed formats 2011-03-06 21:34:45 -08:00
Sam Lantinga
fc3def9a8b You need libfat for the filesystem code. 2011-03-06 21:19:53 -08:00
Sam Lantinga
8687086b1d Only compile the NDS renderer if specified in the config file. 2011-03-06 21:19:02 -08:00
Sam Lantinga
41ec33f3e3 A better way of setting the fullscreen flag for windows on Nintendo DS 2011-03-06 21:18:36 -08:00
Sam Lantinga
819b3f3559 Fixed compiler warning 2011-03-06 21:17:44 -08:00
Sam Lantinga
9ce85e3a61 Fixed compiler warnings 2011-03-06 21:17:09 -08:00
Sam Lantinga
3d078dceac Fixed compiler warning 2011-03-06 21:15:46 -08:00
Sam Lantinga
56666f8da6 Fixed compiler warning 2011-03-06 21:15:28 -08:00
Sam Lantinga
2a60f966cb a Nintendo ds update
Frank Zago to SDL

For those interested, here's a snapshot of the current port. I did away with
most of the previous attempt which was based of the sprite engine, because the
support is limited to 128 64x64 sprites. Instead I'm using the gl engine.
The drawback is that either the frame buffer or the gl engine can be used
because there's not that much video memory on a DS.

With minimal changes to their code, it can now run the following tests: ,
testspriteminimal, testscale and testsprite2. The last 2 only run under the
emulator for some reason. The tests are not included in this patch for size
reason.

In 16 bits mode, the 16th bit indicated transparency/opacity. If 0, the color
is not displayed. So I had to patch a few core file to set that bit to 1. See
patch for src/video/SDL_RLEaccel.c and src/video/SDL_blit.h. Is that ok, or is
there a better way ?

The nds also doesn't support windowed mode, so I force the fullscreen in
src/video/SDL_video.c.  Is that ok, or is there a better way ?

To get a smaller library, I also tried to not compile the software renderer
when the hardware renderer is compiled in, and define SDL_NO_COMPAT; however
the compilation eventually fails in SDL_surface.c because SDL_SRCCOLORKEY is
defined in SDL_compat.h. Is SDL_NO_COMPAT only for application and not SDL
itself ?
2011-03-06 21:12:19 -08:00
Sam Lantinga
81c862f80d The Xext directory no longer exists 2011-03-05 10:03:57 -08:00
Sam Lantinga
572abba9b9 Added support for Windows cursors 2011-02-28 23:50:32 -08:00
Sam Lantinga
8261852483 Fixed warning on Windows 2011-02-28 23:50:07 -08:00
Sam Lantinga
2d74fa0606 Fixed memory leak freeing cursors 2011-02-28 22:21:32 -08:00
Sam Lantinga
290017c996 You can use SDL_ConvertSurfaceFormat() now
Also, icon is guaranteed not to be NULL going into this function.
2011-02-28 21:58:37 -08:00