Nt4

Does anybody have any ideas why SDL 1.1.5 can change video modes in sdl, can’t blt a surface to the screen or receive keyboard input, but can load and play sounds? Reguardless of whether I use SDL_HWSURFACE or SDL_SWSURFACE I still get nothing on the screen after a blt and flip or direct blt to screen and Update. I’ve read that SDL tries to use hardware acceleration via DirectX 7 and GDI if that’s not available so I understand NT4 would default to GDI. For keyboard input would I have to not use the SDL functions and just use the built in windows messaging or is SDL supposed to capture these messages and translate them if DirectInput7 is not available? I’ve read all the posts and nothing really seems to clarify this.

Thanks,
Ethan Waldo
@Ethan_Waldo

P.S. Everything works fine in Win98.

Does anybody have any ideas why SDL 1.1.5 can change video modes in sdl, can't blt a surface to the screen or receive keyboard input, but can load and play sounds?  Reguardless of whether I use SDL_HWSURFACE or SDL_SWSURFACE I still get nothing on the screen after a blt and flip or direct blt to screen and Update.  I've read that SDL tries to use hardware acceleration via DirectX 7 and GDI if that's not available so I understand NT4 would default to GDI.  For keyboard input would I have to not use the SDL functions and just use the built in windows messaging or is SDL supposed to capture these messages and translate them if DirectInput7 is not available?  I've read all the posts and nothing really seems to clarify this.

Do you have main() in your code and are you linking with SDLmain.lib?

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

“Ethan Waldo” wrote

Does anybody have any ideas why SDL 1.1.5 can change video modes
in sdl, can’t blt a surface to the screen or receive keyboard input,
but can load and play sounds? Reguardless of whether I use
SDL_HWSURFACE or SDL_SWSURFACE I still get nothing on the screen after
a blt and flip or direct blt to screen and Update.

your best bet to fix this is to link to the SDLmain.lib library
for it’s WinMain function. before SDL intializes you need to
register your program (on windows only) with SDL_RegisterApp.
the SDLmain.lib handles all this for you and should take care of
the problem.

Well, since I’m doing Windows programming main() gets called by the
WinAPI wrapper and yes I’m linking with SDLmain.lib or else I wouldn’t even
be able to compile the program due to linking errors.
As I mentioned at the end of my e-mail the program works fine in Win9x
it’s just NT4 I’m having a problem with.
Under NT4 when I execute the application it creates a window, changes to
the proper video mode correctly but stays black even after I blt and flip or
blt and UpdateRect. After my blt I play a sound which plays through my
callback function beautifully. When I PollEvent and check it, I never
receive an SDL_KEYDOWN. Please note this is only in NT4, it works fine in
Win9x. If I could I’d uninstall DirectX and see if it works in Win9x so if
you’re curious I’ll try it on another non-DirectX’d box.
SDL_RegisterApp doesn’t link when I try using it even though I have
SDLmain.lib linked in SDL 1.1.5 but I’d be curious to know what it does
since an app is being created, sound is working, video mode is changing,
just not blting and receiving keyboard input.

Ethan Waldo
@Ethan_Waldo