Commit Graph

839 Commits

Author SHA1 Message Date
Sam Lantinga
6ff12049fa Date: Tue, 12 Aug 2003 14:26:19 +0200 (MEST)
From: "Mattias Engdeg?rd"
Subject: bug in SDL_GetRGB/GetRGBA

There's an embarrassing bug in GetRGB/GetRGBA which apparently has been there
for years. It incorrectly converts colours with < 8 bits/channel.
It came to my attention today in #sdl.

What it does now is (for each channel):

  rv = (pixel & fmt->Rmask) >> fmt->Rshift;
  *r = (rv << fmt->Rloss) + (rv >> (8 - fmt->Rloss));

which is wrong; the last line should be

  *r = (rv << fmt->Rloss) + (rv >> (8 - (fmt->Rloss << 1)));
2003-08-12 15:17:20 +00:00
Sam Lantinga
8d141eb58b Date: Mon, 11 Aug 2003 22:49:06 +0100
From: Peter Naulls
Subject: RISC OS patches

This patch includes a patch to configure.in for RISC OS cross compiling
which was somehow missed from last time.

It also corrects BPP setting and checking behaviour.
2003-08-11 22:28:13 +00:00
Sam Lantinga
894cffa345 *** empty log message *** 2003-08-10 17:49:51 +00:00
Sam Lantinga
6e83dd8258 Date: Sun, 10 Aug 2003 13:24:45 -0400
From: Darrell Walisser
Subject: Re: Updated projects?

There was one additional patch I forgot to send. I needed to add a few
exports to the exports file.
2003-08-10 17:48:56 +00:00
Sam Lantinga
0ebbbf6cad The cdrom code doesn't build on MacOS X 10.1, disabled for now... 2003-08-10 07:46:21 +00:00
Sam Lantinga
f6977ac479 Date: Sat, 9 Aug 2003 20:14:06 -0400
From: Darrell Walisser
Subject: Re: Updated projects?

>> Did you get a chance to look at my "Custom Cocoa" demo? I have a few
>> minor patches that enable SDL/Cocoa integration, and a project
>> template.
>
> I didn't yet, but go ahead and send me the patches. :)
>

I updated the patch for current CVS. There are a lot of changes, but I
don't think I've broken anything. This patch also improves the behavior
of window minimize/deminimize.
2003-08-10 07:21:43 +00:00
Sam Lantinga
8c8d5e6cd0 *sigh* 2003-08-09 22:49:28 +00:00
Sam Lantinga
a12b89e97f More grumble grumble... 2003-08-09 22:13:38 +00:00
Sam Lantinga
51c0c02048 Grumble grumble 2003-08-09 21:14:26 +00:00
Sam Lantinga
ee6a5f144b *** empty log message *** 2003-08-09 21:13:22 +00:00
Sam Lantinga
a8a2eb4ecd Turn dynamic loading of esd and arts on by default
Hmm, what to do about Objective C dependencies....
2003-08-09 20:36:29 +00:00
Sam Lantinga
fc54611243 *** empty log message *** 2003-08-09 18:27:27 +00:00
Sam Lantinga
a27dd04860 *** empty log message *** 2003-08-09 18:22:16 +00:00
Sam Lantinga
c71f932376 Fixed automake warnings about Objective C support 2003-08-09 18:19:42 +00:00
Sam Lantinga
68dc36e855 Fix compilation on MacOS 10.1 2003-08-09 18:12:11 +00:00
Sam Lantinga
7ca76eb401 *** empty log message *** 2003-08-08 21:39:12 +00:00
Sam Lantinga
fe45cd4244 Date: Mon, 28 Jul 2003 18:30:50 +0300
From: "Mike Gorchak"
Subject: New test for overlays

While writting QNX Photon Overlay code I've found that the existent overlay test application is not enough, it performs too artificial tests - it always moves/resizes the overlay's viewport, but in the real life that happens very rare. So I decided to write new test (commonly base on testoverlay.c code) and called it testoverlay2 :)

moose.dat - raw 8 bit paletted data of the small movie. (It was a moose.gif, also included in the attachment as reference, but not needed for this test, it is just for information). I cannot find, who created this .gif, so no credits this time :) But over inet I saw this gif zillion times, so I think we do not infringing somebody rights :)
2003-08-08 21:31:18 +00:00
Sam Lantinga
229e718d66 *** empty log message *** 2003-08-08 20:09:15 +00:00
Sam Lantinga
4822bb295e *** empty log message *** 2003-08-08 18:00:39 +00:00
Sam Lantinga
7b474f42d2 *** empty log message *** 2003-08-08 15:08:41 +00:00
Sam Lantinga
5176066edf *** empty log message *** 2003-08-08 15:01:14 +00:00
Sam Lantinga
29cfd86f16 *** empty log message *** 2003-08-06 21:54:32 +00:00
Sam Lantinga
3735bda06c ate: Mon, 4 Aug 2003 19:10:14 +0300
From: "Mike Gorchak"
Subject: SDL/QNX forgotten fixes

