[SDL] WinCE video fix!

Corona688 tsm at accesscomm.ca
Mon Jul 1 20:57:00 PDT 2002

Found a nasty WinCE bug in SDL_dibevents.c, within

Apparently, nLen is getting the length of a string that doesn't exist
yet;  moved the code so that it's called AFTER SDL_RegisterApp rather
than before...

//code snip begins
int DIB_CreateWindow(_THIS)
#ifdef _WIN32_WCE
 // WinCE uses the UNICODE version

 int nLen;
 LPWSTR lpszW;

 if(SDL_RegisterApp("SDL_app", 0, 0)!=0)
  return -1;

 nLen = strlen(SDL_Appname)+1;
 lpszW= alloca(nLen*2);

 MultiByteToWideChar(CP_ACP, 0, "SDL_App", -1, lpszW, nLen);
//code snip ends

More information about the SDL mailing list