src/video/bwindow/SDL_bwindow.cc
changeset 5932 cd08863bcb49
parent 5925 262ce29aabf6
child 5937 74870d003e32
     1.1 --- a/src/video/bwindow/SDL_bwindow.cc	Sat Jul 30 18:26:13 2011 +0000
     1.2 +++ b/src/video/bwindow/SDL_bwindow.cc	Wed Aug 03 05:09:36 2011 +0000
     1.3 @@ -38,20 +38,32 @@
     1.4  }
     1.5  
     1.6  int _InitWindow(_THIS, SDL_Window *window) {
     1.7 +	uint32 flags = 0;
     1.8  	BRect bounds(
     1.9          window->x,
    1.10          window->y,
    1.11          window->x + window->w - 1,	//BeWindows have an off-by-one px w/h thing
    1.12          window->y + window->h - 1
    1.13      );
    1.14 +    
    1.15 +    if(window->flags & SDL_WINDOW_FULLSCREEN) {
    1.16 +    }
    1.17 +    if(window->flags & SDL_WINDOW_OPENGL) {
    1.18 +    }
    1.19 +    if(!(window->flags & SDL_WINDOW_RESIZABLE)) {
    1.20 +    	flags |= B_NOT_RESIZABLE;
    1.21 +    }
    1.22 +    if(window->flags & SDL_WINDOW_BORDERLESS) {
    1.23 +    }
    1.24  
    1.25 -    SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds);
    1.26 +    SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds, flags);
    1.27      if(bwin == NULL)
    1.28      	return ENOMEM;
    1.29  
    1.30      window->driverdata = bwin;
    1.31      int32 winID = _GetBeApp()->GetID(window);
    1.32      bwin->SetID(winID);
    1.33 +
    1.34      return 0;
    1.35  }
    1.36  
    1.37 @@ -59,6 +71,7 @@
    1.38  	if(_InitWindow(_this, window) == ENOMEM)
    1.39  		return ENOMEM;
    1.40  	
    1.41 +	printf("Flags = 0x%x\n", window->flags);
    1.42  	/* Start window loop */
    1.43      _ToBeWin(window)->Show();
    1.44      return 0;
    1.45 @@ -76,6 +89,11 @@
    1.46  	window->w = (int)otherBWin->Frame().Width();
    1.47  	window->h = (int)otherBWin->Frame().Height();
    1.48  	
    1.49 +	/* Set SDL flags */
    1.50 +	if(!(otherBWin->Flags() & B_NOT_RESIZABLE)) {
    1.51 +		window->flags |= SDL_WINDOW_RESIZABLE;
    1.52 +	}
    1.53 +	
    1.54  	/* If we are out of memory, return the error code */
    1.55  	if(_InitWindow(_this, window) == ENOMEM)
    1.56  		return ENOMEM;