Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
BeOS/Haiku support for SDL_WINDOW_BORDERLESS.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 13, 2012
1 parent 2c3d301 commit 76edead
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/video/bwindow/SDL_BWin.h
Expand Up @@ -63,8 +63,8 @@ class SDL_BWin:public BDirectWindow
{
public:
/* Constructor/Destructor */
SDL_BWin(BRect bounds, uint32 flags):BDirectWindow(bounds, "Untitled",
B_TITLED_WINDOW, flags)
SDL_BWin(BRect bounds, window_look look, uint32 flags)
: BDirectWindow(bounds, "Untitled", look, B_NORMAL_WINDOW_FEEL, flags)
{
_last_buttons = 0;

Expand Down
6 changes: 4 additions & 2 deletions src/video/bwindow/SDL_bwindow.cc
Expand Up @@ -41,6 +41,8 @@ static inline SDL_BApp *_GetBeApp() {

static int _InitWindow(_THIS, SDL_Window *window) {
uint32 flags = 0;
window_look look = B_BORDERED_WINDOW_LOOK;

BRect bounds(
window->x,
window->y,
Expand All @@ -59,10 +61,10 @@ static int _InitWindow(_THIS, SDL_Window *window) {
flags |= B_NOT_RESIZABLE | B_NOT_ZOOMABLE;
}
if(window->flags & SDL_WINDOW_BORDERLESS) {
/* TODO: Add support for this flag */
look = B_NO_BORDER_WINDOW_LOOK;
}

SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds, flags);
SDL_BWin *bwin = new(std::nothrow) SDL_BWin(bounds, look, flags);
if(bwin == NULL)
return ENOMEM;

Expand Down

0 comments on commit 76edead

Please sign in to comment.