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
bcc966ad
Commit
bcc966ad
authored
Aug 05, 2012
by
KO Myung-Hun
Committed by
Jean-Baptiste Kempf
Aug 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Support disc drives probing for OS/2
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
80fb36e4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+43
-2
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+1
-1
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
bcc966ad
...
@@ -338,7 +338,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -338,7 +338,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui
.
deviceCombo
->
setToolTip
(
qtr
(
I_DEVICE_TOOLTIP
)
);
ui
.
deviceCombo
->
setToolTip
(
qtr
(
I_DEVICE_TOOLTIP
)
);
ui
.
deviceCombo
->
setInsertPolicy
(
QComboBox
::
InsertAtTop
);
ui
.
deviceCombo
->
setInsertPolicy
(
QComboBox
::
InsertAtTop
);
#if
ndef WIN32
#if
!defined( WIN32 ) && !defined( __OS2__ )
char
const
*
const
ppsz_discdevices
[]
=
{
char
const
*
const
ppsz_discdevices
[]
=
{
"sr*"
,
"sr*"
,
"sg*"
,
"sg*"
,
...
@@ -404,6 +404,47 @@ void DiscOpenPanel::onFocus()
...
@@ -404,6 +404,47 @@ void DiscOpenPanel::onFocus()
SetErrorMode
(
oldMode
);
SetErrorMode
(
oldMode
);
}
}
}
}
#elif defined( __OS2__ )
/* Disc drives probing for OS/2 */
void
DiscOpenPanel
::
onFocus
()
{
ui
.
deviceCombo
->
clear
();
#define IOCTL_CDROMDISK2 0x82
#define CDROMDISK2_DRIVELETTERS 0x60
HFILE
hcd2
;
ULONG
ulAction
;
ULONG
ulParamLen
;
ULONG
ulData
;
ULONG
ulDataLen
;
if
(
DosOpen
((
PSZ
)
"CD-ROM2$"
,
(
PHFILE
)
&
hcd2
,
&
ulAction
,
0
,
FILE_NORMAL
,
OPEN_ACTION_OPEN_IF_EXISTS
|
OPEN_ACTION_FAIL_IF_NEW
,
OPEN_ACCESS_READONLY
|
OPEN_SHARE_DENYNONE
,
NULL
))
return
;
if
(
!
DosDevIOCtl
(
hcd2
,
IOCTL_CDROMDISK2
,
CDROMDISK2_DRIVELETTERS
,
NULL
,
0
,
&
ulParamLen
,
&
ulData
,
sizeof
(
ulData
),
&
ulDataLen
))
{
char
szDriveName
[]
=
"X:
\\
"
;
int
count
=
LOUSHORT
(
ulData
);
int
drive
=
HIUSHORT
(
ulData
);
for
(
;
count
;
--
count
,
++
drive
)
{
szDriveName
[
0
]
=
'A'
+
drive
;
QString
name
=
qfu
(
szDriveName
);
ui
.
deviceCombo
->
addItem
(
name
,
name
);
}
}
DosClose
(
hcd2
);
}
#endif
#endif
DiscOpenPanel
::~
DiscOpenPanel
()
DiscOpenPanel
::~
DiscOpenPanel
()
...
@@ -422,7 +463,7 @@ void DiscOpenPanel::clear()
...
@@ -422,7 +463,7 @@ void DiscOpenPanel::clear()
m_discType
=
None
;
m_discType
=
None
;
}
}
#if
def WIN32
#if
defined( WIN32 ) || defined( __OS2__ )
#define setDrive( psz_name ) {\
#define setDrive( psz_name ) {\
int index = ui.deviceCombo->findText( qfu( psz_name ) ); \
int index = ui.deviceCombo->findText( qfu( psz_name ) ); \
if( index != -1 ) ui.deviceCombo->setCurrentIndex( index );}
if( index != -1 ) ui.deviceCombo->setCurrentIndex( index );}
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
bcc966ad
...
@@ -174,7 +174,7 @@ public:
...
@@ -174,7 +174,7 @@ public:
virtual
~
DiscOpenPanel
();
virtual
~
DiscOpenPanel
();
virtual
void
clear
()
;
virtual
void
clear
()
;
virtual
void
accept
()
;
virtual
void
accept
()
;
#if
def WIN32
#if
defined( WIN32 ) || defined( __OS2__ )
virtual
void
onFocus
();
virtual
void
onFocus
();
#endif
#endif
private:
private:
...
...
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