[haiku-3rdparty-dev] Re: SDL entrant in Haiku

  • From: The_Serial_Wombat <the.serial.wombat@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Thu, 29 Jul 2010 18:30:18 -0400

PHilip RUshik wrote:
>> LRESULT    CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)

Yeah.. that doesn't sound familiar at all. I've never heard of anyone doing that for SDL programming. SDL takes care of that for you. Using code like that would decrease its portability, which should be discouraged. Then again, Micro$oft likes to make it hard to port Windows software to other platforms, that of course makes it harder for people to leave Windows. So I wouldn't be surprised if this was somehow the "suggested" or "preferred" way of setting up SDL in Windows, that does not make it correct. SDL is made to be cross platform, and programs using it should probably be too.
All it really does is give the SDL window a "DC" and a handle so Windows sees it in a Winmain() context. (API compatibility or something. It has been a few years since I actually touched any code. Much less windows stuff.)

Just wanted to know if I had to do that or something like it as a "preferred" way. Note: You do not have to do the Winmain() stuff that I had asked about while using Windows SDL. You can just slap up a "int main(void){ SDL_Init( SDL_INIT_VIDEO ); etc}"
But it is the "preferred way" to open an SDL window.

Just as a test, I think I will try to do just that for Haiku and then check the processing speed difference.

Thank you for all the help and I am sorry for my lack of verbosity on my original question.

Sincerely,
Paul W Sturgis

Other related posts: