SDL_Init changed in SDL1.3

Hi,

I have one query regarding changed version of SDL_Init() in SDL 1.3.

My application was built using SDL 1.2.12 version and the basic flow of it
is that

  1. On playing the media file, SDL_Init is called.
  2. And at the end of it, after its completion, stream_component_close() is
    called which in turn calls SDL_Quit().

For playing each file, the above steps were repeated and it used to work
fine. But with SDL1.3, multiple calling of SDL_Init() is failing coz of the
following code which has been added in SDL1.3 only.

#if defined(WIN32)

  • if (SDL_HelperWindowCreate() < 0) {*

  • return -1;*

}

#endif

Basically, the following api fails in it.

*SDL_HelperWindowClass = RegisterClassEx(&wce) ***

So can u please explain me its significance and its workaround.

If I comment the above section, all works fine.

Thanks.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I actually added that HelperWindow. It’s there so you can use
joystick/haptic functions before creating the window. It creates a
window that is invisible to the user, but that window is the one that
grabs all the joystick input and allows the haptic output. It should be
destroyed when you run SDL_Quit so it can be recreated. If it isn’t
that’s an issue.

Edgar

Preeti Anand wrote:

Hi,

I have one query regarding changed version of SDL_Init() in SDL 1.3.

My application was built using SDL 1.2.12 version and the basic flow of it
is that

  1. On playing the media file, SDL_Init is called.
  2. And at the end of it, after its completion, stream_component_close() is
    called which in turn calls SDL_Quit().

For playing each file, the above steps were repeated and it used to work
fine. But with SDL1.3, multiple calling of SDL_Init() is failing coz of the
following code which has been added in SDL1.3 only.

#if defined(WIN32)

  • if (SDL_HelperWindowCreate() < 0) {*

  • return -1;*

}

#endif

Basically, the following api fails in it.

*SDL_HelperWindowClass = RegisterClassEx(&wce) *

**

So can u please explain me its significance and its workaround.

If I comment the above section, all works fine.

Thanks.



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklCclwACgkQolm4VNX3QTxdegCfQio7bSMsOAId5OIiuf3M4KKY
4x0AoKPwBYTLOJeffikH68GD2ykx92lJ
=THO1
-----END PGP SIGNATURE-----

I actually added that HelperWindow. It’s there so you can use
joystick/haptic functions before creating the window. It creates a
window that is invisible to the user, but that window is the one that
grabs all the joystick input and allows the haptic output. It should be
destroyed when you run SDL_Quit so it can be recreated. If it isn’t
that’s an issue.

It probably isn’t. Edgar, can you investigate and commit a fix?

Thanks!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,On it, although I’m pretty bad at windows coding and have no windows systems. Edgar Sam Lantinga wrote:

I actually added that HelperWindow. It’s there so you can use
joystick/haptic functions before creating the window. It creates a
window that is invisible to the user, but that window is the one that
grabs all the joystick input and allows the haptic output. It should be
destroyed when you run SDL_Quit so it can be recreated. If it isn’t
that’s an issue.

It probably isn’t. Edgar, can you investigate and commit a fix?

Thanks!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklCeq0ACgkQolm4VNX3QTxQagCeOOgqqki9o3EoXkRSO4Fs+WN8
GaMAn3rln9GiutsrFAbYdjl7BkHRkURj
=AWpT
-----END PGP SIGNATURE-----

Could you please tell us how your program fails? What happens exactly?
Can you provide an example program to demonstrate the problem?On Fri, Dec 12, 2008 at 7:01 AM, Preeti Anand wrote:

For playing each file, the above steps were repeated and it used to work
fine. But with SDL1.3, multiple calling of SDL_Init() is failing coz of the
following code which has been added in SDL1.3 only.


http://codebad.com/