mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Fixed Haiku build
This commit is contained in:
@@ -51,7 +51,7 @@ static int _InitWindow(_THIS, SDL_Window *window) {
|
|||||||
window->x + window->w - 1, //BeWindows have an off-by-one px w/h thing
|
window->x + window->w - 1, //BeWindows have an off-by-one px w/h thing
|
||||||
window->y + window->h - 1
|
window->y + window->h - 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((window->flags & SDL_WINDOW_FULLSCREEN_MASK) != 0) {
|
if ((window->flags & SDL_WINDOW_FULLSCREEN_MASK) != 0) {
|
||||||
/* TODO: Add support for this flag */
|
/* TODO: Add support for this flag */
|
||||||
printf(__FILE__": %d!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",__LINE__);
|
printf(__FILE__": %d!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",__LINE__);
|
||||||
@@ -71,7 +71,7 @@ static int _InitWindow(_THIS, SDL_Window *window) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
window->driverdata = bwin;
|
window->driverdata = (SDL_WindowData *)bwin;
|
||||||
int32 winID = _GetBeApp()->GetID(window);
|
int32 winID = _GetBeApp()->GetID(window);
|
||||||
bwin->SetID(winID);
|
bwin->SetID(winID);
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ int HAIKU_CreateWindow(_THIS, SDL_Window *window) {
|
|||||||
if (_InitWindow(_this, window) < 0) {
|
if (_InitWindow(_this, window) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start window loop */
|
/* Start window loop */
|
||||||
_ToBeWin(window)->Show();
|
_ToBeWin(window)->Show();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -94,29 +94,29 @@ int HAIKU_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) {
|
|||||||
if (!otherBWin->LockLooper()) {
|
if (!otherBWin->LockLooper()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the new window and initialize its members */
|
/* Create the new window and initialize its members */
|
||||||
window->x = (int)otherBWin->Frame().left;
|
window->x = (int)otherBWin->Frame().left;
|
||||||
window->y = (int)otherBWin->Frame().top;
|
window->y = (int)otherBWin->Frame().top;
|
||||||
window->w = (int)otherBWin->Frame().Width();
|
window->w = (int)otherBWin->Frame().Width();
|
||||||
window->h = (int)otherBWin->Frame().Height();
|
window->h = (int)otherBWin->Frame().Height();
|
||||||
|
|
||||||
/* Set SDL flags */
|
/* Set SDL flags */
|
||||||
if (!(otherBWin->Flags() & B_NOT_RESIZABLE)) {
|
if (!(otherBWin->Flags() & B_NOT_RESIZABLE)) {
|
||||||
window->flags |= SDL_WINDOW_RESIZABLE;
|
window->flags |= SDL_WINDOW_RESIZABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we are out of memory, return the error code */
|
/* If we are out of memory, return the error code */
|
||||||
if (_InitWindow(_this, window) < 0) {
|
if (_InitWindow(_this, window) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Add any other SDL-supported window attributes here */
|
/* TODO: Add any other SDL-supported window attributes here */
|
||||||
_ToBeWin(window)->SetTitle(otherBWin->Title());
|
_ToBeWin(window)->SetTitle(otherBWin->Title());
|
||||||
|
|
||||||
/* Start window loop and unlock the other window */
|
/* Start window loop and unlock the other window */
|
||||||
_ToBeWin(window)->Show();
|
_ToBeWin(window)->Show();
|
||||||
|
|
||||||
otherBWin->UnlockLooper();
|
otherBWin->UnlockLooper();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@ void HAIKU_SetWindowFullscreen(_THIS, SDL_Window * window,
|
|||||||
BMessage msg(BWIN_FULLSCREEN);
|
BMessage msg(BWIN_FULLSCREEN);
|
||||||
msg.AddBool("fullscreen", fullscreen);
|
msg.AddBool("fullscreen", fullscreen);
|
||||||
_ToBeWin(window)->PostMessage(&msg);
|
_ToBeWin(window)->PostMessage(&msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ int HAIKU_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user