Sdl on beos, example

Hi

i made a short example, attached to this email.
It works perfectly on my Linux installation but
fails on BeOS (Dev.Ed. 5.0.4):

  • resizing the window works on BeOS when
    i remove the SDL_OPENGL flag

  • i added video_flags |= SDL_RESIZABLE; to
    testgl.c of SDL-1.2.3, the window was not resizable.

  • while the left mouse button is pressed, the right
    one does not produce events under BeOS. under
    linux it does.

greetings
leander
-------------- next part --------------
#include <GL/gl.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>

const SDL_VideoInfo* info = NULL;
SDL_Event event;
SDL_Surface *window;
int bpp=0, raus=0;

int main (int argc, char** argv)
{
if( SDL_Init( SDL_INIT_VIDEO) < 0 )
{
printf(“SDL ERROR Video initialization failed: %s\n”, SDL_GetError() );
SDL_Quit(); exit(0);
}

    info = SDL_GetVideoInfo();
    if( !info ) 
    {       printf("SDL ERROR Video query failed: %s\n", SDL_GetError() );
            SDL_Quit(); exit(0); 
    }

    bpp = info->vfmt->BitsPerPixel;

    if( (window=SDL_SetVideoMode( 400, 300, bpp, SDL_OPENGL|SDL_RESIZABLE )) == 0 ) 
    {       
			printf("SDL ERROR Video mode set failed: %s\n", SDL_GetError() );
        	SDL_Quit(); exit(0); 
    }
    
	SDL_EnableUNICODE(1);
	SDL_EnableKeyRepeat(0,0);

    while(!raus)
    {
        while( SDL_PollEvent( &event ) )
        {   switch( event.type ) 
            {       
					case SDL_VIDEORESIZE:
						printf("Resize Event!\n");
                        break;
                    case SDL_MOUSEBUTTONDOWN:
                    case SDL_MOUSEBUTTONUP:
						printf("Mouse Event!\n");
                        break;
					case SDL_KEYUP:
						printf("Keyboard Event!\n");                            
						if ((unsigned char)(event.key.keysym.unicode & 0x7F)=='q')
						{
							raus=1;
						}
						break;
                    default:
                        break;
            }     
        }
    }

printf("Bye!\n");
SDL_Quit();
return (0);

}