Commit graph

4428 commits

Author SHA1 Message Date
Sam Lantinga
608ec7da5f Removed newlines from log messages
Slightly speeded up event history processing each frame
2011-03-09 15:51:51 -08:00
Sam Lantinga
48ef3c9e2e Fixed touches for the !IPHONE_TOUCH_EFFICIENT_DANGEROUS case 2011-03-09 15:09:00 -08:00
Sam Lantinga
63251bb510 Use SDL_Log() so the messages show up on iPhone and Android 2011-03-09 15:08:41 -08:00
Sam Lantinga
bf7ca0d601 Make the globals static so they're initialized to zero. 2011-03-09 14:47:37 -08:00
Sam Lantinga
ca4b8205c8 Fixed testgesture to work on the iPhone 2011-03-09 14:46:09 -08:00
Sam Lantinga
5f55b90cbd Fixed linking x64 with Visual Studio 2010. 2011-03-08 22:48:21 -08:00
Sam Lantinga
57a49884db Removed obsolete test program 2011-03-08 16:58:45 -08:00
Sam Lantinga
78ea69628d Added missing test program 2011-03-08 16:58:25 -08:00
Sam Lantinga
e8705164b3 Fixed 64-bit compiling 2011-03-07 23:27:51 -08:00
Sam Lantinga
f1ca1a0190 The msimg library isn't needed anymore. 2011-03-07 22:06:12 -08:00
Sam Lantinga
a17d0eb586 The MMX and 3DNow! instructions can't be compiled by 64-bit Visual Studio. 2011-03-07 22:04:10 -08:00
Sam Lantinga
4030919ec9 The msimg library isn't needed anymore. 2011-03-07 22:03:29 -08:00
Sam Lantinga
5137fef264 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
8125f3670f Fixed compiler warning on Visual C++ 2011-03-07 14:07:08 -08:00
Sam Lantinga
150d58413e 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
5b00b273ef Enabled multi-touch 2011-03-07 09:58:21 -08:00
Sam Lantinga
f33af0d17b Added gesture test program 2011-03-07 09:57:59 -08:00
Sam Lantinga
43bb47452e Removed associated source files 2011-03-07 09:35:53 -08:00
Sam Lantinga
b1a4969b91 Removed associated resources 2011-03-07 09:35:26 -08:00
Sam Lantinga
e5f6375640 Removed old test 2011-03-07 09:35:01 -08:00
Sam Lantinga
0469477aa9 Fixed compile error 2011-03-07 09:25:42 -08:00
Sam Lantinga
1c83266beb 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
e43f8d8003 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
2bea0e636f We explicitly don't know how to handle 1 and 4 bpp pixel formats. 2011-03-07 00:08:23 -08:00
Sam Lantinga
2d5640cc96 Fixed memory corruption with invalid pixel values. 2011-03-06 23:56:23 -08:00
Sam Lantinga
b2ad2a405c Fixed up structure to match header, added missing Aloss 2011-03-06 23:54:50 -08:00
Sam Lantinga
4c1a08f150 Added padding for better aligned access to *shift/*loss members 2011-03-06 23:54:20 -08:00
Sam Lantinga
d8392622bb Better error reporting in allocating a pixel format. 2011-03-06 21:49:52 -08:00
Sam Lantinga
a1ac5f42e0 Fixed garbage trying to create a FourCC pixel format. 2011-03-06 21:47:48 -08:00
Sam Lantinga
61b11f87da Fixed initializing pixel format for indexed formats 2011-03-06 21:34:45 -08:00
Sam Lantinga
d60c96a568 You need libfat for the filesystem code. 2011-03-06 21:19:53 -08:00
Sam Lantinga
387ca6c6cb Only compile the NDS renderer if specified in the config file. 2011-03-06 21:19:02 -08:00
Sam Lantinga
f0d94b59fb A better way of setting the fullscreen flag for windows on Nintendo DS 2011-03-06 21:18:36 -08:00
Sam Lantinga
ac662b8421 Fixed compiler warning 2011-03-06 21:17:44 -08:00
Sam Lantinga
924f55eebe Fixed compiler warnings 2011-03-06 21:17:09 -08:00
Sam Lantinga
253835bdd2 Fixed compiler warning 2011-03-06 21:15:46 -08:00
Sam Lantinga
a1dfcdb79d Fixed compiler warning 2011-03-06 21:15:28 -08:00
Sam Lantinga
6e05dee645 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
0a92449744 The Xext directory no longer exists 2011-03-05 10:03:57 -08:00
Sam Lantinga
2368a3301a Added support for Windows cursors 2011-02-28 23:50:32 -08:00
Sam Lantinga
4b86de315f Fixed warning on Windows 2011-02-28 23:50:07 -08:00
Sam Lantinga
0f59f2fdbb Fixed memory leak freeing cursors 2011-02-28 22:21:32 -08:00
Sam Lantinga
8457ab1e62 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
Sam Lantinga
5b710cfee4 Oh yeah, we're using extern 2011-02-28 21:48:02 -08:00
Sam Lantinga
10c875b184 Fullscreen doesn't automatically grab the cursor. 2011-02-28 20:19:28 -08:00
Sam Lantinga
9053cfa4cc Removed extra NoStdio configuration 2011-02-28 20:16:12 -08:00
Sam Lantinga
ddb28aeb49 Removed duplicate assignment 2011-02-28 18:03:14 -08:00
Sam Lantinga
9b04915913 If you pass in texture format 0, it'll use the first supported texture format. 2011-02-28 14:47:39 -08:00
Sam Lantinga
05b0c40ffa Fixed setting draw color for clear 2011-02-28 09:26:35 -08:00
Sam Lantinga
6053ae5234 OSF isn't supported anymore. 2011-02-28 09:09:13 -08:00