mirror of
https://github.com/yawut/SDL.git
synced 2026-09-08 17:16:19 -05:00
BeOS/Haiku support for SDL_WINDOW_BORDERLESS.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user