Just found, that one chunk for configure.in has not been applied and one for\
gotten by me :) Please add it to CVS.

P.S. Now QNX6.2.1 have the dlopen in libc and in the libltdl. So libc's vari\
ant more prefered, and ltdl rest for compatibility. In this small patch I wa\
s added proper checks.
2003-08-06 20:20:30 +00:00
Sam Lantinga
6e96b51fbd *** empty log message *** 2003-08-06 20:12:00 +00:00
Sam Lantinga
ba5e2f9baf Date: Sun, 3 Aug 2003 22:07:57 +0200
From: Max Horn
Subject: SDL OSX fullscreen FIX

the attached patch fixes the fullscreen problems on SDL/OSX. The cause
was that click events are bounded by winRect. Now, winRect is set to
the size of the video surface. But if you e.g. request a 640x420
surface, you might get a 640x480 "real" surface. Still,
SDL_VideoSurface->h will be set to 420! Thus, the upper 60 pixels in my
example received no mouse down events.

My fix simply disables this clipping when in full screen mode - after
all, all clicks then should be inside the screen surface. Higher SDL
functions ensure that the coordinates then are clipped to 640x420. It
works fine in all my tests here. I don't know if it's the right thing
to do in multi screen scenarios, though.
2003-08-04 01:00:30 +00:00
Sam Lantinga
d430656ec6 Date: Sat, 2 Aug 2003 16:22:51 +0300
From: "Mike Gorchak"
Subject: New patches for QNX6

Here my patches for the SDL/QNX:

QNXSDL.diff - diff to non-QNX related sources:

- updated BUGS file, I think QNX6 is now will be officially supported
- configure.in - added shared library support for QNX, and removed dependency between the ALSA and QNX6.
- SDL_audio.c - added QNX NTO sound bootstrap insted of ALSA's.
- SDL_sysaudio.h - the same.
- SDL_nto_audio.c - the same.
- SDL_video.c - right now, QNX doesn't offer any method to obtain pointers to the OpenGL functions by function name, so they must be hardcoded in library, otherwise OpenGL will not be supported.
- testsprite.c - fixed: do not draw vertical red line if we are in non-double-buffered mode.

