WinCE video fix!

Found a nasty WinCE bug in SDL_dibevents.c, within
DIB_CreateWindow(_THIS)

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

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…

This fix is now in CVS; thanks!

–ryan.