T. Joseph Carter | 20 Dec 07:08 2014

SDL and MingW (here we go again…)

On the docs list, we get the quick feedback for the SDL wiki, and we 
got this incredibly not-helpful bit of feedback recently:

On Tue, Dec 16, 2014 at 07:45:09AM +0000, Quick Feedback Form wrote:
>Feedback from page:https://wiki.libsdl.org/Installation

Oh BTW Sam, can we have a space after that : in the template email?  ;)

>Trying to figure out how to install SDL on Windows with MinGW.
>It's nearly impossible, unless you
>are some kind of a hacker. Why in the
>world it is so complicated? It's crap!
>Total and utter crap!

…I could say many things here about the above lines, but I won't.

What I will say is that setting up SDL under MingW is NOT trivial, 
and indeed I never really succeeded in the endeavor 100%.  I am aware 
that it is far, far simpler to set up a cross-compile environment 
because of MSYS issues—or that used to be true.  I have no idea if it 
still is.  So once again, if someone who has this working can provide 
some info as to what works for them, I'll be happy to actually take 
another stab at it and document the resulting setup.

My understanding goes something like this:

1. You DO NOT actually have a realistic choice of MingW32 or 
MingW-w64 at this point if you want stuff to work right.  You're 
getting MingW-w64.

(Continue reading)

MrTAToad | 19 Dec 16:06 2014

Re: SDL2-widgets, toolkit using SDL2, now hardware accellerated

Yes, would really like a Windows version, although it does look like it would require a fair bit of work to get it to be platform-generic rather than Linux orientated.
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
phao | 17 Dec 22:56 2014
Picon

Re: SDL_stdinc - thread safe calls? Missing functions?

By the way, I'm on SDL2 here.
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Alex | 17 Dec 17:59 2014
Picon

SDL_WINDOW_MAXIMIZED bug?

I created a window with flag SDL_WINDOW_MAXIMIZED, like:







Code:
SDL_Window *win = SDL_CreateWindow("Test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 928, 928, SDL_WINDOW_MAXIMIZED | SDL_WINDOW_RESIZABLE);

When I call SDL_RenderCopy(renderer, texture, NULL, NULL), I see strange result:
1. It copy only a part of a texture (looks like 928 x 928 in size). My texture is bigger in size than the window.
2. Copied image is not resized to window size. The size of image is only a part of window area with black space at top and at right of an image.
3. Copied image started by y-coordinate not from 0, but from 15. I see black space above image 14 pixels in height. Looks like an image aligned to bottom-left corner of a window, but not to top-left.

This tested on Linux (Ubuntu) with Mate desktop, my screen size is 1280 x 1024.
Is it a bug or I am doing something wrong?
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Meldryt | 17 Dec 14:12 2014
Picon

using SDLNet_TCP_Accept without loops

I try to connect an old Windows XP 32bit notebook with a newer Windows 7 64bit notebook via SDL_Net TCP and do some handshake send->receive->send->receive.
Both the client part (SDLNet_TCP_Open...) and the server part (SDLNet_TCP_Accept...) are only called once per frame.
When the XP notebook is the server, the connection is established fast and correct.
But vice versa i cannot connect because the SDLNet_TCP_Accept never gets a successful connection.

When i set a breakpoint behind SDLNet_TCP_Accept or do a while loop for a certain amount of time, the connection is successful.
I dont understand why the tcp connection is working when XP is the server but otherwise not.
Is it possible that SDL Net is working different on XP and Windows 7 or is there a call limit for function like SDLNet_TCP_Accept ?
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
sreenu.pg | 17 Dec 05:09 2014
Picon

sreenu.pg <at> gmail.com has indicated you're a friend. Accept?

Click here to discover sreenu.pg <at> gmail.com's favorite websites!
sreenu.pg <at> gmail.com wants to follow you
I would like to add you as a friend
-sreenu.pg <at> gmail.com
Accept Decline
Following sreenu.pg <at> gmail.com helps you discover great websites they recommend :)
Click here to unsubscribe from such emails from sreenu.pg <at> gmail.com or all friends


P.O. BOX 70928, Sunnyvale, CA 94086
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
sreenu.pg | 17 Dec 03:17 2014
Picon

sreenu.pg <at> gmail.com has indicated you're a friend. Accept?

Click here to discover sreenu.pg <at> gmail.com's favorite websites!
sreenu.pg <at> gmail.com wants to follow you
I would like to add you as a friend
-sreenu.pg <at> gmail.com
Accept Decline
Following sreenu.pg <at> gmail.com helps you discover great websites they recommend :)
Click here to unsubscribe from such emails from sreenu.pg <at> gmail.com or all friends


P.O. BOX 70928, Sunnyvale, CA 94086
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Naith | 16 Dec 14:15 2014
Picon

Re: Massive Memory Leaks

Glad it turned out alright. =)
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Naith | 16 Dec 14:07 2014
Picon

Re: Massive Memory Leaks

Try moving 'SDL_FreeSurface(surface)' to be called after 'SDL_RenderCopy(renderer, ....)' and before 'SDL_DestroyTexture(texture)', i.e:








Code:

   SDL_RenderCopy(renderer, texture, NULL, &dstrect);

   SDL_FreeSurface(surface);
   SDL_DestroyTexture(texture);



Also, to optimize the code, you should insert the SDL_PollEvent-call into a while loop so it's only called whenever a event is occuring, i.e:








Code:

   while(SDL_PollEvent(&event))
   {
      switch(event.type)
      {
      case SDL_QUIT:
         {
            quitMainLoop = true;

            break;
         }

      case SDL_KEYDOWN:
         {
            quitMainLoop = true;

            break;
         }
      }
   }

   // Rest of code (create surface, texture and such)

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Naith | 16 Dec 13:56 2014
Picon

Re: Massive Memory Leaks

Try moving 'SDL_FreeSurface(surface)' to be called after 'SDL_RenderCopy(renderer, ....)' and before 'SDL_DestroyTexture(texture)', i.e:








Code:

   SDL_RenderCopy(renderer, texture, NULL, &dstrect);

   SDL_FreeSurface(surface);
   SDL_DestroyTexture(texture);

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
MrTAToad | 16 Dec 10:34 2014

Re: Massive Memory Leaks

After rendering the text, you need to destroy the texture and surface - each TTF call creates a new surface!
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Gmane