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
cc884078
Commit
cc884078
authored
Apr 16, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed potential race condition
(cherry picked from commit 5b8a40579cfbacb736484f4210f1cc93e9caf440)
parent
0e4a59ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
24 deletions
+28
-24
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+28
-24
No files found.
modules/gui/macosx/intf.m
View file @
cc884078
...
@@ -778,6 +778,7 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -778,6 +778,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_msg_arr
removeAllObjects
];
[
o_msg_arr
removeAllObjects
];
[
o_msg_arr
release
];
[
o_msg_arr
release
];
o_msg_arr
=
NULL
;
[
o_msg_lock
release
];
[
o_msg_lock
release
];
...
@@ -2000,36 +2001,39 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -2000,36 +2001,39 @@ unsigned int CocoaKeyToVLC( unichar i_key )
-
(
void
)
processReceivedlibvlcMessage
:(
const
msg_item_t
*
)
item
ofType
:
(
int
)
i_type
withStr
:
(
char
*
)
str
-
(
void
)
processReceivedlibvlcMessage
:(
const
msg_item_t
*
)
item
ofType
:
(
int
)
i_type
withStr
:
(
char
*
)
str
{
{
NSColor
*
o_white
=
[
NSColor
whiteColor
];
if
(
o_msg_arr
)
NSColor
*
o_red
=
[
NSColor
redColor
];
{
NSColor
*
o_yellow
=
[
NSColor
yellowColor
];
NSColor
*
o_white
=
[
NSColor
whiteColor
];
NSColor
*
o_gray
=
[
NSColor
grayColor
];
NSColor
*
o_red
=
[
NSColor
redColor
];
NSString
*
firstString
,
*
secondString
;
NSColor
*
o_yellow
=
[
NSColor
yellowColor
];
NSColor
*
o_gray
=
[
NSColor
grayColor
];
NSString
*
firstString
,
*
secondString
;
NSColor
*
pp_color
[
4
]
=
{
o_white
,
o_red
,
o_yellow
,
o_gray
};
NSColor
*
pp_color
[
4
]
=
{
o_white
,
o_red
,
o_yellow
,
o_gray
};
static
const
char
*
ppsz_type
[
4
]
=
{
": "
,
" error: "
,
" warning: "
,
" debug: "
};
static
const
char
*
ppsz_type
[
4
]
=
{
": "
,
" error: "
,
" warning: "
,
" debug: "
};
NSDictionary
*
o_attr
;
NSDictionary
*
o_attr
;
NSMutableAttributedString
*
o_msg_color
;
NSMutableAttributedString
*
o_msg_color
;
[
o_msg_lock
lock
];
[
o_msg_lock
lock
];
if
(
[
o_msg_arr
count
]
+
2
>
600
)
if
(
[
o_msg_arr
count
]
+
2
>
600
)
{
{
[
o_msg_arr
removeObjectAtIndex
:
0
];
[
o_msg_arr
removeObjectAtIndex
:
0
];
[
o_msg_arr
removeObjectAtIndex
:
1
];
[
o_msg_arr
removeObjectAtIndex
:
1
];
}
}
firstString
=
[
NSString
stringWithFormat
:
@"%s%s"
,
item
->
psz_module
,
ppsz_type
[
i_type
]];
firstString
=
[
NSString
stringWithFormat
:
@"%s%s"
,
item
->
psz_module
,
ppsz_type
[
i_type
]];
secondString
=
[
NSString
stringWithFormat
:
@"%@%s
\n
"
,
firstString
,
str
];
secondString
=
[
NSString
stringWithFormat
:
@"%@%s
\n
"
,
firstString
,
str
];
o_attr
=
[
NSDictionary
dictionaryWithObject
:
pp_color
[
i_type
]
forKey
:
NSForegroundColorAttributeName
];
o_attr
=
[
NSDictionary
dictionaryWithObject
:
pp_color
[
i_type
]
forKey
:
NSForegroundColorAttributeName
];
o_msg_color
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
secondString
attributes
:
o_attr
];
o_msg_color
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
secondString
attributes
:
o_attr
];
o_attr
=
[
NSDictionary
dictionaryWithObject
:
pp_color
[
3
]
forKey
:
NSForegroundColorAttributeName
];
o_attr
=
[
NSDictionary
dictionaryWithObject
:
pp_color
[
3
]
forKey
:
NSForegroundColorAttributeName
];
[
o_msg_color
setAttributes
:
o_attr
range
:
NSMakeRange
(
0
,
[
firstString
length
]
)];
[
o_msg_color
setAttributes
:
o_attr
range
:
NSMakeRange
(
0
,
[
firstString
length
]
)];
[
o_msg_arr
addObject
:
[
o_msg_color
autorelease
]];
[
o_msg_arr
addObject
:
[
o_msg_color
autorelease
]];
b_msg_arr_changed
=
YES
;
b_msg_arr_changed
=
YES
;
[
o_msg_lock
unlock
];
[
o_msg_lock
unlock
];
}
}
}
-
(
IBAction
)
saveDebugLog
:(
id
)
sender
-
(
IBAction
)
saveDebugLog
:(
id
)
sender
...
...
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