[vlc-devel] [PATCH 03/12] Determine psz_vlcpath in according to a location of DLL not the executable on OS/2

Jean-Baptiste Kempf jb at videolan.org
Fri Mar 2 16:38:20 CET 2012


Done.

On Fri, Mar 02, 2012 at 11:57:53PM +0900, KO Myung-Hun wrote :
> From: KO Myung-Hun <komh78 at gmail.com>
> 
> Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> (cherry picked from commit 6e37e1988276bcd8e24cd71046ec55172063700b)
> 
> Signed-off-by: KO Myung-Hun <komh at chollian.net>
> ---
>  src/os2/specific.c |   20 +++++++-------------
>  1 files changed, 7 insertions(+), 13 deletions(-)
> 
> diff --git a/src/os2/specific.c b/src/os2/specific.c
> index 7cdb3a3..6d2e61c 100644
> --- a/src/os2/specific.c
> +++ b/src/os2/specific.c
> @@ -32,28 +32,22 @@ extern int _fmode_bin;
>  
>  void system_Init( void )
>  {
> -    PPIB ppib;
> -    CHAR psz_path[ CCHMAXPATH ];
> -    PSZ  psz_dirsep;
> +    HMODULE hmod;
> +    CHAR    psz_path[ CCHMAXPATH ];
> +    PSZ     psz_dirsep;
>  
> -    DosGetInfoBlocks( NULL, &ppib );
> +    DosQueryModFromEIP( &hmod, NULL, 0, NULL, NULL, ( ULONG )system_Init );
> +    DosQueryModuleName( hmod, sizeof( psz_path ), psz_path );
>  
> -    DosQueryModuleName( ppib->pib_hmte, sizeof( psz_path ), psz_path );
> -
> -    /* remove the executable name */
> +    /* remove the DLL name */
>      psz_dirsep = strrchr( psz_path, '\\');
>      if( psz_dirsep )
>          *psz_dirsep = '\0';
>  
> -    /* remove the last directory, i.e, \\bin */
> -    psz_dirsep = strrchr( psz_path, '\\' );
> -    if( psz_dirsep )
> -        *psz_dirsep = '\0';
> -
>      DosEnterCritSec();
>  
>      if( !psz_vlcpath )
> -        asprintf( &psz_vlcpath, "%s\\lib\\vlc", psz_path );
> +        asprintf( &psz_vlcpath, "%s\\vlc", psz_path );
>  
>      DosExitCritSec();
>  
> -- 
> 1.7.3.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

-- 
Best regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list