Mouse

hi
when i use the event demo compiled whith mingw32
my mouse generate no events. also when i use fullscreen mode
it’s locked probably cause it run in dos mode without mouse support
can i make it run like a win app? must i use winmain? if i use winmain it
will not run under linux?
thanks mario_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Hi Mario !

Be sure never (!) to overwrite the WinMain function Sam wrote… this will
cost you many times of trying to get your application run . The event
demo should work fine under X11 (you should be able to see the output of
printf (“Something\n”); in the console window. When you use mingw32 and run
it under windows as a console application and let mingw32 create a console
window as well, you won’t see the output. I think it is, because there is no
console output planned for windows applications (like X11 Apps do this
everytime they have to tell you something). The demo works (definitly), even
with mingw32. What not works, is only the console window output… so the
program e.g. recognizes the mouse-motion and states the
printf(MousePosition) command, but the console isn’t working, after winmain
was called. Just try the following code-example, and you will see it (yes, I
know, not catching exceptions and stuff… really no proper code, but for
now this should be enough):

#include “SDL.h”

int main () {
printf (“So now the console should be able to show some output\n”);
/* Now the SDL “overwritten” WinMain function will be code, if i
understand the code */
SDL_Init (SDL_INIT_VIDEO);
printf (“No more output on the console\n”);
SDL_Surface screen = SDL_SetVideoMode (100,100,16,SDL_SWSURFACE);
/
Shutting down SDL, but the WinMain function was called */
SDL_QUIT ();
printf (“Not shure, if here is any output, but I guess not\n”);
return 0;
}

So mingw32 (and cygwin as well) don’t think, that there is any use of
providing the ability of console output, during a windows application
running. You might try to change the printf commands to message boxes (I
wouldn’t do that for all the printf commands, that state the mouse motion,
but maybe you can catch some keyboard events or some mouse button events).

greets,

Sascha

-----Urspr?ngliche Nachricht-----Von: owner-sdl at lokigames.com [mailto:owner-sdl at lokigames.com]Im Auftrag
von Mario Portelli
Gesendet: Dienstag, 13. Februar 2001 20:50
An: sdl at mail.lokigames.com
Betreff: [SDL] mouse

hi
when i use the event demo compiled whith mingw32
my mouse generate no events. also when i use fullscreen mode
it’s locked probably cause it run in dos mode without mouse support
can i make it run like a win app? must i use winmain? if i use winmain it
will not run under linux?
thanks mario


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.