sdlqnxph.tar.gz - archive of the ./src/video/photon/* . Too many changes in code to make diffs :) :

+ Added stub for support hide/unhide window event
+ Added full YUV overlays support.
+ Added window maximize support.
+ Added mouse wheel events.
+ Added support for some specific key codes in Unicode mode (like ESC).
+ Added more checks to the all memory allocation code.
+ Added SDL_DOUBLEBUF support in all fullscreen modes.
+ Added fallback to window mode, if desired fullscreen mode is not supported.
+ Added stub support for the GL_LoadLibrary and GL_GetProcAddress functions.
+ Added resizable window support without caption.
! Fixed bug in the Ph_EV_EXPOSE event handler, when rectangles to update is 0 and when width or height of the rectangle is 0.
! Fixed bug in the event handler code. Events has not been passed to the window widget handler.
! Fixed codes for Win keys (Super/Hyper/Menu).
! Fixed memory leak, when deallocation palette.
! Fixed palette emulation code bugs.
! Fixed fullscreen and hwsurface handling.
! Fixed CLOSE button bug. First event was passed to the handler, but second terminated the application. Now all events passed to the application correctly.
- Removed all printfs in code, now SDL_SetError used instead of them.
- Disabled ToggleFullScreen function.

README.QNX - updated README.QNX file. Added much more issues.
2003-08-04 00:52:42 +00:00
Sam Lantinga
357af3bf43 Date: Sun, 27 Jul 2003 22:37:59 +0200
From: Max Horn
Subject: SDL whitespace patch

this patch is lowest priority: it only contains indention fixes. In
some places, instead of tabs, whitespaces where used for indention. But
of course that only "looks good" if you use the exact same tab width as
the author of those files. I tried to replace such cases with tabs for
a more uniform indention. I only did that for a few files.

So, no code changes in this, only whitespaces transformed.
2003-07-28 01:47:55 +00:00
Sam Lantinga
84b6daaaa8 *** empty log message *** 2003-07-27 17:00:40 +00:00
Sam Lantinga
606a93ada9 You can't create a YUV overlay in OpenGL mode 2003-07-26 20:02:00 +00:00
Sam Lantinga
31edd55ec4 *** empty log message *** 2003-07-26 19:50:00 +00:00
Sam Lantinga
0af177855d Use SDL's internal x, y for mouse button events - fixes relative motion bug. 2003-07-23 05:30:08 +00:00
Sam Lantinga
dfa8970b44 Date: Thu, 24 Jul 2003 01:40:17 +0200
From: Andrew Straw
Subject: Patch: Mac OS X window position environment variable
2003-07-23 04:39:44 +00:00
Sam Lantinga
7777531c48 Merged in Ryan's multisample code for MacOS, and changed the constants to match. 2003-07-22 15:33:28 +00:00
Sam Lantinga
19ffa849ea Date: Thu, 24 Apr 2003 15:13:47 -0400
From: Shawn Kirst
Subject: SDL-1.2.5 patch to add ARB_multisample support

Attached is a patch I have written for SDL-1.2.5 that adds ARB_multisample
support.  I only have the X11 and Win32 video patched.  The Win32 patch also
adds support for WGL_ARB_pixel_format, as it was required for getting a
multisample capable pixel format.  No additional GL header files are required
to compile on either platform (though you need an up-to-date glx.h for X11).

Requesting a multisample pixel format is made possible using
SDL_GL_SetAttribute with the two new SDL_GLattr's I've added
(SDL_GL_SAMPLE_BUFFERS and SDL_GL_SAMPLES).  I've been using SDL in my
projects for quite a while now, so I am happy to contribute back to the
project.  Now you can have and control FSAA in your SDL/GL apps at the
application level!
2003-07-22 15:10:06 +00:00
Sam Lantinga
4b88b12551 Added audio and CD-ROM support for OSF/Tru64 (thanks Hayashi!) 2003-07-22 14:01:21 +00:00
Sam Lantinga
71fb0d86d2 *** empty log message *** 2003-07-22 05:29:48 +00:00
Sam Lantinga
91f6dc0a37 *** empty log message *** 2003-07-22 04:50:38 +00:00
Patrice Mandin
90f95f489c pmandin: Added Atari LDG shared object loader 2003-07-16 11:54:13 +00:00
Ryan C. Gordon
0b70da0b66 We need to lookup the address of glGetString before calling GL_MakeCurrent(),
since the X11 target needs to query for extensions in there...hopefully this
 other platforms don't need to have a current context before symbol lookup
 works or something strange like that... --ryan.
2003-07-12 13:30:30 +00:00
Sam Lantinga
8ad5715b0b Added some notes from the benefit of my experience. :) 2003-07-10 07:56:19 +00:00
Sam Lantinga
5f885f7e0e Exposed SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject() APIs 2003-07-10 07:46:19 +00:00
Sam Lantinga
f7fa1d8464 Added RISCOS Makefiles to the configure process 2003-07-09 15:38:28 +00:00
Sam Lantinga
964525d936 Fixed incorrect prototype for glXQueryExtensionsString() 2003-07-09 15:32:21 +00:00
Patrice Mandin
4d7c7bd88d Atari MiNT: remove useless files 2003-07-07 19:19:39 +00:00
Patrice Mandin
3bae012d34 Atari MiNT: added more audio drivers 2003-07-07 19:16:03 +00:00
Ryan C. Gordon
15e54d83f1 Removed direct dependency on OpenGL (call current_video->glGetString() instead
of glGetString() directly)...otherwise we'd have to explicitly link to a
 libGL.  --ryan.
2003-07-01 16:35:54 +00:00
Sam Lantinga
d14ff3a635 *** empty log message *** 2003-07-01 01:18:27 +00:00
Sam Lantinga
d767a62e4a Date: 28 Jun 2003 22:42:52 +0100
From: Alan Swanson
Subject: Re: [SDL] New XFree 4.3 Video Mode Patch

I have a wee amendment that moves the qsort in set_best_resolution
to only occur after failing to find an exact match only. This would
make absolutely sure we get a user set mode.

While I've never had any problems for my normal resolutions (1280x1024,
1024x768, 800x600 & 640,480) while closely examining the output from
qsort I've noticed it doesn't seem to sort the modes fully. These is
one definite wrong at 1152x768 and a few that just look wrong to me.

From a program (attached) I made to examine this more easily. X has
sorted its mode list using the same method as ours (plus frequency),
and our user modes get inserted without any other movement.

On the patch I've made I've also changed cmpmodes to sort on vertical
resolution and then horizontal. Ie vertical is now most significant
bit.
2003-06-28 21:52:26 +00:00
Patrice Mandin
f3a40b09ab Bugfix: some Makefiles in subdirectories created before their upper-level ones 2003-06-28 21:38:14 +00:00
Sam Lantinga
20f2cf5c6d I'm American, does it show? ;-) 2003-06-28 17:39:46 +00:00