SDL 1.3 - testnative.c doesn't compile for Win32

A few things related to the testnative.c program under Win32.

  1.   The tests folder is missing a project directory and vcproj file for
    

Visual C. Not a big deal, I created one.

  1.   It doesn't compile as is.  You get fprintf() undefined, stderr
    

undefined. I added the proper includes to get it to compile.

  1.   It won't link due to a reference to Win32WindowFactory.  Not sure
    

what to link in to get this working.

The only reason I am trying to use this is that I am not getting any events
in my SDL 1.3 native app, but if I use the legacy video routines then I get
mouse and key events. I figured I would try the testnative.c app to see if
it gets those events since the only difference in my two versions are the
video calls.

Ken

You’ll want to add testnativew32.c to the project.

BTW, this method isn’t recommended unless you need to do other things
with the platform specific window handle.

Are you getting events from the other SDL test applications?

If you have a quick test that you see isn’t working, please let me
know and I’ll see if I can look at it tonight in between packing.

See ya!On Thu, Dec 24, 2009 at 11:42 AM, Ken Rogoway wrote:

A few things related to the testnative.c program under Win32.

1.??? The tests folder is missing a project directory and vcproj file for
Visual C.? Not a big deal, I created one.

2.??? It doesn?t compile as is.? You get fprintf() undefined, stderr
undefined.? I added the proper includes to get it to compile.

3.??? It won?t link due to a reference to Win32WindowFactory.? Not sure
what to link in to get this working.

The only reason I am trying to use this is that I am not getting any events
in my SDL 1.3 native app, but if I use the legacy video routines then I get
mouse and key events.? I figured I would try the testnative.c app to see if
it gets those events since the only difference in my two versions are the
video calls.

Ken


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


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

I was able to track down what is causing events not to show up. If I call:

SDL_VideoInit( NULL,0 );

Then events do not show up. If I skip that call then everything works fine.

Your COMMON.C file has this call in CommonInit() so I assumed it was
required.

The odd thing is that events work fine in the sample apps. The ONLY line I
have to change in my app is to comment in that line and events go away, but
with it gone then I get the events.

Ken> ----- Original Message -----

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Sam Lantinga
Sent: Thursday, December 24, 2009 3:03 PM
To: SDL Development List
Subject: Re: [SDL] SDL 1.3 - testnative.c doesn’t compile for Win32

You’ll want to add testnativew32.c to the project.

BTW, this method isn’t recommended unless you need to do other things
with the platform specific window handle.

Are you getting events from the other SDL test applications?

If you have a quick test that you see isn’t working, please let me
know and I’ll see if I can look at it tonight in between packing.

See ya!

On Thu, Dec 24, 2009 at 11:42 AM, Ken Rogoway wrote:

A few things related to the testnative.c program under Win32.

1.??? The tests folder is missing a project directory and vcproj file
for
Visual C.? Not a big deal, I created one.

2.??? It doesn?t compile as is.? You get fprintf() undefined, stderr
undefined.? I added the proper includes to get it to compile.

3.??? It won?t link due to a reference to Win32WindowFactory.? Not sure
what to link in to get this working.

The only reason I am trying to use this is that I am not getting any
events
in my SDL 1.3 native app, but if I use the legacy video routines then I
get
mouse and key events.? I figured I would try the testnative.c app to see
if
it gets those events since the only difference in my two versions are the
video calls.

Ken


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


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


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