Commit graph

2418 commits

Author SHA1 Message Date
Sam Lantinga
9e64157aee Whoops, the X11 driver doesn't support fullscreen modes (yet)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403331
2008-12-13 13:30:11 +00:00
Sam Lantinga
b2aebcc980 Fixed BadMatch error in X11 renderer
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403330
2008-12-13 13:10:53 +00:00
Sam Lantinga
8e523bb721 Updated test for API changes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403329
2008-12-13 12:34:28 +00:00
Sam Lantinga
170521f21e Fixed SDL 1.2 compatibility problem.
The API specifies that SDL_OpenAudio() will fill out the 'desired' audio spec
with the correct samples and size set by the driver.  This value is important
since it may be used by applications that size audio buffers, etc.

However, we want to allow advanced applications to call SDL_OpenAudioDevice()
which gets passed a const 'desired' parameter, and have the correct data filled
into the 'obtained' parameter, possibly allowing or not allowing format changes.

So... 'obtained' becomes the audio format the user callback is expected to use,
and we add flags to allow the application to specify which format changes are
allowed.

Note: We really need to add a way to query the 'obtained' audio spec.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403328
2008-12-13 06:36:47 +00:00
Sam Lantinga
0e5cb512e3 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403327
2008-12-13 06:27:58 +00:00
Sam Lantinga
8437f9f8d2 Updated TODO list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403326
2008-12-13 04:11:24 +00:00
Edgar Simo
f6dfd2babf Some error checking when destroying the HelperWindow.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403325
2008-12-12 15:51:57 +00:00
Sam Lantinga
1d49195b8c Added current_w and current_h to SDL_VideoInfo for SDL 1.2 compatibility
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403324
2008-12-12 06:46:20 +00:00
Sam Lantinga
9719f4078b Updated TODO list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403323
2008-12-10 08:39:00 +00:00
Sam Lantinga
61a7bca88f Date: Sun, 07 Dec 2008 13:35:23 +0100
From: Couriersud
Subject: SDL: Mouse last_x, last_y into SDL_Mouse

the attached diff moves the static vars last_x and last_y into
SDL_Mouse. These, as far as I understand it, should be tied to the
individual mouse.

The patch also makes the code check for out of window conditions of
mouse->x,y when relative movements are passed to MouseSendMotion.

Also attached is the latest DirectFB code (dfb20081208) supporting
multiple mice and keyboards. This works quite well with sdlmame now. It
however needs more testing with different directfb configurations.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403322
2008-12-08 00:52:12 +00:00
Sam Lantinga
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Sam Lantinga
6e7ef5d5b1 A little cleanup for SDL snapshot release
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403319
2008-12-08 00:24:15 +00:00
Sam Lantinga
46a9b85814 Don't need multi-threaded X11 for SDL 1.3
Plus, this fixes lots of duplicate define warnings on Mac OS X

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403318
2008-12-07 23:57:42 +00:00
Sam Lantinga
d60660c1de Default SSE2 off on iX86, since gcc will use it for floating point operations
even if -mfpmath=387 is set.  Grr...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403317
2008-12-07 23:25:39 +00:00
Sam Lantinga
f9312a8957 Fixed palette sharing
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403316
2008-12-07 22:56:18 +00:00
Sam Lantinga
6096d0f8e1 Fixed updating the video surface when the palette changes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403315
2008-12-07 22:48:06 +00:00
Sam Lantinga
cc01f2a867 Fixed picking blit function when RLE fails
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403314
2008-12-07 22:37:40 +00:00
Sam Lantinga
b47ba57912 Better default format for Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403313
2008-12-07 22:29:58 +00:00
Sam Lantinga
45899bac10 Fixed crash in testpalette and potential crash in SDL_LoadBMP_RW()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403312
2008-12-07 22:25:16 +00:00
Sam Lantinga
a1b17450ce Whoops, fixed pitch bug after resizing a surface
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403311
2008-12-07 22:04:24 +00:00
Sam Lantinga
3eec2c4dd4 There's no reason to add extra code to notify the mice of window size changes.
Just query the window size when we care about it. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403310
2008-12-07 21:53:28 +00:00
Ryan C. Gordon
546fea4e11 Comment cleanup.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403309
2008-12-07 07:16:40 +00:00
Ryan C. Gordon
0096fd0e8d Don't hardcode RECT for fragment program texture targets.
Now we can generate what a given system needs when compiling the shader.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403308
2008-12-07 07:06:34 +00:00
Sam Lantinga
8b4a508fb4 Slight optimization of the shader, no need to scale into 0..255
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403307
2008-12-07 04:38:32 +00:00
Sam Lantinga
5908561ee3 Added official support for GL_APPLE_ycbcr_422 and GL_MESA_ycbcr_texture
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403306
2008-12-07 04:02:23 +00:00
Sam Lantinga
0fa8c80ca0 The YCbCr texture extension works now that bytes_per_pixel() returns the
correct value for YUV textures.  Yay!

