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
b6c26ffe
Commit
b6c26ffe
authored
Aug 22, 2011
by
Nathan Heisey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed static misnomers
parent
4799ac2b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
14 deletions
+15
-14
SDL_bframebuffer.cc
src/video/bwindow/SDL_bframebuffer.cc
+2
-2
SDL_bmodes.cc
src/video/bwindow/SDL_bmodes.cc
+8
-7
SDL_bmodes.h
src/video/bwindow/SDL_bmodes.h
+2
-2
SDL_bvideo.cc
src/video/bwindow/SDL_bvideo.cc
+2
-2
SDL_bwindow.cc
src/video/bwindow/SDL_bwindow.cc
+1
-1
No files found.
src/video/bwindow/SDL_bframebuffer.cc
View file @
b6c26ffe
...
@@ -59,8 +59,8 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
...
@@ -59,8 +59,8 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
/* format */
/* format */
display_mode
bmode
;
display_mode
bmode
;
bscreen
.
GetMode
(
&
bmode
);
bscreen
.
GetMode
(
&
bmode
);
int32
bpp
=
ColorSpaceToBitsPerPixel
(
bmode
.
space
);
int32
bpp
=
BE_
ColorSpaceToBitsPerPixel
(
bmode
.
space
);
*
format
=
BPPToSDLPxFormat
(
bpp
);
*
format
=
B
E_B
PPToSDLPxFormat
(
bpp
);
/* Create the new bitmap object */
/* Create the new bitmap object */
BBitmap
*
bitmap
=
bwin
->
GetBitmap
();
BBitmap
*
bitmap
=
bwin
->
GetBitmap
();
...
...
src/video/bwindow/SDL_bmodes.cc
View file @
b6c26ffe
...
@@ -131,7 +131,7 @@ void _SpoutModeData(display_mode *bmode) {
...
@@ -131,7 +131,7 @@ void _SpoutModeData(display_mode *bmode) {
static
inline
int32
ColorSpaceToBitsPerPixel
(
uint32
colorspace
)
int32
BE_
ColorSpaceToBitsPerPixel
(
uint32
colorspace
)
{
{
int
bitsperpixel
;
int
bitsperpixel
;
...
@@ -162,7 +162,7 @@ static inline int32 ColorSpaceToBitsPerPixel(uint32 colorspace)
...
@@ -162,7 +162,7 @@ static inline int32 ColorSpaceToBitsPerPixel(uint32 colorspace)
return
(
bitsperpixel
);
return
(
bitsperpixel
);
}
}
static
inline
int32
BPPToSDLPxFormat
(
int32
bpp
)
{
int32
BE_
BPPToSDLPxFormat
(
int32
bpp
)
{
/* Translation taken from SDL_windowsmodes.c */
/* Translation taken from SDL_windowsmodes.c */
switch
(
bpp
)
{
switch
(
bpp
)
{
case
32
:
case
32
:
...
@@ -186,7 +186,7 @@ static inline int32 BPPToSDLPxFormat(int32 bpp) {
...
@@ -186,7 +186,7 @@ static inline int32 BPPToSDLPxFormat(int32 bpp) {
}
}
}
}
static
inline
void
_BDisplayModeToSdlDisplayMode
(
display_mode
*
bmode
,
static
void
_BDisplayModeToSdlDisplayMode
(
display_mode
*
bmode
,
SDL_DisplayMode
*
mode
)
{
SDL_DisplayMode
*
mode
)
{
mode
->
w
=
bmode
->
virtual_width
;
mode
->
w
=
bmode
->
virtual_width
;
mode
->
h
=
bmode
->
virtual_height
;
mode
->
h
=
bmode
->
virtual_height
;
...
@@ -205,12 +205,12 @@ static inline void _BDisplayModeToSdlDisplayMode(display_mode *bmode,
...
@@ -205,12 +205,12 @@ static inline void _BDisplayModeToSdlDisplayMode(display_mode *bmode,
#endif
#endif
/* Set the format */
/* Set the format */
int32
bpp
=
ColorSpaceToBitsPerPixel
(
bmode
->
space
);
int32
bpp
=
BE_
ColorSpaceToBitsPerPixel
(
bmode
->
space
);
mode
->
format
=
BPPToSDLPxFormat
(
bpp
);
mode
->
format
=
B
E_B
PPToSDLPxFormat
(
bpp
);
}
}
/* Later, there may be more than one monitor available */
/* Later, there may be more than one monitor available */
void
_AddDisplay
(
BScreen
*
screen
)
{
static
void
_AddDisplay
(
BScreen
*
screen
)
{
SDL_VideoDisplay
display
;
SDL_VideoDisplay
display
;
SDL_DisplayMode
*
mode
=
(
SDL_DisplayMode
*
)
SDL_calloc
(
1
,
SDL_DisplayMode
*
mode
=
(
SDL_DisplayMode
*
)
SDL_calloc
(
1
,
sizeof
(
SDL_DisplayMode
));
sizeof
(
SDL_DisplayMode
));
...
@@ -307,7 +307,8 @@ int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
...
@@ -307,7 +307,8 @@ int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
SDL_SetError
(
"Bad video mode
\n
"
);
SDL_SetError
(
"Bad video mode
\n
"
);
return
-
1
;
return
-
1
;
}
}
free
(
bmode_list
);
free
(
bmode_list
);
#if SDL_VIDEO_OPENGL
#if SDL_VIDEO_OPENGL
/* FIXME: Is there some way to reboot the OpenGL context? This doesn't
/* FIXME: Is there some way to reboot the OpenGL context? This doesn't
...
...
src/video/bwindow/SDL_bmodes.h
View file @
b6c26ffe
...
@@ -28,8 +28,8 @@ extern "C" {
...
@@ -28,8 +28,8 @@ extern "C" {
#include "../SDL_sysvideo.h"
#include "../SDL_sysvideo.h"
extern
int32
ColorSpaceToBitsPerPixel
(
uint32
colorspace
);
extern
int32
BE_
ColorSpaceToBitsPerPixel
(
uint32
colorspace
);
extern
int32
BPPToSDLPxFormat
(
int32
bpp
);
extern
int32
B
E_B
PPToSDLPxFormat
(
int32
bpp
);
extern
int
BE_InitModes
(
_THIS
);
extern
int
BE_InitModes
(
_THIS
);
extern
int
BE_QuitModes
(
_THIS
);
extern
int
BE_QuitModes
(
_THIS
);
...
...
src/video/bwindow/SDL_bvideo.cc
View file @
b6c26ffe
...
@@ -122,7 +122,7 @@ VideoBootStrap BWINDOW_bootstrap = {
...
@@ -122,7 +122,7 @@ VideoBootStrap BWINDOW_bootstrap = {
BE_Available
,
BE_CreateDevice
BE_Available
,
BE_CreateDevice
};
};
static
void
BE_DeleteDevice
(
SDL_VideoDevice
*
device
)
void
BE_DeleteDevice
(
SDL_VideoDevice
*
device
)
{
{
SDL_free
(
device
->
driverdata
);
SDL_free
(
device
->
driverdata
);
SDL_free
(
device
);
SDL_free
(
device
);
...
@@ -152,7 +152,7 @@ int BE_VideoInit(_THIS)
...
@@ -152,7 +152,7 @@ int BE_VideoInit(_THIS)
return
(
0
);
return
(
0
);
}
}
static
int
BE_Available
(
void
)
int
BE_Available
(
void
)
{
{
return
(
1
);
return
(
1
);
}
}
...
...
src/video/bwindow/SDL_bwindow.cc
View file @
b6c26ffe
...
@@ -37,7 +37,7 @@ static inline SDL_BApp *_GetBeApp() {
...
@@ -37,7 +37,7 @@ static inline SDL_BApp *_GetBeApp() {
return
((
SDL_BApp
*
)
be_app
);
return
((
SDL_BApp
*
)
be_app
);
}
}
int
_InitWindow
(
_THIS
,
SDL_Window
*
window
)
{
static
int
_InitWindow
(
_THIS
,
SDL_Window
*
window
)
{
uint32
flags
=
0
;
uint32
flags
=
0
;
BRect
bounds
(
BRect
bounds
(
window
->
x
,
window
->
x
,
...
...
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