Commit graph

1463 commits

Author SHA1 Message Date
Sam Lantinga
3fb937938e Hopefully the X servers have been fixed (in 5 years) :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401265
2006-01-25 06:12:57 +00:00
Sam Lantinga
3cc77ac934 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401264
2006-01-25 06:04:21 +00:00
Sam Lantinga
3506c143db 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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401263
2006-01-24 07:20:18 +00:00
Sam Lantinga
e0fbb3b543 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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401262
2006-01-24 06:36:43 +00:00
Sam Lantinga
ba553ad7d1 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)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401261
2006-01-20 13:07:25 +00:00
Patrice Mandin
ecf79e4d56 [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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401260
2006-01-19 21:28:52 +00:00
Patrice Mandin
cde83fe77a Rollback 1.28 change, but only for UpdateRects function this time
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401259
2006-01-19 18:08:28 +00:00
Sam Lantinga
90d632bc18 Fixed MPW include file order
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401258
2006-01-19 12:05:14 +00:00
Sam Lantinga
d36b0d695c *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401257
2006-01-19 10:25:02 +00:00
Sam Lantinga
e63977fbad 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)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401256
2006-01-19 09:09:32 +00:00
Ryan C. Gordon
d32b3a376f Added .cvsignore to the XME directory.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401255
2006-01-19 08:53:12 +00:00
Ryan C. Gordon
f2d9ddec98 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401254
2006-01-19 08:43:00 +00:00
Ryan C. Gordon
e691b06188 Fixed up build script to catch some of the newer files in a "make dist" run.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401253
2006-01-19 08:36:41 +00:00
Sam Lantinga
c34047f576 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401252
2006-01-19 05:34:24 +00:00
Ryan C. Gordon
37f6992829 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401251
2006-01-14 08:15:38 +00:00
Ryan C. Gordon
0eb1d37f73 Don't trample SDL_LoadObject()'s error message in GL loader.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401250
2006-01-13 02:36:35 +00:00
Ryan C. Gordon
a216fe3cc6 Make error message meaningful if dlopen() fails on libX11.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401249
2006-01-13 02:32:07 +00:00
Ryan C. Gordon
3eebcae2d9 Patched to compile with debugging enabled.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401248
2006-01-13 01:30:21 +00:00
Ryan C. Gordon
589c3c2241 More dynamic X11 work.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401247
2006-01-13 01:08:39 +00:00
Ryan C. Gordon
802fb9605f Patched to compile.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401246
2006-01-12 23:06:23 +00:00
Ryan C. Gordon
c1c1b65a1e 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401245
2006-01-12 22:46:36 +00:00
Ryan C. Gordon
474b79de1c Properly restore vidmode when switching back to SDL's virtual terminal with
the fbcon driver: Fixes Bugzilla #37.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401244
2006-01-10 20:52:35 +00:00
Ryan C. Gordon
958cb54ab3 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401243
2006-01-08 21:18:15 +00:00
Patrice Mandin
63a2120830 Rollback
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401242
2006-01-08 17:29:19 +00:00
Patrice Mandin
107e0fbfce Load default OpenGL library if needed at driver initialization
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401241
2006-01-08 10:22:27 +00:00
Patrice Mandin
0022cb28fe Disable XBIOS driver for mouse and joystick under MiNT. Will write a driver for /dev/mouse later.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401240
2006-01-06 22:24:09 +00:00
Ryan C. Gordon
ff0632ca53 Minor bit of debug output added to dynamic X11 code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401239
2006-01-06 20:57:59 +00:00
Ryan C. Gordon
8f549cb8e9 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401238
2006-01-06 20:56:13 +00:00
Ryan C. Gordon
68e2ab6505 For sanity's sake, removed the '&' when passing copy_row array to asm.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401237
2006-01-06 13:20:10 +00:00
Ryan C. Gordon
50b7b55c2c Patched to compile.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401236
2006-01-06 00:56:12 +00:00
Ryan C. Gordon
3283200097 Added optimized C 32bit RGB<->RGBA alpha masking blitter from Alex Volkov.
Fixes Bugzilla #11.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401235
2006-01-05 16:40:51 +00:00
Ryan C. Gordon
7341c5d504 testblitspeed.c improvements: cleaned up output, and allow user to set surface
alpha attributes.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401234
2006-01-05 16:37:46 +00:00
Ryan C. Gordon
9cff95c690 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401233
2006-01-05 15:25:19 +00:00
Ryan C. Gordon
b1c0273cee Patch from Michael Bonfils to add CPUID support for x86 Solaris.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401232
2006-01-05 08:17:35 +00:00
Ryan C. Gordon
62c43568f9 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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401231
2006-01-05 07:20:12 +00:00
Ryan C. Gordon
f5f2890758 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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401230
2006-01-05 07:08:59 +00:00
Ryan C. Gordon
d28ecd1a1c More dynamic X11 fixes...catches some code in Xlib headers that caused
dependencies...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401229
2006-01-04 22:57:50 +00:00
Ryan C. Gordon
72c870cf14 Windows should use _beginthreadex() instead of CreateThread(), to avoid a
memory leak on each joined thread.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401228
2006-01-04 21:01:49 +00:00
Ryan C. Gordon
4b43b304ab Debug code should check right function names.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401227
2006-01-04 20:53:55 +00:00
Ryan C. Gordon
7481988a95 Removed some incorrect comments in the "dc" driver that survived the
initial cut-and-paste from the dummy video skeleton.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401226
2006-01-04 19:25:18 +00:00
Sam Lantinga
19bd837abc Bumped the version number for the next release
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401225
2006-01-04 01:08:40 +00:00
Patrice Mandin
7fcbae510e Use a simple table for Unicode translation
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401224
2006-01-02 19:49:21 +00:00
Ryan C. Gordon
aaf8ca0d42 Quartz driver: Make sure we pass a pointer to the right type.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401223
2006-01-02 12:48:58 +00:00
Ryan C. Gordon
ca9a638c42 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 ...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401222
2006-01-02 12:37:40 +00:00
Ryan C. Gordon
22cfa5480b Quartz target: set x and y field of mode list to 0 in SDL_ListMode call.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401221
2006-01-02 10:49:37 +00:00
Sam Lantinga
a4cb3b2164 Oops, actually use the timings in the modes db. :)
FIXME: Add some way of specifying the refresh rate we want to select!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401220
2006-01-02 09:32:54 +00:00
Sam Lantinga
a61ae6f326 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401219
2006-01-02 09:13:16 +00:00
Sam Lantinga
a88b4dffd4 Added support for parsing /etc/fb.modes, based on Stephane Marchesin's patch
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401218
2006-01-02 09:08:05 +00:00
Ryan C. Gordon
1c8744d7fb Toggle flip debugging in testsprite.c on the command line, not as a hardcoded
#define.

--ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401217
2006-01-02 08:07:41 +00:00
Ryan C. Gordon
b4270503ba Quartz target shouldn't crash if an event thread is used.
(SDL_INIT_EVENTTHREAD still doesn't work, but the crash is gone...)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401216
2006-01-02 07:09:52 +00:00