I'm still cheering for Ryan's pixel shader instead, since once it works
different shaders can handle all the YUV formats.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403305
2008-12-06 18:37:06 +00:00
Sam Lantinga
f03cab2b46 Fixed the shader fragment problems using 2 byte YUV data in a 4 byte RGB
texture.  This is a total hack though.  Maybe we should be using a different
texture format?

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403304
2008-12-06 18:22:28 +00:00
Sam Lantinga
21f724582c Date: Sat, 06 Dec 2008 15:27:00 +0100
From: Couriersud
Subject: SDL: Relative mouse movements

The patch below will reenable processing of relative mouse movements.
The DirectFB drivers generates those in "grabbed" mode. These ensure,
that even in fullscreen mode relative movements are reported. SDLMAME
depends on this for games with trackballs.

Looking at the code I ask myself whether relative movements should be
handled in the drivers (x11, directfb). Both x11 and directfb are able
to report relative movements. This would leave it to the driver to use
the most appropriate method for relative movements when at the border of
a fullscreen window or being "grabbed".

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403303
2008-12-06 17:50:50 +00:00
Sam Lantinga
d8d1c9d630 Date: Sat, 06 Dec 2008 14:54:10 +0100
From: Couriersud
Subject: SDL: DirectFB mouse patch

the attached patch (again) properly registers the mouse in the DirectFB
driver.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403302
2008-12-06 17:46:55 +00:00
Sam Lantinga
700f822150 The previous checkin fixes the crash, so at least we're not overrunning
the texture pixel data anymore...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403301
2008-12-06 17:43:10 +00:00
Sam Lantinga
2eb5631950 Progress, maybe. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403300
2008-12-06 17:41:01 +00:00
Sam Lantinga
535f3bf809 Fixed SDL_SetAlpha compatibility function to match the documentation
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403299
2008-12-06 05:49:53 +00:00
Sam Lantinga
ffbae1776d Fixed bug picking blitters
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403298
2008-12-06 05:49:08 +00:00
Sam Lantinga
d929dca890 Rebind the context to the window area and update matrices when the window size changes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403297
2008-12-06 05:23:35 +00:00
Ryan C. Gordon
b59986d747 Initial pixel shader support for YUV textures in the GL renderer.
This work is not complete yet!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403296
2008-12-06 00:56:47 +00:00
Sam Lantinga
d9bd99d552 minor bug
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403295
2008-12-05 07:01:12 +00:00
Sam Lantinga
b19daa445d Whoops, can't call glOrtho() repeatedly
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403294
2008-12-05 07:00:58 +00:00
Sam Lantinga
b1b8c20318 The matrices have already been set, so you don't have to re-set them.
You always need to reset the viewport when activating the renderer in
case the context had been set to a different window previously.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403293
2008-12-05 06:22:19 +00:00
Sam Lantinga
c0257e7bea Fixed crashes when resizing video modes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403292
2008-12-05 06:19:49 +00:00
Sam Lantinga
49119e31d8 fixed formatting
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403291
2008-12-05 06:19:09 +00:00
Sam Lantinga
b8cbb6cd69 Allow resizing of SDL 1.2 compatibility video mode
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403290
2008-12-04 16:54:22 +00:00
Sam Lantinga
4a86bb6ebf Added very slow software scaling to the X11 renderer
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403289
2008-12-03 12:10:51 +00:00
Sam Lantinga
a403d94807 If scaling isn't supported, do an unscaled copy instead of not showing anything.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403288
2008-12-03 11:09:58 +00:00
Sam Lantinga
a547129012 Fixed crash on 64-bit systems
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403287
2008-12-03 06:32:04 +00:00
Sam Lantinga
a9f8def25b Date: Tue, 02 Dec 2008 23:38:26 +0100
From: Couriersud
Subject: Re: SDL: Keyboard layout unknown

I have attached a diff which will add an additional keyboard layout to
the x11 driver. The issue arose, when I moved to ubuntu intrepid. I was
only able to map the keys available on my keyboard. The differences to
the existing keyboard was the mapping of HOME,UP,DOWN and some other
keys.

Now only one issue remains. Dead keys (e.g. ^, ` ') on european
keyboards do not generate a "scancode" event. Just a text event when the
key is composed (e.g. ?? ?? ??).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403286
2008-12-03 04:32:24 +00:00
Sam Lantinga
4a696cc335 Added slow but complete blit fallback
Don't try to RLE encode surfaces that have alpha channel and alpha modulation
Don't turn on blending when converting an RGB surface to RGBA format
Do turn on blending when converting colorkey to alpha channel

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403285
2008-12-02 17:14:04 +00:00
Sam Lantinga
7e7747ebec Added missing header
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403284
2008-12-02 17:10:05 +00:00
Sam Lantinga
9648484187 Removed unused function
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403283
2008-12-02 16:10:21 +00:00
Sam Lantinga
49bf0c5792 You can't use memset() on screen formats with an alpha channel
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403282
2008-12-02 16:09:58 +00:00
Sam Lantinga
bb3dd43be0 Make sure that we don't generate floating point code that would cause illegal instruction exceptions on older processors, unless someone passes --enable-ssemath to configure.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403281
2008-12-01 23:09:09 +00:00