Commit Graph

1264 Commits

Author SHA1 Message Date
Sam Lantinga
7ce4dacee1 *** empty log message *** 2006-01-25 06:53:50 +00:00
Sam Lantinga
8d3f0fea3b Hopefully the X servers have been fixed (in 5 years) :) 2006-01-25 06:12:57 +00:00
Sam Lantinga
20d0529355 Date: Thu, 04 Sep 2003 02:12:35 +0200
From: Ignacio Casta�o <castanyo@yahoo.es>
Subject: [SDL] SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES ...

It would be nice to add the following lines:

case SDL_GL_MULTISAMPLEBUFFERS:
        *value = 0;
break;
case SDL_GL_MULTISAMPLESAMPLES:
        *value = 1;
break;

in wincommon\SDL_wingl.c int the function WIN_GL_GetAttribute at line
484, so that it returns the correct values when arb_pixel_format is not
supported.
2006-01-25 06:04:21 +00:00
Sam Lantinga
a89982e922 Date: 10 Jun 2003 15:30:59 -0400
From: Mike Shal
Subject: [SDL] Bug in SDL_wave.c?

Hey everyone, I'm not sure if this is a bug in SDL, or if I just have
incorrect WAV files.  The problem I'm having is loading multiple
concatenated WAVs from SDL_LoadWAV_RW.  Some WAV files put comments at
the end of the file (which may be bad form), and SDL doesn't skip past
them when reading from the RWops.  So the next WAV I try to load will
start at the comment section of the previous WAV, which obviously
doesn't work.  If anyone else is having this problem, one quick fix you
can do is run sox on the bad WAVs, which strips out all of the comment
sections.
Eg:

$ sox sound.wav tmp.wav
$ mv -f tmp.wav sound.wav

The other fix is to patch SDL_wave.c, which is included with this email.
(Assuming I made the patch correctly :).  All it does is calculate how
much remaining space there is in the WAV file after the data chunk, and
does SDL_RWseek to skip it.  I don't think it should interfere with
anything else, but if someone could check it that would be nice :).  If
the bug is really with SDL and not with my WAVs, can someone work this
into the next version of SDL? Thanks,

-Mike Shal
2006-01-24 07:20:18 +00:00
Sam Lantinga
1cb74d4856 te: Thu, 17 Apr 2003 11:25:26 -0700
From: "Jim"
Subject: [SDL] Frame buffer patches...

Would seem that GCC 3.2.2 promotes all signed values to unsigned if any single vlaue is unsigned in an expression...

for instance when calculating an elo touch position....evertyhign is an (int) except for cach_vinfo.xres which is unsigned.  THerefore if y
ou reverse the SDL_ELO_MIN_X and SDL_ELO_MAX_X values the resulging negative value pegs the expression to it's max.  Attached it the accumu
lated patch to typecast the unsigned values to (int)

- *dx = (cache_vinfo.xres - (cache_vinfo.xres * (input_x - ELO_MIN_X)) / width);

+ *dx = ((int)cache_vinfo.xres - ((int)cache_vinfo.xres * (input_x - ELO_MIN_X)) / width);

and also to provide quite failure to operations which have the screen currently locked...

The touch screen I'm using the original values were exactly opposite of any position I touched on the screen - evaluating the math the expr
ession SHOULD have handled reversing the min and max values - and after casting the unsigned .xres and .yres to a signed int - worked well.
..

Jim
2006-01-24 06:36:43 +00:00
Sam Lantinga
7f458450f5 Date: Thu, 19 Jan 2006 20:02:29 +0200
From: Vassilis Virvilis <vasvir@iit.demokritos.gr>
Subject: [SDL] Request: Please reconsider adding tag in SDL_Event

Hi,

Patch in question:

--- include/SDL_events.h        20 Aug 2004 18:57:01 -0000      1.11
+++ include/SDL_events.h        19 Jan 2006 17:35:09 -0000
@@ -214,7 +214,7 @@
  } SDL_SysWMEvent;

  /* General event structure */
-typedef union {
+typedef union SDL_Event {
         Uint8 type;
         SDL_ActiveEvent active;
         SDL_KeyboardEvent key;

Reasoning:
----------
1) Allows forward declaration of the SDL_Event union in C++. Please
note that in plain C it is possible to forward declare it.

2) Forward declaration is good because it allows encapsulation. It hides
the specific implementation and does not necessarily exposes SDL staff
to my appication's namespace

3) It can't harm plain C because tags are living in a different namespace
than typenames

4) It is already done like this in other places in SDL. Check for example
SDL_KeySym, and SDL_.*Event structures.

5) Right now I have to include SDL/event.h from a C++ header file. See 2)
2006-01-20 13:07:25 +00:00
Patrice Mandin
48dd604274 [PATCH] SDL_GetVideoMode() does not find best mode, part 2
Following commit 1.51, I come accross a problem when SDL must choose between
several video modes that could suit the one asked.

If I ask 320x240 with this list:
768x480 768x240 640x400 640x200 384x480 384x240 320x400 320x200

The smallest selectables modes are 384x240 and 320x400. And SDL choose the later
in this list, but 384x240 is more suitable. So I added a check to compare
the pixel count (surface) of modes, and select the one which has the smallest
pixel count.

In my example, 384x240 has 92160 pixels, and 320x400 has 128000 pixels. So now
SDL will choose 384x240 for the asked 320x240 mode.
2006-01-19 21:28:52 +00:00
Patrice Mandin
51da619080 Rollback 1.28 change, but only for UpdateRects function this time 2006-01-19 18:08:28 +00:00
Sam Lantinga
fd4ded5a50 Fixed MPW include file order 2006-01-19 12:05:14 +00:00
Sam Lantinga
f28f97aeca *** empty log message *** 2006-01-19 10:25:02 +00:00
Sam Lantinga
7a839d1e03 Implemented ToUnicode() support on Windows 95/98/ME/NT/2000/XP
This is a collaborative effort between Alex Volkov and John Popplewell.
Thanks guys!  (Fixes bug #39)
2006-01-19 09:09:32 +00:00
Ryan C. Gordon
e8d968512a Added .cvsignore to the XME directory. 2006-01-19 08:53:12 +00:00
Ryan C. Gordon
64a36c7f71 Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
updated project files, VS2005 support, VGA mode, more device support, etc,
 etc, etc.

Fixes Bugzilla #47 and #28.

--ryan.
2006-01-19 08:43:00 +00:00
Ryan C. Gordon
fac887ab73 Fixed up build script to catch some of the newer files in a "make dist" run. 2006-01-19 08:36:41 +00:00
Sam Lantinga
84b606910a *** empty log message *** 2006-01-19 05:34:24 +00:00
Ryan C. Gordon
b22482454b Catch X11 extension errors...since most of these are notifications that we
queried for a missing extension (such as the XiG vidmode one that most
 people don't have), and default Xlib behaviour is to write notification to
 stderr, this tends to generate incorrect bug reports.

Since we'll actually deal with the missing extension when querying for it,
 we ignore these errors in our hook. The rest continue to pass through to
 the default handler.

Fixes Bugzilla #42.

--ryan.
2006-01-14 08:15:38 +00:00
Ryan C. Gordon
ed8dea650b Don't trample SDL_LoadObject()'s error message in GL loader. 2006-01-13 02:36:35 +00:00
Ryan C. Gordon
f221a8bc28 Make error message meaningful if dlopen() fails on libX11. 2006-01-13 02:32:07 +00:00
Ryan C. Gordon
606daf92a8 Patched to compile with debugging enabled. 2006-01-13 01:30:21 +00:00
Ryan C. Gordon
3ec3055221 More dynamic X11 work. 2006-01-13 01:08:39 +00:00
Ryan C. Gordon
0a3afc4557 Patched to compile. 2006-01-12 23:06:23 +00:00
Ryan C. Gordon
9edba2d35c Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
changed in five years, and it's a small .c file that just calls into the X11
 dependencies we already use elsewhere. Including it directly allows us to
 make use of the dynamic X11 code.

Fixes Bugzilla #41.

--ryan.
2006-01-12 22:46:36 +00:00
Ryan C. Gordon
abbb8e7983 Properly restore vidmode when switching back to SDL's virtual terminal with
the fbcon driver: Fixes Bugzilla #37.
2006-01-10 20:52:35 +00:00
Ryan C. Gordon
b5b2635198 From Bug #36:
There are a couple of issues with the selection of Altivec alpha-blitting
routines in CalculateAlphaBlit() in src/video/SDL_Blit_A.c.

1) There's no check for the presence of Altivec when checking if the
Blit32to565PixelAlphaAltivec() routine can be selected.

2) Altivec cannot be used in video memory, and there's no check if the
destination surface is a hardware surface. (Alpha-blitting to a hardware
surface with GPU support is a bad idea, but somebody's bound to do it anyway.)

Patch to fix these attached.
2006-01-08 21:18:15 +00:00
Patrice Mandin
9f9c0f9f7e Rollback 2006-01-08 17:29:19 +00:00
Patrice Mandin
1406542e05 Load default OpenGL library if needed at driver initialization 2006-01-08 10:22:27 +00:00
Patrice Mandin
91722486aa Disable XBIOS driver for mouse and joystick under MiNT. Will write a driver for /dev/mouse later. 2006-01-06 22:24:09 +00:00
Ryan C. Gordon
9ad4236f71 Minor bit of debug output added to dynamic X11 code. 2006-01-06 20:57:59 +00:00
Ryan C. Gordon
dc5d47f3e8 Make some dynamic X11 symbols option. _XData32 and _XRead32 are only available
on 64-bit systems, and are chosen with macros in the X11 headers. So on
 32-bit systems, it should fail to find these symbols and keep going anyhow.
2006-01-06 20:56:13 +00:00
Ryan C. Gordon
4a142dd73b For sanity's sake, removed the '&' when passing copy_row array to asm. 2006-01-06 13:20:10 +00:00
Ryan C. Gordon
4599553443 Patched to compile. 2006-01-06 00:56:12 +00:00
Ryan C. Gordon
c5326df6e2 Added optimized C 32bit RGB<->RGBA alpha masking blitter from Alex Volkov.
Fixes Bugzilla #11.
2006-01-05 16:40:51 +00:00
Ryan C. Gordon
d9f58b2f88 testblitspeed.c improvements: cleaned up output, and allow user to set surface
alpha attributes.
2006-01-05 16:37:46 +00:00
Ryan C. Gordon
376c83d34c From Mike Frysinger and/or Gentoo:
- libsdl-PIC-load-mmx-masks-from-stack.patch
this one may be a little controversial ... the fix here is again that you cant
reference the memory addresses like this to load into a mmx register, so the
way to do it is to push two 32bit words onto the stack, load the 64bit value
off of the stack into the mmx register, and then adjust the stack so that
it's back to normal.
2006-01-05 15:25:19 +00:00
Ryan C. Gordon
f7cdaa4339 Patch from Michael Bonfils to add CPUID support for x86 Solaris. 2006-01-05 08:17:35 +00:00
Ryan C. Gordon
bfd327c02d From Mike Frysinger and/or Gentoo:
- libsdl-SDL_stretch-PIC.patch
ignoring the general fact of how SDL_stretch relies on executing dynamic code,
the inline asm should let gcc handle the a details for getting the actual
address for _copy_row as it will do the right thing
test case: http://dev.gentoo.org/~vapier/libsdl/sdl-stretch.tar.bz2
2006-01-05 07:20:12 +00:00
Ryan C. Gordon
f372206df1 From Mike Frysinger and/or Gentoo:
- libsdl-PIC-hermes-cpuid.patch
rewrites the code in _Hermes_X86_CPU so that it doesnt require the local
cpu_flags memory variable, it just uses registers.
test case: http://dev.gentoo.org/~vapier/libsdl/hermes-cpuid-test.tar.bz2
2006-01-05 07:08:59 +00:00
Ryan C. Gordon
14b4649fb4 More dynamic X11 fixes...catches some code in Xlib headers that caused
dependencies...
2006-01-04 22:57:50 +00:00
Ryan C. Gordon
49944d1da9 Windows should use _beginthreadex() instead of CreateThread(), to avoid a
memory leak on each joined thread.
2006-01-04 21:01:49 +00:00
Ryan C. Gordon
635d4f11ef Debug code should check right function names. 2006-01-04 20:53:55 +00:00
Ryan C. Gordon
6f0d008da1 Removed some incorrect comments in the "dc" driver that survived the
initial cut-and-paste from the dummy video skeleton.
2006-01-04 19:25:18 +00:00
Sam Lantinga
95cc21edfa Bumped the version number for the next release 2006-01-04 01:08:40 +00:00
Patrice Mandin
703ea8605b Use a simple table for Unicode translation 2006-01-02 19:49:21 +00:00
Ryan C. Gordon
caab2259d8 Quartz driver: Make sure we pass a pointer to the right type. 2006-01-02 12:48:58 +00:00
Ryan C. Gordon
e46884e7fd Quartz driver: Correctly handle SDL_DOUBLEBUF|SDL_FULLSCREEN when the
resolution is too small and thus emulated by SDL.

  Fixes http://www.devolution.com/pipermail/sdl/2005-December/071765.html ...
2006-01-02 12:37:40 +00:00
Ryan C. Gordon
48d21dc783 Quartz target: set x and y field of mode list to 0 in SDL_ListMode call. 2006-01-02 10:49:37 +00:00
Sam Lantinga
292d18a5f7 Oops, actually use the timings in the modes db. :)
FIXME: Add some way of specifying the refresh rate we want to select!
2006-01-02 09:32:54 +00:00
Sam Lantinga
8991b57ab3 *** empty log message *** 2006-01-02 09:13:16 +00:00
Sam Lantinga
7eafc32b03 Added support for parsing /etc/fb.modes, based on Stephane Marchesin's patch 2006-01-02 09:08:05 +00:00
Ryan C. Gordon
6ae4d895ed Toggle flip debugging in testsprite.c on the command line, not as a hardcoded
#define.

--ryan.
2006-01-02 08:07:41 +00:00