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
4488be3b
Commit
4488be3b
authored
Feb 04, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog: fix win32 build
parent
5a9609c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
+15
-18
modules/codec/libass.c
modules/codec/libass.c
+3
-4
src/misc/update.c
src/misc/update.c
+12
-14
No files found.
modules/codec/libass.c
View file @
4488be3b
...
@@ -225,17 +225,16 @@ static int Create( vlc_object_t *p_this )
...
@@ -225,17 +225,16 @@ static int Create( vlc_object_t *p_this )
#ifdef HAVE_FONTCONFIG
#ifdef HAVE_FONTCONFIG
#if defined(_WIN32)
#if defined(_WIN32)
int
i_ret
=
vlc_dialog_id
*
p_dialog_id
=
vlc_dialog_display_progress
(
p_dec
,
true
,
0
.
0
,
NULL
,
vlc_dialog_display_progress
(
p_dec
,
true
,
0
.
0
,
NULL
,
_
(
"Building font cache"
),
_
(
"Building font cache"
),
_
(
"Please wait while your font cache is rebuilt.
\n
"
_
(
"Please wait while your font cache is rebuilt.
\n
"
"This should take less than a minute."
)
);
"This should take less than a minute."
)
);
unsigned
int
i_dialog_id
=
i_ret
>
0
?
i_ret
:
0
;
#endif
#endif
ass_set_fonts
(
p_renderer
,
psz_font
,
psz_family
,
1
,
NULL
,
1
);
// setup default font/family
ass_set_fonts
(
p_renderer
,
psz_font
,
psz_family
,
1
,
NULL
,
1
);
// setup default font/family
#if defined(_WIN32)
#if defined(_WIN32)
if
(
i
_dialog_id
!=
0
)
if
(
p
_dialog_id
!=
0
)
vlc_dialog_
cancel
(
p_dec
,
i
_dialog_id
);
vlc_dialog_
release
(
p_dec
,
p
_dialog_id
);
#endif
#endif
#else
#else
ass_set_fonts
(
p_renderer
,
psz_font
,
psz_family
,
1
,
NULL
,
1
);
ass_set_fonts
(
p_renderer
,
psz_font
,
psz_family
,
1
,
NULL
,
1
);
...
...
src/misc/update.c
View file @
4488be3b
...
@@ -529,8 +529,6 @@ void update_Download( update_t *p_update, const char *psz_destdir )
...
@@ -529,8 +529,6 @@ void update_Download( update_t *p_update, const char *psz_destdir )
static
void
*
update_DownloadReal
(
void
*
obj
)
static
void
*
update_DownloadReal
(
void
*
obj
)
{
{
update_download_thread_t
*
p_udt
=
(
update_download_thread_t
*
)
obj
;
update_download_thread_t
*
p_udt
=
(
update_download_thread_t
*
)
obj
;
int
i_ret
;
unsigned
int
i_dialog_id
=
0
;
uint64_t
l_size
;
uint64_t
l_size
;
uint64_t
l_downloaded
=
0
;
uint64_t
l_downloaded
=
0
;
float
f_progress
;
float
f_progress
;
...
@@ -545,6 +543,7 @@ static void* update_DownloadReal( void *obj )
...
@@ -545,6 +543,7 @@ static void* update_DownloadReal( void *obj )
int
i_read
;
int
i_read
;
int
canc
;
int
canc
;
vlc_dialog_id
*
p_dialog_id
=
NULL
;
update_t
*
p_update
=
p_udt
->
p_update
;
update_t
*
p_update
=
p_udt
->
p_update
;
char
*
psz_destdir
=
p_udt
->
psz_destdir
;
char
*
psz_destdir
=
p_udt
->
psz_destdir
;
...
@@ -594,20 +593,19 @@ static void* update_DownloadReal( void *obj )
...
@@ -594,20 +593,19 @@ static void* update_DownloadReal( void *obj )
psz_size
=
size_str
(
l_size
);
psz_size
=
size_str
(
l_size
);
i_ret
=
p_dialog_id
=
vlc_dialog_display_progress
(
p_udt
,
false
,
0
.
0
,
_
(
"Cancel"
),
vlc_dialog_display_progress
(
p_udt
,
false
,
0
.
0
,
_
(
"Cancel"
),
(
"Downloading..."
),
(
"Downloading..."
),
_
(
"%s
\n
Downloading... %s/%s %.1f%% done"
),
_
(
"%s
\n
Downloading... %s/%s %.1f%% done"
),
p_update
->
release
.
psz_url
,
"0.0"
,
psz_size
,
p_update
->
release
.
psz_url
,
"0.0"
,
psz_size
,
0
.
0
);
0
.
0
);
if
(
i_ret
<=
0
)
if
(
p_dialog_id
==
NULL
)
goto
end
;
goto
end
;
i_dialog_id
=
i_ret
;
while
(
!
atomic_load
(
&
p_udt
->
aborted
)
&&
while
(
!
atomic_load
(
&
p_udt
->
aborted
)
&&
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
&&
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
&&
!
vlc_dialog_
cancelled
(
p_udt
,
i
_dialog_id
)
)
!
vlc_dialog_
is_cancelled
(
p_udt
,
p
_dialog_id
)
)
{
{
if
(
fwrite
(
p_buffer
,
i_read
,
1
,
p_file
)
<
1
)
if
(
fwrite
(
p_buffer
,
i_read
,
1
,
p_file
)
<
1
)
{
{
...
@@ -619,7 +617,7 @@ static void* update_DownloadReal( void *obj )
...
@@ -619,7 +617,7 @@ static void* update_DownloadReal( void *obj )
psz_downloaded
=
size_str
(
l_downloaded
);
psz_downloaded
=
size_str
(
l_downloaded
);
f_progress
=
(
float
)
l_downloaded
/
(
float
)
l_size
;
f_progress
=
(
float
)
l_downloaded
/
(
float
)
l_size
;
vlc_dialog_update_progress_text
(
p_udt
,
i_dialog_id
,
f_po
s
,
vlc_dialog_update_progress_text
(
p_udt
,
p_dialog_id
,
f_progres
s
,
"%s
\n
Downloading... %s/%s - %.1f%% done"
,
"%s
\n
Downloading... %s/%s - %.1f%% done"
,
p_update
->
release
.
psz_url
,
p_update
->
release
.
psz_url
,
psz_downloaded
,
psz_size
,
psz_downloaded
,
psz_size
,
...
@@ -632,10 +630,10 @@ static void* update_DownloadReal( void *obj )
...
@@ -632,10 +630,10 @@ static void* update_DownloadReal( void *obj )
p_file
=
NULL
;
p_file
=
NULL
;
if
(
!
atomic_load
(
&
p_udt
->
aborted
)
&&
if
(
!
atomic_load
(
&
p_udt
->
aborted
)
&&
!
vlc_dialog_
cancelled
(
p_udt
,
i
_dialog_id
)
)
!
vlc_dialog_
is_cancelled
(
p_udt
,
p
_dialog_id
)
)
{
{
vlc_dialog_
cancel
(
p_udt
,
i
_dialog_id
);
vlc_dialog_
release
(
p_udt
,
p
_dialog_id
);
i_dialog_id
=
0
;
p_dialog_id
=
NULL
;
}
}
else
else
{
{
...
@@ -722,12 +720,12 @@ static void* update_DownloadReal( void *obj )
...
@@ -722,12 +720,12 @@ static void* update_DownloadReal( void *obj )
free
(
p_hash
);
free
(
p_hash
);
#ifdef _WIN32
#ifdef _WIN32
static
const
char
*
psz_msg
=
const
char
*
psz_msg
=
_
(
"The new version was successfully downloaded."
_
(
"The new version was successfully downloaded."
"Do you want to close VLC and install it now?"
);
"Do you want to close VLC and install it now?"
);
int
answer
=
vlc_dialog_wait_question
(
p_udt
,
VLC_DIALOG_QUESTION_NORMAL
,
int
answer
=
vlc_dialog_wait_question
(
p_udt
,
VLC_DIALOG_QUESTION_NORMAL
,
_
(
"Cancel"
),
_
(
"Install"
),
NULL
,
_
(
"Cancel"
),
_
(
"Install"
),
NULL
,
_
(
"Update VLC media player"
),
_
(
"Update VLC media player"
),
"%s"
,
psz_msg
);
psz_msg
);
if
(
answer
==
1
)
if
(
answer
==
1
)
{
{
...
@@ -739,8 +737,8 @@ static void* update_DownloadReal( void *obj )
...
@@ -739,8 +737,8 @@ static void* update_DownloadReal( void *obj )
}
}
#endif
#endif
end:
end:
if
(
i_dialog_id
!=
0
)
if
(
p_dialog_id
!=
NULL
)
vlc_dialog_
cancel
(
p_udt
,
i
_dialog_id
);
vlc_dialog_
release
(
p_udt
,
p
_dialog_id
);
if
(
p_stream
)
if
(
p_stream
)
stream_Delete
(
p_stream
);
stream_Delete
(
p_stream
);
if
(
p_file
)
if
(
p_file
)
...
...
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