Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b9e10880
Commit
b9e10880
authored
Jan 11, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: reimplement 'fullscreen video device' (fixes #5831)
parent
d1902eb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
18 deletions
+37
-18
modules/gui/macosx/MainMenu.h
modules/gui/macosx/MainMenu.h
+1
-0
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+35
-17
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+1
-1
No files found.
modules/gui/macosx/MainMenu.h
View file @
b9e10880
...
...
@@ -212,6 +212,7 @@
-
(
IBAction
)
resizeVideoWindow
:(
id
)
sender
;
-
(
IBAction
)
floatOnTop
:(
id
)
sender
;
-
(
IBAction
)
createVideoSnapshot
:(
id
)
sender
;
-
(
IBAction
)
toggleFullscreenDevice
:(
id
)
sender
;
-
(
IBAction
)
showWizard
:(
id
)
sender
;
-
(
IBAction
)
showVideoEffects
:(
id
)
sender
;
...
...
modules/gui/macosx/MainMenu.m
View file @
b9e10880
...
...
@@ -445,9 +445,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
[
self
setupVarMenuItem
:
o_mi_crop
target
:
(
vlc_object_t
*
)
p_vout
var:
"crop"
selector
:
@selector
(
toggleVar
:
)];
[
self
setupVarMenuItem
:
o_mi_screen
target
:
(
vlc_object_t
*
)
p_vout
var:
"video-device"
selector
:
@selector
(
toggleVar
:
)];
[
self
setupVarMenuItem
:
o_mi_deinterlace
target
:
(
vlc_object_t
*
)
p_vout
var:
"deinterlace"
selector
:
@selector
(
toggleVar
:
)];
...
...
@@ -460,6 +457,9 @@ static VLCMainMenu *_o_sharedInstance = nil;
@selector
(
toggleVar
:
)];
#endif
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
[
self
refreshVoutDeviceMenu
:
nil
];
[
self
setSubmenusEnabled
:
YES
];
}
vlc_object_release
(
p_input
);
}
...
...
@@ -471,25 +471,37 @@ static VLCMainMenu *_o_sharedInstance = nil;
-
(
void
)
refreshVoutDeviceMenu
:(
NSNotification
*
)
o_notification
{
int
x
,
y
=
0
;
vout_thread_t
*
p_vout
=
getVout
();
if
(
!
p_vout
)
return
;
/* clean the menu before adding new entries */
if
(
[
o_mi_screen
hasSubmenu
]
)
NSUInteger
count
=
[
o_mu_screen
numberOfItems
];
NSMenu
*
o_submenu
=
o_mu_screen
;
if
(
count
>
0
)
{
y
=
[[
o_mi_screen
submenu
]
numberOfItems
]
-
1
;
while
(
x
!=
y
)
if
(
OSX_LEOPARD
)
{
[[
o_mi_screen
submenu
]
removeItemAtIndex
:
x
];
x
++
;
NSUInteger
count
=
[
o_submenu
numberOfItems
];
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
[
o_submenu
removeItemAtIndex
:
0
];
}
else
[
o_submenu
removeAllItems
];
}
[
self
setupVarMenuItem
:
o_mi_screen
target
:
(
vlc_object_t
*
)
p_vout
var:
"video-device"
selector
:
@selector
(
toggleVar
:
)];
vlc_object_release
(
(
vlc_object_t
*
)
p_vout
);
NSArray
*
o_screens
=
[
NSScreen
screens
];
count
=
[
o_screens
count
];
[
o_submenu
addItemWithTitle
:
_NS
(
"Default"
)
action
:
@selector
(
toggleFullscreenDevice
:
)
keyEquivalent
:
@""
];
[[
o_submenu
itemAtIndex
:
0
]
setTag
:
0
];
[[
o_submenu
itemAtIndex
:
0
]
setEnabled
:
YES
];
[[
o_submenu
itemAtIndex
:
0
]
setTarget
:
self
];
NSRect
s_rect
;
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
{
s_rect
=
[[
o_screens
objectAtIndex
:
i
]
frame
];
[
o_submenu
addItemWithTitle
:
[
NSString
stringWithFormat
:
@"%@ %i (%ix%i)"
,
_NS
(
"Screen"
),
i
+
1
,
(
int
)
s_rect
.
size
.
width
,
(
int
)
s_rect
.
size
.
height
]
action
:
@selector
(
toggleFullscreenDevice
:
)
keyEquivalent
:
@""
];
[[
o_submenu
itemAtIndex
:
i
+
1
]
setTag
:
(
int
)[[
o_screens
objectAtIndex
:
i
]
displayID
]];
[[
o_submenu
itemAtIndex
:
i
+
1
]
setEnabled
:
YES
];
[[
o_submenu
itemAtIndex
:
i
+
1
]
setTarget
:
self
];
}
[[
o_submenu
itemWithTag
:
config_GetInt
(
VLCIntf
,
"macosx-vdev"
)]
setState
:
NSOnState
];
}
-
(
void
)
setSubmenusEnabled
:(
BOOL
)
b_enabled
...
...
@@ -624,6 +636,12 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
}
-
(
IBAction
)
toggleFullscreenDevice
:(
id
)
sender
{
config_PutInt
(
VLCIntf
,
"macosx-vdev"
,
[
sender
tag
]
);
[
self
refreshVoutDeviceMenu
:
nil
];
}
-
(
id
)
voutMenu
{
return
o_vout_menu
;
...
...
modules/gui/macosx/MainWindow.m
View file @
b9e10880
...
...
@@ -1285,7 +1285,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
BOOL
blackout_other_displays
=
config_GetInt
(
VLCIntf
,
"macosx-black"
);
if
(
p_vout
)
screen
=
[
NSScreen
screenWithDisplayID
:(
CGDirectDisplayID
)
var_GetInteger
(
p_vout
,
"video-device
"
)];
screen
=
[
NSScreen
screenWithDisplayID
:(
CGDirectDisplayID
)
config_GetInt
(
VLCIntf
,
"macosx-vdev
"
)];
[
self
lockFullscreenAnimation
];
...
...
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