Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f9c6b4ba
Commit
f9c6b4ba
authored
Aug 30, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevdm: Use mangled short path names for DOSBox.
parent
124cdf91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
winevdm.c
programs/winevdm/winevdm.c
+5
-3
No files found.
programs/winevdm/winevdm.c
View file @
f9c6b4ba
...
...
@@ -154,7 +154,7 @@ static void start_dosbox( const char *appname, const char *args )
const
char
*
config_dir
=
wine_get_config_dir
();
WCHAR
path
[
MAX_PATH
],
config
[
MAX_PATH
];
HANDLE
file
;
char
*
p
,
*
buffer
;
char
*
p
,
*
buffer
,
app
[
MAX_PATH
]
;
int
i
;
int
ret
=
1
;
DWORD
written
,
drives
=
GetLogicalDrives
();
...
...
@@ -164,6 +164,8 @@ static void start_dosbox( const char *appname, const char *args )
if
(
!
GetTempPathW
(
MAX_PATH
,
path
))
return
;
if
(
!
GetTempFileNameW
(
path
,
cfgW
,
0
,
config
))
return
;
if
(
!
GetCurrentDirectoryW
(
MAX_PATH
,
path
))
return
;
if
(
!
GetShortPathNameA
(
appname
,
app
,
MAX_PATH
))
return
;
if
(
!
GetShortPathNameW
(
path
,
path
,
MAX_PATH
))
return
;
file
=
CreateFileW
(
config
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
;
...
...
@@ -171,7 +173,7 @@ static void start_dosbox( const char *appname, const char *args )
sizeof
(
"mount -z c"
)
+
sizeof
(
"config -securemode"
)
+
25
*
(
strlen
(
config_dir
)
+
sizeof
(
"mount c /dosdevices/c:"
))
+
4
*
strlenW
(
path
)
+
6
+
strlen
(
app
name
)
+
strlen
(
args
)
+
20
);
6
+
strlen
(
app
)
+
strlen
(
args
)
+
20
);
p
=
buffer
;
p
+=
sprintf
(
p
,
"[autoexec]
\n
"
);
for
(
i
=
25
;
i
>=
0
;
i
--
)
...
...
@@ -186,7 +188,7 @@ static void start_dosbox( const char *appname, const char *args )
p
+=
sprintf
(
p
,
"%c:
\n
cd "
,
path
[
0
]
);
p
+=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
path
+
2
,
-
1
,
p
,
4
*
strlenW
(
path
),
NULL
,
NULL
)
-
1
;
p
+=
sprintf
(
p
,
"
\n
config -securemode
\n
"
);
p
+=
sprintf
(
p
,
"%s %s
\n
"
,
app
name
,
args
);
p
+=
sprintf
(
p
,
"%s %s
\n
"
,
app
,
args
);
p
+=
sprintf
(
p
,
"exit
\n
"
);
if
(
WriteFile
(
file
,
buffer
,
strlen
(
buffer
),
&
written
,
NULL
)
&&
written
==
strlen
(
buffer
))
{
...
...
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