Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
2dda4071
Commit
2dda4071
authored
Aug 03, 2011
by
Nathan Heisey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed minor rendering issues.
parent
2f941519
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
5 deletions
+23
-5
SDL_BWin.h
src/video/bwindow/SDL_BWin.h
+2
-2
SDL_bframebuffer.cc
src/video/bwindow/SDL_bframebuffer.cc
+1
-1
SDL_bwindow.cc
src/video/bwindow/SDL_bwindow.cc
+20
-2
No files found.
src/video/bwindow/SDL_BWin.h
View file @
2dda4071
...
@@ -63,8 +63,8 @@ class SDL_BWin:public BDirectWindow
...
@@ -63,8 +63,8 @@ class SDL_BWin:public BDirectWindow
{
{
public
:
public
:
/* Constructor/Destructor */
/* Constructor/Destructor */
SDL_BWin
(
BRect
bounds
)
:
BDirectWindow
(
bounds
,
"Untitled"
,
SDL_BWin
(
BRect
bounds
,
uint32
flags
)
:
BDirectWindow
(
bounds
,
"Untitled"
,
B_TITLED_WINDOW
,
0
)
B_TITLED_WINDOW
,
flags
)
{
{
_last_buttons
=
0
;
_last_buttons
=
0
;
...
...
src/video/bwindow/SDL_bframebuffer.cc
View file @
2dda4071
...
@@ -53,7 +53,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
...
@@ -53,7 +53,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
/* Make sure we have exclusive access to frame buffer data */
/* Make sure we have exclusive access to frame buffer data */
bwin
->
LockBuffer
();
bwin
->
LockBuffer
();
/* format */
/* format */
display_mode
bmode
;
display_mode
bmode
;
bscreen
.
GetMode
(
&
bmode
);
bscreen
.
GetMode
(
&
bmode
);
...
...
src/video/bwindow/SDL_bwindow.cc
View file @
2dda4071
...
@@ -38,20 +38,32 @@ static inline SDL_BApp *_GetBeApp() {
...
@@ -38,20 +38,32 @@ static inline SDL_BApp *_GetBeApp() {
}
}
int
_InitWindow
(
_THIS
,
SDL_Window
*
window
)
{
int
_InitWindow
(
_THIS
,
SDL_Window
*
window
)
{
uint32
flags
=
0
;
BRect
bounds
(
BRect
bounds
(
window
->
x
,
window
->
x
,
window
->
y
,
window
->
y
,
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
);
);
SDL_BWin
*
bwin
=
new
(
std
::
nothrow
)
SDL_BWin
(
bounds
);
if
(
window
->
flags
&
SDL_WINDOW_FULLSCREEN
)
{
}
if
(
window
->
flags
&
SDL_WINDOW_OPENGL
)
{
}
if
(
!
(
window
->
flags
&
SDL_WINDOW_RESIZABLE
))
{
flags
|=
B_NOT_RESIZABLE
;
}
if
(
window
->
flags
&
SDL_WINDOW_BORDERLESS
)
{
}
SDL_BWin
*
bwin
=
new
(
std
::
nothrow
)
SDL_BWin
(
bounds
,
flags
);
if
(
bwin
==
NULL
)
if
(
bwin
==
NULL
)
return
ENOMEM
;
return
ENOMEM
;
window
->
driverdata
=
bwin
;
window
->
driverdata
=
bwin
;
int32
winID
=
_GetBeApp
()
->
GetID
(
window
);
int32
winID
=
_GetBeApp
()
->
GetID
(
window
);
bwin
->
SetID
(
winID
);
bwin
->
SetID
(
winID
);
return
0
;
return
0
;
}
}
...
@@ -59,6 +71,7 @@ int BE_CreateWindow(_THIS, SDL_Window *window) {
...
@@ -59,6 +71,7 @@ int BE_CreateWindow(_THIS, SDL_Window *window) {
if
(
_InitWindow
(
_this
,
window
)
==
ENOMEM
)
if
(
_InitWindow
(
_this
,
window
)
==
ENOMEM
)
return
ENOMEM
;
return
ENOMEM
;
printf
(
"Flags = 0x%x
\n
"
,
window
->
flags
);
/* Start window loop */
/* Start window loop */
_ToBeWin
(
window
)
->
Show
();
_ToBeWin
(
window
)
->
Show
();
return
0
;
return
0
;
...
@@ -76,6 +89,11 @@ int BE_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) {
...
@@ -76,6 +89,11 @@ int BE_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) {
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 */
if
(
!
(
otherBWin
->
Flags
()
&
B_NOT_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
)
==
ENOMEM
)
if
(
_InitWindow
(
_this
,
window
)
==
ENOMEM
)
return
ENOMEM
;
return
ENOMEM
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment