Victor Luchitz | 28 Apr 11:31 2015
Picon

[BUG] Duplicate Xi2 raw motion events when relative mouse input is enabled

Hello,

may I ask the SDL devs to pay attention to this bug? https://bugzilla.libsdl.org/show_bug.cgi?id=2963

We're recently bumped into it when porting our game engine from X11 to SDL2. Any chance it might get fixed in time for 2.0.4?

Thanks.

--
Best regards,
 Victor Luchitz
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Unga | 27 Apr 16:46 2015
Picon

Compile SDL2 on Windows 8.1

Hi all

I tried to build SDL2 from sources on Windows 8.1 using command line as follows:

Installed following:

1. Microsoft Visual Studio 2013 (free version)

2. Cmake (binary version)

3. Installed LLVM+Clang

SDL2:

1. Unpack SDL2-2.0.3.zip

2. Used Cmake GUI to set options: DirectX selected.

3. mkdir build

4. cd build

5. cmake --build .

I get following error:

LINK : fatal error LNK1104: cannot open file 'dxerr.lib'

Btw, dxerr.lib is now deprecated and removed from Windows SDK 8.1, therefore, no such file in my system.

Following shows FormatMessage must be used instead of dxerr:

http://blogs.msdn.com/b/chuckw/archive/2012/04/24/where-s-dxerr-lib.aspx

My questions:

1. Is there a compiler switch (-Dxxx) to use FormatMessage instead of dxerr on Windows 8.1?

2. Is there a patch for SDL2 to use FormatMessage instead of dxerr on Windows 8.1?

Best regards
Unga
Voyager 1 | 25 Apr 16:06 2015
Picon

SDL Networking

I was wondering whether there are any plans to add networking support to SDL. I came across SDL_net, but it doesn't seem to be quite on the same level as SDL - I couldn't even find up to date documentation for the 2.0 release.

Any info would be very helpful.
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
ScottRichards | 26 Apr 00:00 2015
Picon

SDL2 drawing black inside window (from GtkWidget)

I'm attempting to get SDL2 to render into a gtk_drawing_area in GTK3 on linux (although evidentially i want this to work on windows too).

However after giving SDL2 access to the widget's window, and telling GTK not to render to the widget. I am unable to actually draw anything in the widget with SDL2, as everything appears black.

I have set up the following example to demostrate the problem. It is suppose to open a small GTK3 window, and let SDL2 draw in it with a coloured box.

Has anyone else had this problem? Or have any ideas how to resolve this drawing issue?








Code:
#include
#include
#include

GtkWidget *window;
GtkWidget *sdlArea;
SDL_Window *SDLwin;
SDL_Renderer *SDLgfx;

void doDrawing(GtkWidget *widget, gpointer *data) {
    SDL_Rect myRect = {10, 10, 20, 20};
    SDL_SetRenderDrawColor(SDLgfx, 255, 0, 0, SDL_ALPHA_OPAQUE);
    SDL_RenderClear(SDLgfx);
    SDL_SetRenderDrawColor(SDLgfx, 0, 255, 0, SDL_ALPHA_OPAQUE);
    SDL_RenderFillRect(SDLgfx, &myRect);
    SDL_RenderPresent(SDLgfx);
}

int main( int argc, char *argv[] ) {
   
    SDL_Init(SDL_INIT_VIDEO);
    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    g_signal_connect( window, "destroy", G_CALLBACK (gtk_main_quit), NULL );
   
    sdlArea = gtk_drawing_area_new();
    g_signal_connect (sdlArea, "draw", G_CALLBACK (doDrawing), NULL );
    gtk_widget_set_app_paintable(sdlArea, True);
    gtk_container_add( GTK_CONTAINER(window), sdlArea );
   
    gtk_widget_show_all(window);

    GdkWindow *gdk_window = gtk_widget_get_window(sdlArea);
    Window x11_window = gdk_x11_window_get_xid(GDK_X11_WINDOW(gdk_window));
   
    SDLwin = SDL_CreateWindowFrom((const void*) x11_window);
    SDLgfx = SDL_CreateRenderer(SDLwin, -1, SDL_RENDERER_SOFTWARE | SDL_RENDERER_TARGETTEXTURE);
   
    SDL_Rect myRect = {10, 10, 20, 20};
    SDL_SetRenderDrawColor(SDLgfx, 255, 0, 0, SDL_ALPHA_OPAQUE);
    SDL_RenderClear(SDLgfx);
    SDL_SetRenderDrawColor(SDLgfx, 0, 255, 0, SDL_ALPHA_OPAQUE);
    SDL_RenderFillRect(SDLgfx, &myRect);
    SDL_RenderPresent(SDLgfx);
   
    gtk_main();
   
    SDL_Quit();
    return 0;
}


I am compiling in GCC with the following command








Code:
gcc `pkg-config --cflags gtk+-3.0` `sdl2-config --cflags` -o mySDLtest mySDLtest.c `pkg-config --libs gtk+-3.0` `sdl2-config --libs`

Many thanks to all those who can help me.
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
fdelapena | 24 Apr 23:33 2015
Picon

SDL_mixer update plans?

There have been a lot of bug fixes since the SDL_mixer 2.0 release. What about some update, like 2.0.1?

There are though some annoying audio issues, e.g. bug 2094, making games using non-usual freqs sounds with some jerkiness.
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Dids | 21 Apr 19:38 2015

Scaling, resolution and pixel art

Hi everyone,

I'm working on a PC-only game (Windows, Mac and Linux), but I'm running in to a few snags with choosing the correct resolution, and handling the scaling. I'm using SDL_Texture's etc. and not OpenGL directly.

Most art in my game is pure pixel art, and the game is centered around a statically sized level/tilemap. Each tile is 16x16, with the tilemap's size currently at 40x26 tiles.

I'm using a logical resolution of 640x480, then allowing SDL to scale and add the black bars, using the SDL_WINDOW_FULLSCREEN_DESKTOP flag. I'm also using nearest pixel sampling, by the way.

Now, in theory this all seems perfect, and should (afaik) support the majority of users out there, with the minimal resolution of 640x480.

The problem comes from when the native/actual resolution is not 2x the logical resolution, for example with the logical resolution of 640x480, and an actual resolution of 1920x1080.

What ends up happening is that tiles/sprites aren't scaled equally, and even text (SDL_ttf with the infamous Nokia font) ends up looking skewed.



I'd first like to know if my current way of doing it is correct/feasible for a "pure" pixel-based game. If it is, I'd like to know what my options would be regarding the skewing/scaling issues and choosing the correct resolutions.

Any help would be greatly appreciated!
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Julian Marchant | 26 Apr 20:33 2015
Picon

I'm getting blank surfaces... any idea why?

Ever since I started maintaining Project: Starfighter (
http://starfighter.nongnu.org ), I've been scratching my head over this.
I don't know when it happened, because this was some time before I
started maintaining it, but a certain collection of surfaces that are
supposed to be reddened versions of ships are often, but not always,
blank instead. I don't see any consistent pattern in how it happens, or
any code that should fail in this particular way. The bug can be seen in
this video:

https://goblinrefuge.com/mediagoblin/u/onpon4/m/project-starfighter-1-3-gameplay/

All the game's source code can be found in the public Git repository:

https://savannah.nongnu.org/git/?group=starfighter

I've verified that the surfaces are blank (or perhaps NULL, does
SDL_BlitSurface accept NULL for the first argument?), rather than some
other code just failing to draw the surface, by causing the surface
that's supposed to be reddened to always be used; this causes the ship
in question (the player, in my test) to be invisible.

This is the code that is supposed to generate the reddened ships:

http://pastebin.com/f1SiGEbN

This code originally did have some problems which I fixed, though I
don't remember what they were, so I originally supposed that maybe the
method just didn't work with certain colors or certain formats or
something. I didn't find any such pattern, but what really discredited
that hypothesis is that the following code, which used to be what was
used before the previous maintainer of Starfighter changed it to more or
less the current implementation, fails in exactly the same way, even
though it worked fine before:

http://pastebin.com/sVCtp4s5

At this point, my only remaining guess is that this code somehow broke
when Starfighter was upgraded from SDL 1.2 to SDL 2.0 (which, again, was
done before I started maintaining Starfighter). But I don't see a
problem in that regard. Maybe it's just because of my fairly rudimentary
understanding of SDL, though. Is there anything problematic in here?
Anything that might cause the entirety of certain images to be erased,
or perhaps for them to be replaced with NULL (or perhaps
SDL_CreateRGBSurface can return NULL)?

Sorry if the question is a little vague. :(

--

-- 
Julian Marchant
https://onpon4.github.io

Protect your privacy with GnuPG:
https://emailselfdefense.fsf.org
zellJunior | 26 Apr 10:18 2015
Picon

Re: What reasons would SDLNet_TCP_Send block for?

I am trying to make a mail client with SDL_net. Usign SMTP protocol.
I am receiving first message from server : Server : 220 mx.google.com ESMTP y7sm10123479wjw.16 - gsmtp
then I try to send message to server using : SDLNet_TCP_Send(client, (void *)buffer, len)
After this, i dont receive any more messages from server, using : SDLNet_TCP_Recv(sock, bufferResponse, maxCharsRecieved), just blocks the program, it never returns from this function call. Can some one help?
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
JeZ-l-Lee | 26 Apr 01:54 2015
Picon

[OT]-How To Protect Game Assets?(Audio/Visuals)

[OT]-How To Protect Game Assets?(Audio/Visuals)

Hi,

Does anyone have a recommendation for a free method to pack game assets into a single file(to protect them)?
We are working on a Windows(R) only SDL2 game now that we may want to sell in the future,
so a free method to pack the game assets(graphics, sounds, music, fonts, & dictionary) into a single file would be required.

Thanks!



JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Timodor | 25 Apr 08:33 2015
Picon

DuaL Touch ANDRIOD

I've had this running for while now, but noticed about 5% of time it bugs out. You get odd movements.

It seems like I'm doing this wrong.

finger returns sometimes number that are not 0 or 1, thats basically when the problem occurs.

Anyone know simple way to redo this code?




if (event.type == SDL_FINGERDOWN)
{
if (event.tfinger.fingerId == 0)
{
bf1 = true;
iMouseX = Display0->GetScreenWidth() * event.tfinger.x;
iMouseY = Display0->GetScreenHeight() * event.tfinger.y;
}
else if (event.tfinger.fingerId == 1)
{
bf2 = true;
iMouseX2 = Display0->GetScreenWidth() * event.tfinger.x;
iMouseY2 = Display0->GetScreenHeight() * event.tfinger.y;
bProcess = true;
}
}
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
JeZ-l-Lee | 24 Apr 15:15 2015
Picon

[SDL2]-"LettersFall" Alpha Final - Please Help Test!

[SDL2]-"LettersFall" Alpha Final - Please Help Test!

Hi,

We are pleased to announce the release of the last alpha version of our SDL2 word game "LettersFall".
We were hoping some people could help test this version on their Microsoft Windows computers?

You can download the game here:
http://16bitsoft.com/files/LettersFall-Retail/Alpha/LFR-AlphaFinal.zip
(Microsoft Windows XP, Vista, 7, 8, 10 32Bit/64Bit - Game also runs under Linux in WINE 1.7+)

If you see any problems or have any suggestions for improvement then just post them to this forum.
Thanks!



JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Gmane