Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f118a45b
Commit
f118a45b
authored
Sep 01, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't leak a HICON
parent
52a381c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+10
-6
No files found.
modules/video_output/msw/events.c
View file @
f118a45b
...
@@ -125,6 +125,8 @@ struct event_thread_t
...
@@ -125,6 +125,8 @@ struct event_thread_t
video_format_t
source
;
video_format_t
source
;
vout_display_place_t
place
;
vout_display_place_t
place
;
HICON
vlc_icon
;
bool
has_moved
;
bool
has_moved
;
};
};
...
@@ -488,7 +490,6 @@ static int DirectXCreateWindow( event_thread_t *p_event )
...
@@ -488,7 +490,6 @@ static int DirectXCreateWindow( event_thread_t *p_event )
HMENU
hMenu
;
HMENU
hMenu
;
RECT
rect_window
;
RECT
rect_window
;
WNDCLASS
wc
;
/* window class components */
WNDCLASS
wc
;
/* window class components */
HICON
vlc_icon
;
char
vlc_path
[
MAX_PATH
+
1
];
char
vlc_path
[
MAX_PATH
+
1
];
int
i_style
,
i_stylex
;
int
i_style
,
i_stylex
;
...
@@ -527,11 +528,11 @@ static int DirectXCreateWindow( event_thread_t *p_event )
...
@@ -527,11 +528,11 @@ static int DirectXCreateWindow( event_thread_t *p_event )
#endif
#endif
/* Get the Icon from the main app */
/* Get the Icon from the main app */
vlc_icon
=
NULL
;
p_event
->
vlc_icon
=
NULL
;
#ifndef UNDER_CE
#ifndef UNDER_CE
if
(
GetModuleFileName
(
NULL
,
vlc_path
,
MAX_PATH
)
)
if
(
GetModuleFileName
(
NULL
,
vlc_path
,
MAX_PATH
)
)
{
{
vlc_icon
=
ExtractIcon
(
hInstance
,
vlc_path
,
0
);
p_event
->
vlc_icon
=
ExtractIcon
(
hInstance
,
vlc_path
,
0
);
}
}
#endif
#endif
...
@@ -541,7 +542,7 @@ static int DirectXCreateWindow( event_thread_t *p_event )
...
@@ -541,7 +542,7 @@ static int DirectXCreateWindow( event_thread_t *p_event )
wc
.
cbClsExtra
=
0
;
/* no extra class data */
wc
.
cbClsExtra
=
0
;
/* no extra class data */
wc
.
cbWndExtra
=
0
;
/* no extra window data */
wc
.
cbWndExtra
=
0
;
/* no extra window data */
wc
.
hInstance
=
hInstance
;
/* instance */
wc
.
hInstance
=
hInstance
;
/* instance */
wc
.
hIcon
=
vlc_icon
;
/* load the vlc big icon */
wc
.
hIcon
=
p_event
->
vlc_icon
;
/* load the vlc big icon */
wc
.
hCursor
=
p_event
->
is_cursor_hidden
?
p_event
->
cursor_empty
:
wc
.
hCursor
=
p_event
->
is_cursor_hidden
?
p_event
->
cursor_empty
:
p_event
->
cursor_arrow
;
p_event
->
cursor_arrow
;
wc
.
hbrBackground
=
GetStockObject
(
BLACK_BRUSH
);
/* background color */
wc
.
hbrBackground
=
GetStockObject
(
BLACK_BRUSH
);
/* background color */
...
@@ -551,8 +552,8 @@ static int DirectXCreateWindow( event_thread_t *p_event )
...
@@ -551,8 +552,8 @@ static int DirectXCreateWindow( event_thread_t *p_event )
/* Register the window class */
/* Register the window class */
if
(
!
RegisterClass
(
&
wc
)
)
if
(
!
RegisterClass
(
&
wc
)
)
{
{
if
(
vlc_icon
)
if
(
p_event
->
vlc_icon
)
DestroyIcon
(
vlc_icon
);
DestroyIcon
(
p_event
->
vlc_icon
);
msg_Err
(
vd
,
"DirectXCreateWindow RegisterClass FAILED (err=%lu)"
,
GetLastError
()
);
msg_Err
(
vd
,
"DirectXCreateWindow RegisterClass FAILED (err=%lu)"
,
GetLastError
()
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
@@ -707,6 +708,9 @@ static void DirectXCloseWindow( event_thread_t *p_event )
...
@@ -707,6 +708,9 @@ static void DirectXCloseWindow( event_thread_t *p_event )
vout_display_DeleteWindow
(
vd
,
p_event
->
parent_window
);
vout_display_DeleteWindow
(
vd
,
p_event
->
parent_window
);
p_event
->
hwnd
=
NULL
;
p_event
->
hwnd
=
NULL
;
if
(
p_event
->
vlc_icon
)
DestroyIcon
(
p_event
->
vlc_icon
);
HINSTANCE
hInstance
=
GetModuleHandle
(
NULL
);
HINSTANCE
hInstance
=
GetModuleHandle
(
NULL
);
UnregisterClass
(
p_event
->
class_video
,
hInstance
);
UnregisterClass
(
p_event
->
class_video
,
hInstance
);
UnregisterClass
(
p_event
->
class_main
,
hInstance
);
UnregisterClass
(
p_event
->
class_main
,
hInstance
);
...
...
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