Colored cursors lose their colors/bit depth on linux?

Still in the process of converting the old code from SDL 1.x to 2.0, and I am at implementing color cursors with SDL 2.0.
The setup is, make the window, create the openGL context, then, init the cursors.
On windows, everything is correct, and the mouse cursor colors are fine.
On linux (debian 64bit 3.10-2 kernel, running Gnome 3.4.2 on intel Ironlake mobile), the cursors seem to have lost their full bit depth.
Was using 32x32x8Bpp images (256 colors).

The laptop I am using is borrowed, so I can more fully test the new features on both windows & linux.
It has the latest version of the intel mesa drivers 9.1.4-1

Everything else that I have tested about the game (graphically) seems fine though, it is just the colored cursors that have the issue.
xdpyinfo |grep depths shows depths(7): 24, 1,4,8,15,16,32/

Is this a limitation on colored cursors on linux, or is this a driver issue, or does this have to do with gnome, or what exactly ?

I found a fix, apparently, when you compile SDL 2 on linux, it does NOT include xcursor by default, as was shown in ./configure --help.
I am not too good with autohell…err autotools, or I would supply a patch. :slight_smile:
(As in, download the tarball, do ./configure &&make && make install)

Once I did ./configure --enable-video-x11-xcursor, we finally got the correct looking cursor, and not a awful, ugly 1 bit version of it!

That’s weird, it does use xcursor by default. Maybe you installed a needed
package in between?On Sat, Aug 17, 2013 at 1:18 PM, Sparks wrote:

**
I found a fix, apparently, when you compile SDL 2 on linux, it does NOT
include xcursor by default, as was shown in ./configure --help.
I am not too good with autohell…err autotools, or I would supply a patch. [image:
Smile]
(As in, download the tarball, do ./configure &&make && make install)

Once I did ./configure --enable-video-x11-xcursor, we finally got the
correct looking cursor, and not a awful, ugly 1 bit version of it!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sam Lantinga wrote:

That’s weird, it does use xcursor by default. ?Maybe you installed a needed package in between?

Nope, not that I can think of, well, I did install KDE, to check if it was a issue with gnome or not, so, unless something got pulled into that, not sure.

Perhaps it is good to have errors/warning messages when the default options in the configure file aren’t being used, and it reverts to something that isn’t listed as being default?

That’s not a bad idea. There’s like 30 or so options that would need to
have this change. Want to take a crack at it?On Sat, Aug 17, 2013 at 5:20 PM, Sparks wrote:

**

Sam Lantinga wrote:

That’s weird, it does use xcursor by default. Maybe you installed a
needed package in between?

Nope, not that I can think of, well, I did install KDE, to check if it was
a issue with gnome or not, so, unless something got pulled into that, not
sure.

Perhaps it is good to have errors/warning messages when the default
options in the configure file aren’t being used, and it reverts to
something that isn’t listed as being default?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2013/8/17, Sparks :

Perhaps it is good to have errors/warning messages when the default options
in the configure file aren’t being used, and it reverts to something that
isn’t listed as being default?

While nice, configure spews out LOTS of messages, so we’d have to be
careful to make sure they don’t get lost between all that (in
particular, it’d be best if they appeared at the end of the output).

Sam Lantinga wrote:

That’s not a bad idea. ?There’s like 30 or so options that would need to have this change. ?Want to take a crack at it?

How about something like this (and remember, I know very little autohell crap)

… at the bottom of configure file add

Code:
AS_IF([test “x$enable_video_x11_xcursor” = “xno”],[
AC_MSG_NOTICE()
AC_MSG_WARN([ Warning, this default option has been disabled. It is not a recommended setting!])


and do all the other [default=yes] ones have some kind of fallback like the xcursor one did…

Would that be a correct way of handling this stuff, or is this all rubbish, and there is another approach that would be better ?

That sounds reasonable. I think at this point most of the X11 extensions
we use are standard and SDL has degraded functionality if they’re not
available.On Sat, Aug 17, 2013 at 6:43 PM, Sparks wrote:

**

Sam Lantinga wrote:

That’s not a bad idea. There’s like 30 or so options that would need to
have this change. Want to take a crack at it?

How about something like this (and remember, I know very little autohell
crap)

… at the bottom of configure file add

Code:

AS_IF([test “x$enable_video_x11_xcursor” = “xno”],[
AC_MSG_NOTICE()
AC_MSG_WARN([ Warning, this default option has been disabled. It is
not a recommended setting!])


and do all the other [default=yes] ones have some kind of fallback like
the xcursor one did…

Would that be a correct way of handling this stuff, or is this all
rubbish, and there is another approach that would be better ?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org