winevdm: Abstract references to /dosbox.
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2278485d02
commit
689ff9c073
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(winevdm);
|
WINE_DEFAULT_DEBUG_CHANNEL(winevdm);
|
||||||
|
|
||||||
|
#define DOSBOX "dosbox"
|
||||||
|
|
||||||
/*** PIF file structures ***/
|
/*** PIF file structures ***/
|
||||||
#include "pshpack1.h"
|
#include "pshpack1.h"
|
||||||
|
@ -118,7 +119,7 @@ static char *find_dosbox(void)
|
||||||
|
|
||||||
envpath_len = strlen( envpath );
|
envpath_len = strlen( envpath );
|
||||||
path = HeapAlloc( GetProcessHeap(), 0, envpath_len + 1 );
|
path = HeapAlloc( GetProcessHeap(), 0, envpath_len + 1 );
|
||||||
buffer = HeapAlloc( GetProcessHeap(), 0, envpath_len + sizeof("/dosbox") );
|
buffer = HeapAlloc( GetProcessHeap(), 0, envpath_len + strlen(DOSBOX) + 2 );
|
||||||
strcpy( path, envpath );
|
strcpy( path, envpath );
|
||||||
|
|
||||||
p = path;
|
p = path;
|
||||||
|
@ -130,7 +131,7 @@ static char *find_dosbox(void)
|
||||||
while (*p && *p != ':') p++;
|
while (*p && *p != ':') p++;
|
||||||
if (*p == ':') *p++ = 0;
|
if (*p == ':') *p++ = 0;
|
||||||
strcpy( buffer, dir );
|
strcpy( buffer, dir );
|
||||||
strcat( buffer, "/dosbox" );
|
strcat( buffer, "/" DOSBOX );
|
||||||
if (!stat( buffer, &st ))
|
if (!stat( buffer, &st ))
|
||||||
{
|
{
|
||||||
HeapFree( GetProcessHeap(), 0, path );
|
HeapFree( GetProcessHeap(), 0, path );
|
||||||
|
|
Loading…
Reference in New Issue