Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
deff6eb9
Commit
deff6eb9
authored
Dec 19, 2000
by
Arnaud de Bossoreille de Ribou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdl plugin :
- Quantic start in fullscreen fixed.
parent
90820464
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
plugins/sdl/vout_sdl.c
plugins/sdl/vout_sdl.c
+27
-23
No files found.
plugins/sdl/vout_sdl.c
View file @
deff6eb9
...
...
@@ -85,6 +85,7 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
p_vout
->
p_sys
->
p_display
=
NULL
;
p_vout
->
p_sys
->
p_overlay
=
NULL
;
p_vout
->
p_sys
->
b_must_acquire
=
0
;
/* Initialize library */
if
(
SDL_Init
(
SDL_INIT_VIDEO
)
<
0
)
...
...
@@ -95,14 +96,6 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
return
(
1
);
}
if
(
SDLOpenDisplay
(
p_vout
)
)
{
intf_ErrMsg
(
"error: can't initialize SDL library: %s
\n
"
,
SDL_GetError
()
);
free
(
p_vout
->
p_sys
);
return
(
1
);
}
/* Force the software yuv even if it is not used */
/* If we don't do this, p_vout is not correctly initialized
and it's impossible to switch between soft/hard yuv */
...
...
@@ -111,13 +104,24 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
if
(
psz_display
!=
NULL
&&
strcmp
(
psz_display
,
"fullscreen"
)
==
0
)
{
p_vout
->
p_sys
->
b_fullscreen
=
1
;
}
else
{
}
else
{
p_vout
->
p_sys
->
b_fullscreen
=
0
;
}
p_vout
->
p_sys
->
b_reopen_display
=
1
;
if
(
SDLOpenDisplay
(
p_vout
)
)
{
intf_ErrMsg
(
"error: can't initialize SDL library: %s
\n
"
,
SDL_GetError
()
);
free
(
p_vout
->
p_sys
);
return
(
1
);
}
return
(
0
);
}
}
/*****************************************************************************
* vout_SDLInit: initialize SDL video thread output method
...
...
@@ -186,8 +190,8 @@ int vout_SDLManage( vout_thread_t *p_vout )
if
(
SDLOpenDisplay
(
p_vout
)
)
{
intf_ErrMsg
(
"error: can't open DISPLAY default display
\n
"
);
return
(
1
);
intf_ErrMsg
(
"error: can't open DISPLAY default display
\n
"
);
return
(
1
);
}
p_vout
->
p_sys
->
b_reopen_display
=
0
;
}
...
...
@@ -292,7 +296,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
p_vout
->
p_sys
->
p_display
=
SDL_SetVideoMode
(
p_vout
->
i_width
,
p_vout
->
i_height
,
0
,
SDL_ANYFORMAT
|
SDL_HWSURFACE
|
SDL_DOUBLEBUF
);
SDL_ANYFORMAT
|
SDL_HWSURFACE
|
SDL_DOUBLEBUF
);
SDL_ShowCursor
(
1
);
}
...
...
@@ -301,24 +305,24 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
intf_ErrMsg
(
"error: can't open DISPLAY default display
\n
"
);
return
(
1
);
}
p_vout
->
p_sys
->
p_overlay
=
NULL
;
SDL_LockSurface
(
p_vout
->
p_sys
->
p_display
)
;
SDL_WM_SetCaption
(
VOUT_TITLE
,
VOUT_TITLE
);
SDL_EventState
(
SDL_KEYUP
,
SDL_IGNORE
);
/* ignore keys up */
/* Check buffers properties */
p_vout
->
p_sys
->
b_must_acquire
=
1
;
/* always acquire */
p_vout
->
p_sys
->
p_buffer
[
0
]
=
p_vout
->
p_sys
->
p_display
->
pixels
;
SDL_Flip
(
p_vout
->
p_sys
->
p_display
);
p_vout
->
p_sys
->
p_buffer
[
1
]
=
p_vout
->
p_sys
->
p_display
->
pixels
;
SDL_Flip
(
p_vout
->
p_sys
->
p_display
);
p_vout
->
p_sys
->
p_buffer
[
0
]
=
p_vout
->
p_sys
->
p_display
->
pixels
;
SDL_Flip
(
p_vout
->
p_sys
->
p_display
);
p_vout
->
p_sys
->
p_buffer
[
1
]
=
p_vout
->
p_sys
->
p_display
->
pixels
;
SDL_Flip
(
p_vout
->
p_sys
->
p_display
);
/* Set graphic context colors */
/*
col_fg.r = col_fg.g = col_fg.b = -1;
col_fg.r = col_fg.g = col_fg.b = -1;
col_bg.r = col_bg.g = col_bg.b = 0;
if( ggiSetGCForeground(p_vout->p_sys->p_display,
ggiMapColor(p_vout->p_sys->p_display,&col_fg)) ||
...
...
@@ -346,7 +350,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
p_vout
->
i_height
=
p_vout
->
p_sys
->
p_display
->
h
;
p_vout
->
i_bytes_per_line
=
p_vout
->
p_sys
->
p_display
->
format
->
BytesPerPixel
*
p_vout
->
p_sys
->
p_display
->
w
;
p_vout
->
p_sys
->
p_display
->
w
;
p_vout
->
i_screen_depth
=
p_vout
->
p_sys
->
p_display
->
format
->
BitsPerPixel
;
p_vout
->
i_bytes_per_pixel
=
p_vout
->
p_sys
->
p_display
->
format
->
BytesPerPixel
;
...
...
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