winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
1278 discussions
Start a n
N
ew thread
Alexandre Julliard : wineprefixcreate: Use wineboot --update to run wine. inf.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: bab67d39482b473031a483b7847b8b7bac312aab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bab67d39482b473031a483b78…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 21 15:47:47 2008 +0200 wineprefixcreate: Use wineboot --update to run wine.inf. --- tools/wineprefixcreate.in | 35 ++--------------------------------- 1 files changed, 2 insertions(+), 33 deletions(-) diff --git a/tools/wineprefixcreate.in b/tools/wineprefixcreate.in index 7eed546..e06f8b6 100644 --- a/tools/wineprefixcreate.in +++ b/tools/wineprefixcreate.in @@ -59,7 +59,6 @@ esac bindir=`cd "$bindir" && pwd` dlldir="$bindir/@bintodlldir@" -datadir="$bindir/@bintodatadir@" do_wait=0 quiet=0 @@ -79,7 +78,6 @@ then LD_LIBRARY_PATH="$topdir/libs/wine" fi export LD_LIBRARY_PATH - datadir="$topdir/tools" fi while [ $# -gt 0 ] @@ -122,33 +120,9 @@ else fi WINEPREFIX=`cd "$WINEPREFIX" && pwd` - -# Create the drive symlinks - -if [ ! -d "$WINEPREFIX/dosdevices" ] -then - mkdir "$WINEPREFIX/dosdevices" - [ -d "$WINEPREFIX/drive_c" ] || mkdir "$WINEPREFIX/drive_c" - ln -s "../drive_c" "$WINEPREFIX/dosdevices/c:" - ln -s "/" "$WINEPREFIX/dosdevices/z:" -fi - -CROOT="$WINEPREFIX/dosdevices/c:" - -# Create the directory tree - -for i in \ - "$CROOT/windows" \ - "$CROOT/windows/inf" -do - [ -d "$i" ] || mkdir "$i" -done - -# Copy the .inf script and run it - -cp "$datadir/wine.inf" "$CROOT/windows/inf/wine.inf" export WINEPREFIX -"${WINELOADER:-$bindir/wine}" rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 wine.inf + +"${WINELOADER:-$bindir/wine}" wineboot.exe --update # Wait for the wineserver to finish @@ -156,8 +130,3 @@ if [ $do_wait = 1 ] then "${WINESERVER:-$bindir/wineserver}" -w fi - -if [ $quiet = 0 ] -then - echo "$WINEPREFIX updated successfully." -fi
1
0
0
0
Alexandre Julliard : wineboot: Automatically update the prefix directory if wine.inf changes.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: e44dd0f8f2bdcbb113036339479ef3a66364972e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e44dd0f8f2bdcbb1130363394…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 21 15:39:55 2008 +0200 wineboot: Automatically update the prefix directory if wine.inf changes. --- dlls/ntdll/server.c | 31 +----------------------- programs/wineboot/wineboot.c | 54 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index c38a023..3d8beee 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -737,7 +737,6 @@ static void start_server(void) static void setup_config_dir(void) { const char *p, *config_dir = wine_get_config_dir(); - pid_t pid, wret; if (chdir( config_dir ) == -1) { @@ -759,7 +758,7 @@ static void setup_config_dir(void) mkdir( config_dir, 0777 ); if (chdir( config_dir ) == -1) fatal_perror( "chdir to %s\n", config_dir ); - MESSAGE( "wine: creating configuration directory '%s'...\n", config_dir ); + MESSAGE( "wine: created the configuration directory '%s'\n", config_dir ); } if (mkdir( "dosdevices", 0777 ) == -1) @@ -773,34 +772,6 @@ static void setup_config_dir(void) mkdir( "drive_c", 0777 ); symlink( "../drive_c", "dosdevices/c:" ); symlink( "/", "dosdevices/z:" ); - - pid = fork(); - if (pid == -1) fatal_perror( "fork" ); - - if (!pid) - { - char *argv[3]; - static char argv0[] = "tools/wineprefixcreate", - argv1[] = "--quiet"; - - argv[0] = argv0; - argv[1] = argv1; - argv[2] = NULL; - wine_exec_wine_binary( argv[0], argv, NULL ); - fatal_perror( "could not exec wineprefixcreate" ); - } - else - { - int status; - - while ((wret = waitpid( pid, &status, 0 )) != pid) - { - if (wret == -1 && errno != EINTR) fatal_perror( "wait4" ); - } - if (!WIFEXITED(status) || WEXITSTATUS(status)) - fatal_error( "wineprefixcreate failed while creating '%s'.\n", config_dir ); - } - MESSAGE( "wine: '%s' created successfully.\n", config_dir ); } diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index bf1632b..a682e65 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -58,6 +58,7 @@ #define WIN32_LEAN_AND_MEAN #include <errno.h> +#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #ifdef HAVE_GETOPT_H @@ -113,6 +114,49 @@ static char *get_wine_inf_path(void) return name; } +/* update the timestamp if different from the reference time */ +static BOOL update_timestamp( const char *config_dir, unsigned long timestamp, int force ) +{ + BOOL ret = FALSE; + int fd, count; + char buffer[100]; + char *file = HeapAlloc( GetProcessHeap(), 0, strlen(config_dir) + sizeof("/.update-timestamp") ); + + if (!file) return FALSE; + strcpy( file, config_dir ); + strcat( file, "/.update-timestamp" ); + + if ((fd = open( file, O_RDWR )) != -1) + { + if ((count = read( fd, buffer, sizeof(buffer) - 1 )) >= 0) + { + buffer[count] = 0; + if (!strncmp( buffer, "disable", sizeof("disable")-1 )) goto done; + if (!force && timestamp == strtoul( buffer, NULL, 10 )) goto done; + } + lseek( fd, 0, SEEK_SET ); + ftruncate( fd, 0 ); + } + else + { + if (errno != ENOENT) goto done; + if ((fd = open( file, O_WRONLY | O_CREAT | O_TRUNC, 0666 )) == -1) goto done; + } + + count = sprintf( buffer, "%lu\n", timestamp ); + if (write( fd, buffer, count ) != count) + { + WINE_WARN( "failed to update timestamp in %s\n", file ); + ftruncate( fd, 0 ); + } + else ret = TRUE; + +done: + if (fd != -1) close( fd ); + HeapFree( GetProcessHeap(), 0, file ); + return ret; +} + /* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. * Returns FALSE if there was an error, or otherwise if all is ok. */ @@ -617,7 +661,7 @@ static BOOL start_services_process(void) } /* execute rundll32 on the wine.inf file if necessary */ -static void update_wineprefix(void) +static void update_wineprefix( int force ) { static const WCHAR cmdlineW[] = {'D','e','f','a','u','l','t','I','n','s','t','a','l','l',' ', '1','2','8',' ','\\','\\','?','\\','u','n','i','x' }; @@ -632,8 +676,12 @@ static void update_wineprefix(void) return; } if (stat( inf_path, &st ) == -1) + { WINE_WARN( "cannot stat wine.inf file: %s\n", strerror(errno) ); - else + goto done; + } + + if (update_timestamp( config_dir, st.st_mtime, force )) { WCHAR *buffer; DWORD len = MultiByteToWideChar( CP_UNIXCP, 0, inf_path, -1, NULL, 0 ); @@ -823,7 +871,7 @@ int main( int argc, char *argv[] ) ProcessRunKeys( HKEY_LOCAL_MACHINE, runkeys_names[RUNKEY_RUNSERVICES], FALSE, FALSE ); start_services_process(); } - if (update) update_wineprefix(); + if (init || update) update_wineprefix( update ); ProcessRunKeys( HKEY_LOCAL_MACHINE, runkeys_names[RUNKEY_RUNONCE], TRUE, TRUE );
1
0
0
0
Alexandre Julliard : wineboot: Add an option to update the prefix directory by re-executing wine.inf.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 935313abe3c41b6f383257ee7eafd059325c58b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=935313abe3c41b6f383257ee7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 17 21:07:10 2008 +0200 wineboot: Add an option to update the prefix directory by re-executing wine.inf. --- programs/wineboot/Makefile.in | 2 +- programs/wineboot/wineboot.c | 78 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in index a9db582..adee3a4 100644 --- a/programs/wineboot/Makefile.in +++ b/programs/wineboot/Makefile.in @@ -5,7 +5,7 @@ VPATH = @srcdir@ MODULE = wineboot.exe APPMODE = -mconsole IMPORTS = advapi32 kernel32 ntdll -DELAYIMPORTS = shell32 shlwapi version user32 +DELAYIMPORTS = setupapi shell32 shlwapi version user32 EXTRALIBS = -luuid C_SRCS = \ diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 360169c..bf1632b 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -57,19 +57,29 @@ #define COBJMACROS #define WIN32_LEAN_AND_MEAN +#include <errno.h> #include <stdio.h> +#include <stdlib.h> #ifdef HAVE_GETOPT_H # include <getopt.h> #endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif #include <windows.h> #include <wine/svcctl.h> #include <wine/unicode.h> +#include <wine/library.h> #include <wine/debug.h> #include <shlobj.h> #include <shobjidl.h> #include <shlwapi.h> #include <shellapi.h> +#include <setupapi.h> WINE_DEFAULT_DEBUG_CHANNEL(wineboot); @@ -80,6 +90,29 @@ extern void kill_processes( BOOL kill_desktop ); static WCHAR windowsdir[MAX_PATH]; +/* retrieve the (unix) path to the wine.inf file */ +static char *get_wine_inf_path(void) +{ + const char *build_dir, *data_dir; + char *name = NULL; + + if ((data_dir = wine_get_data_dir())) + { + if (!(name = HeapAlloc( GetProcessHeap(), 0, strlen(data_dir) + sizeof("/wine.inf") ))) + return NULL; + strcpy( name, data_dir ); + strcat( name, "/wine.inf" ); + } + else if ((build_dir = wine_get_build_dir())) + { + if (!(name = HeapAlloc( GetProcessHeap(), 0, strlen(build_dir) + sizeof("/tools/wine.inf") ))) + return NULL; + strcpy( name, build_dir ); + strcat( name, "/tools/wine.inf" ); + } + return name; +} + /* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. * Returns FALSE if there was an error, or otherwise if all is ok. */ @@ -583,6 +616,40 @@ static BOOL start_services_process(void) return TRUE; } +/* execute rundll32 on the wine.inf file if necessary */ +static void update_wineprefix(void) +{ + static const WCHAR cmdlineW[] = {'D','e','f','a','u','l','t','I','n','s','t','a','l','l',' ', + '1','2','8',' ','\\','\\','?','\\','u','n','i','x' }; + + const char *config_dir = wine_get_config_dir(); + char *inf_path = get_wine_inf_path(); + struct stat st; + + if (!inf_path) + { + WINE_WARN( "cannot find path to wine.inf file\n" ); + return; + } + if (stat( inf_path, &st ) == -1) + WINE_WARN( "cannot stat wine.inf file: %s\n", strerror(errno) ); + else + { + WCHAR *buffer; + DWORD len = MultiByteToWideChar( CP_UNIXCP, 0, inf_path, -1, NULL, 0 ); + if (!(buffer = HeapAlloc( GetProcessHeap(), 0, sizeof(cmdlineW) + len*sizeof(WCHAR) ))) goto done; + memcpy( buffer, cmdlineW, sizeof(cmdlineW) ); + MultiByteToWideChar( CP_UNIXCP, 0, inf_path, -1, buffer + sizeof(cmdlineW)/sizeof(WCHAR), len ); + + InstallHinfSectionW( 0, 0, buffer, 0 ); + HeapFree( GetProcessHeap(), 0, buffer ); + WINE_MESSAGE( "wine: configuration in '%s' has been updated.\n", config_dir ); + } + +done: + HeapFree( GetProcessHeap(), 0, inf_path ); +} + /* Process items in the StartUp group of the user's Programs under the Start Menu. Some installers put * shell links here to restart themselves after boot. */ static BOOL ProcessStartupItems(void) @@ -680,6 +747,7 @@ static void usage(void) WINE_MESSAGE( " -k,--kill Kill running processes without any cleanup\n" ); WINE_MESSAGE( " -r,--restart Restart only, don't do normal startup operations\n" ); WINE_MESSAGE( " -s,--shutdown Shutdown only, don't reboot\n" ); + WINE_MESSAGE( " -u,--update Update the wineprefix directory\n" ); } static const char short_options[] = "efhikrs"; @@ -693,6 +761,7 @@ static const struct option long_options[] = { "kill", 0, 0, 'k' }, { "restart", 0, 0, 'r' }, { "shutdown", 0, 0, 's' }, + { "update", 0, 0, 'u' }, { NULL, 0, 0, 0 } }; @@ -703,16 +772,13 @@ int main( int argc, char *argv[] ) /* First, set the current directory to SystemRoot */ int optc; - int end_session = 0, force = 0, init = 0, kill = 0, restart = 0, shutdown = 0; + int end_session = 0, force = 0, init = 0, kill = 0, restart = 0, shutdown = 0, update = 0; HANDLE event; SECURITY_ATTRIBUTES sa; GetWindowsDirectoryW( windowsdir, MAX_PATH ); if( !SetCurrentDirectoryW( windowsdir ) ) - { WINE_ERR("Cannot set the dir to %s (%d)\n", wine_dbgstr_w(windowsdir), GetLastError() ); - return 100; - } while ((optc = getopt_long(argc, argv, short_options, long_options, NULL )) != -1) { @@ -724,6 +790,7 @@ int main( int argc, char *argv[] ) case 'k': kill = 1; break; case 'r': restart = 1; break; case 's': shutdown = 1; break; + case 'u': update = 1; break; case 'h': usage(); return 0; case '?': usage(); return 1; } @@ -750,11 +817,14 @@ int main( int argc, char *argv[] ) ProcessWindowsFileProtection(); ProcessRunKeys( HKEY_LOCAL_MACHINE, runkeys_names[RUNKEY_RUNSERVICESONCE], TRUE, FALSE ); + if (init || (kill && !restart)) { ProcessRunKeys( HKEY_LOCAL_MACHINE, runkeys_names[RUNKEY_RUNSERVICES], FALSE, FALSE ); start_services_process(); } + if (update) update_wineprefix(); + ProcessRunKeys( HKEY_LOCAL_MACHINE, runkeys_names[RUNKEY_RUNONCE], TRUE, TRUE ); if (!init && !restart)
1
0
0
0
Alexandre Julliard : ntdll: Automatically setup the dosdevices directory if it doesn't exist.
by Alexandre Julliard
22 Apr '08
22 Apr '08
Module: wine Branch: master Commit: 870bba3ee17e9f1a65fc4e97197adf5948d7b9cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=870bba3ee17e9f1a65fc4e971…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 21 14:55:32 2008 +0200 ntdll: Automatically setup the dosdevices directory if it doesn't exist. --- dlls/ntdll/server.c | 152 +++++++++++++++++++++++++++------------------------ 1 files changed, 81 insertions(+), 71 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index c5146e2..c38a023 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -730,6 +730,81 @@ static void start_server(void) /*********************************************************************** + * setup_config_dir + * + * Setup the wine configuration dir. + */ +static void setup_config_dir(void) +{ + const char *p, *config_dir = wine_get_config_dir(); + pid_t pid, wret; + + if (chdir( config_dir ) == -1) + { + if (errno != ENOENT) fatal_perror( "chdir to %s\n", config_dir ); + + if ((p = strrchr( config_dir, '/' )) && p != config_dir) + { + struct stat st; + char *tmp_dir; + + if (!(tmp_dir = malloc( p + 1 - config_dir ))) fatal_error( "out of memory\n" ); + memcpy( tmp_dir, config_dir, p - config_dir ); + tmp_dir[p - config_dir] = 0; + if (!stat( tmp_dir, &st ) && st.st_uid != getuid()) + fatal_error( "'%s' is not owned by you, refusing to create a configuration directory there\n", + tmp_dir ); + free( tmp_dir ); + } + + mkdir( config_dir, 0777 ); + if (chdir( config_dir ) == -1) fatal_perror( "chdir to %s\n", config_dir ); + MESSAGE( "wine: creating configuration directory '%s'...\n", config_dir ); + } + + if (mkdir( "dosdevices", 0777 ) == -1) + { + if (errno == EEXIST) return; + fatal_perror( "cannot create %s/dosdevices\n", config_dir ); + } + + /* create the drive symlinks */ + + mkdir( "drive_c", 0777 ); + symlink( "../drive_c", "dosdevices/c:" ); + symlink( "/", "dosdevices/z:" ); + + pid = fork(); + if (pid == -1) fatal_perror( "fork" ); + + if (!pid) + { + char *argv[3]; + static char argv0[] = "tools/wineprefixcreate", + argv1[] = "--quiet"; + + argv[0] = argv0; + argv[1] = argv1; + argv[2] = NULL; + wine_exec_wine_binary( argv[0], argv, NULL ); + fatal_perror( "could not exec wineprefixcreate" ); + } + else + { + int status; + + while ((wret = waitpid( pid, &status, 0 )) != pid) + { + if (wret == -1 && errno != EINTR) fatal_perror( "wait4" ); + } + if (!WIFEXITED(status) || WEXITSTATUS(status)) + fatal_error( "wineprefixcreate failed while creating '%s'.\n", config_dir ); + } + MESSAGE( "wine: '%s' created successfully.\n", config_dir ); +} + + +/*********************************************************************** * server_connect_error * * Try to display a meaningful explanation of why we couldn't connect @@ -768,8 +843,9 @@ static void server_connect_error( const char *serverdir ) * Attempt to connect to an existing server socket. * We need to be in the server directory already. */ -static int server_connect( const char *serverdir ) +static int server_connect(void) { + const char *serverdir; struct sockaddr_un addr; struct stat st; int s, slen, retry, fd_cwd; @@ -778,6 +854,9 @@ static int server_connect( const char *serverdir ) fd_cwd = open( ".", O_RDONLY ); if (fd_cwd != -1) fcntl( fd_cwd, F_SETFD, 1 ); /* set close on exec flag */ + setup_config_dir(); + serverdir = wine_get_server_dir(); + /* chdir to the server directory */ if (chdir( serverdir ) == -1) { @@ -838,63 +917,6 @@ static int server_connect( const char *serverdir ) } -/*********************************************************************** - * create_config_dir - * - * Create the wine configuration dir (~/.wine). - */ -static void create_config_dir(void) -{ - const char *p, *config_dir = wine_get_config_dir(); - pid_t pid, wret; - - if ((p = strrchr( config_dir, '/' )) && p != config_dir) - { - struct stat st; - char *tmp_dir; - - if (!(tmp_dir = malloc( p + 1 - config_dir ))) fatal_error( "out of memory\n" ); - memcpy( tmp_dir, config_dir, p - config_dir ); - tmp_dir[p - config_dir] = 0; - if (!stat( tmp_dir, &st ) && st.st_uid != getuid()) - fatal_error( "'%s' is not owned by you, refusing to create a configuration directory there\n", - tmp_dir ); - free( tmp_dir ); - } - if (mkdir( config_dir, 0777 ) == -1 && errno != EEXIST) - fatal_perror( "cannot create directory %s", config_dir ); - - MESSAGE( "wine: creating configuration directory '%s'...\n", config_dir ); - pid = fork(); - if (pid == -1) fatal_perror( "fork" ); - - if (!pid) - { - char *argv[3]; - static char argv0[] = "tools/wineprefixcreate", - argv1[] = "--quiet"; - - argv[0] = argv0; - argv[1] = argv1; - argv[2] = NULL; - wine_exec_wine_binary( argv[0], argv, NULL ); - fatal_perror( "could not exec wineprefixcreate" ); - } - else - { - int status; - - while ((wret = waitpid( pid, &status, 0 )) != pid) - { - if (wret == -1 && errno != EINTR) fatal_perror( "wait4" ); - } - if (!WIFEXITED(status) || WEXITSTATUS(status)) - fatal_error( "wineprefixcreate failed while creating '%s'.\n", config_dir ); - } - MESSAGE( "wine: '%s' created successfully.\n", config_dir ); -} - - #ifdef __APPLE__ #include <mach/mach.h> #include <mach/mach_error.h> @@ -955,19 +977,7 @@ void server_init_process(void) fatal_perror( "Bad server socket %d", fd_socket ); unsetenv( "WINESERVERSOCKET" ); } - else - { - const char *server_dir = wine_get_server_dir(); - - if (!server_dir) /* this means the config dir doesn't exist */ - { - create_config_dir(); - server_dir = wine_get_server_dir(); - } - - /* connect to the server */ - fd_socket = server_connect( server_dir ); - } + else fd_socket = server_connect(); /* setup the signal mask */ sigemptyset( &server_block_set );
1
0
0
0
Alexander Dorofeyev : wined3d: Prevent console spamming in drawPrimitive.
by Alexandre Julliard
21 Apr '08
21 Apr '08
Module: wine Branch: master Commit: 35979b920a4ba395cea52fe4c4bac581b0b10f97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35979b920a4ba395cea52fe4c…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv> Date: Sat Apr 19 00:42:03 2008 +0300 wined3d: Prevent console spamming in drawPrimitive. --- dlls/wined3d/drawprim.c | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 77b396a..559159d 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -1062,14 +1062,26 @@ void drawPrimitive(IWineD3DDevice *iface, if(!use_vs(This)) { if(!This->strided_streams.u.s.position_transformed && This->activeContext->num_untracked_materials && This->stateBlock->renderState[WINED3DRS_LIGHTING]) { - FIXME("Using software emulation because not all material properties could be tracked\n"); + static BOOL first = TRUE; + if(first) { + FIXME("Using software emulation because not all material properties could be tracked\n"); + first = FALSE; + } else { + TRACE("Using software emulation because not all material properties could be tracked\n"); + } emulation = TRUE; } else if(This->activeContext->fog_coord && This->stateBlock->renderState[WINED3DRS_FOGENABLE]) { /* Either write a pipeline replacement shader or convert the specular alpha from unsigned byte * to a float in the vertex buffer */ - FIXME("Using software emulation because manual fog coordinates are provided\n"); + static BOOL first = TRUE; + if(first) { + FIXME("Using software emulation because manual fog coordinates are provided\n"); + first = FALSE; + } else { + TRACE("Using software emulation because manual fog coordinates are provided\n"); + } emulation = TRUE; } @@ -1083,7 +1095,13 @@ void drawPrimitive(IWineD3DDevice *iface, if (This->useDrawStridedSlow || emulation) { /* Immediate mode drawing */ if(use_vs(This)) { - FIXME("Using immediate mode with vertex shaders for half float emulation\n"); + static BOOL first = TRUE; + if(first) { + FIXME("Using immediate mode with vertex shaders for half float emulation\n"); + first = FALSE; + } else { + TRACE("Using immediate mode with vertex shaders for half float emulation\n"); + } drawStridedSlowVs(iface, strided, calculatedNumberOfindices, glPrimType, idxData, idxSize, minIndex, StartIdx, StartVertexIndex); } else {
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipVectorTransformMatrixPointsI.
by Alexandre Julliard
21 Apr '08
21 Apr '08
Module: wine Branch: master Commit: f649c9d2244c5dafc5f0512ebeed12a8d38955bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f649c9d2244c5dafc5f0512eb…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Apr 19 01:28:47 2008 +0400 gdiplus: Implemented GdipVectorTransformMatrixPointsI. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 27 +++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 29 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index f2426b1..d6971f9 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -620,7 +620,7 @@ @ stub GdipTranslateTextureTransform @ stdcall GdipTranslateWorldTransform(ptr long long long) @ stdcall GdipVectorTransformMatrixPoints(ptr ptr long) -@ stub GdipVectorTransformMatrixPointsI +@ stdcall GdipVectorTransformMatrixPointsI(ptr ptr long) @ stub GdipWarpPath @ stub GdipWidenPath @ stub GdipWindingModeOutline diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index a40f690..e80031f 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -301,3 +301,30 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF * return Ok; } + +GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, INT count) +{ + GpPointF *ptsF; + GpStatus ret; + INT i; + + ptsF = GdipAlloc(sizeof(GpPointF) * count); + if(!ptsF) + return OutOfMemory; + + for(i = 0; i < count; i++){ + ptsF[i].X = (REAL)pts[i].X; + ptsF[i].Y = (REAL)pts[i].Y; + } + + ret = GdipVectorTransformMatrixPoints(matrix, ptsF, count); + /* store back */ + if(ret == Ok) + for(i = 0; i < count; i++){ + pts[i].X = roundr(ptsF[i].X); + pts[i].Y = roundr(ptsF[i].Y); + } + GdipFree(ptsF); + + return ret; +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 215864a..a8f6568 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -230,6 +230,7 @@ GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT); GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix*,GpPointF*,INT); +GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix*,GpPoint*,INT); GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);
1
0
0
0
Stefan Leichter : shell32: Implement SHGetFolderPathAndSubDirA/W.
by Alexandre Julliard
21 Apr '08
21 Apr '08
Module: wine Branch: master Commit: a629a4199e388dbab941a38914ff6106b02e420a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a629a4199e388dbab941a3891…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Thu Apr 17 23:31:05 2008 +0200 shell32: Implement SHGetFolderPathAndSubDirA/W. --- dlls/shell32/shell32.spec | 2 + dlls/shell32/shellpath.c | 86 ++++++++++++++++++++++++++++++++++++++++++-- include/shlobj.h | 3 ++ 3 files changed, 87 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index 6c0d7d8..e054db3 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -344,6 +344,8 @@ @ stdcall SHGetFileInfoW(ptr long ptr long long) @ stdcall SHGetFolderLocation(long long long long ptr) @ stdcall SHGetFolderPathA(long long long long ptr) +@ stdcall SHGetFolderPathAndSubDirA(long long long long str ptr) +@ stdcall SHGetFolderPathAndSubDirW(long long long long wstr ptr) @ stdcall SHGetFolderPathW(long long long long ptr) @ stub SHGetFreeDiskSpace @ stub SHGetIconOverlayIndexA diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index c4ae688..abbaf19 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -1675,21 +1675,88 @@ HRESULT WINAPI SHGetFolderPathW( DWORD dwFlags, /* [I] which path to return */ LPWSTR pszPath) /* [O] converted path */ { + HRESULT hr = SHGetFolderPathAndSubDirW(hwndOwner, nFolder, hToken, dwFlags, NULL, pszPath); + if(HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr) + hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + return hr; +} + +HRESULT WINAPI SHGetFolderPathAndSubDirA( + HWND hwndOwner, /* [I] owner window */ + int nFolder, /* [I] CSIDL identifying the folder */ + HANDLE hToken, /* [I] access token */ + DWORD dwFlags, /* [I] which path to return */ + LPCSTR pszSubPath, /* [I] sub directory of the specified folder */ + LPSTR pszPath) /* [O] converted path */ +{ + int length; + HRESULT hr = S_OK; + LPWSTR pszSubPathW = NULL; + LPWSTR pszPathW = NULL; + TRACE("%08x,%08x,%s\n",nFolder, dwFlags, debugstr_w(pszSubPathW)); + + if(pszPath) { + pszPathW = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + if(!pszPathW) { + hr = HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY); + WARN("Failed to allocate %u bytes of memory\n", MAX_PATH * sizeof(WCHAR)); + goto cleanup; + } + } + TRACE("%08x,%08x,%s\n",nFolder, dwFlags, debugstr_w(pszSubPathW)); + + /* SHGetFolderPathAndSubDirW does not distinguish if pszSubPath isn't + * set (null), or an empty string.therefore call it without the parameter set + * if pszSubPath is an empty string + */ + if (pszSubPath && pszSubPath[0]) { + length = MultiByteToWideChar(CP_ACP, 0, pszSubPath, -1, NULL, 0); + pszSubPathW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR)); + if(!pszSubPathW) { + hr = HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY); + WARN("Failed to allocate %u bytes of memory\n", length * sizeof(WCHAR)); + goto cleanup; + } + MultiByteToWideChar(CP_ACP, 0, pszSubPath, -1, pszSubPathW, length); + } + + hr = SHGetFolderPathAndSubDirW(hwndOwner, nFolder, hToken, dwFlags, pszSubPathW, pszPathW); + + if (SUCCEEDED(hr) && pszPath) + WideCharToMultiByte(CP_ACP, 0, pszPathW, -1, pszPath, MAX_PATH, NULL, NULL); + +cleanup: + HeapFree(GetProcessHeap(), 0, pszPathW); + HeapFree(GetProcessHeap(), 0, pszSubPathW); + return hr; +} + +HRESULT WINAPI SHGetFolderPathAndSubDirW( + HWND hwndOwner, /* [I] owner window */ + int nFolder, /* [I] CSIDL identifying the folder */ + HANDLE hToken, /* [I] access token */ + DWORD dwFlags, /* [I] which path to return */ + LPCWSTR pszSubPath,/* [I] sub directory of the specified folder */ + LPWSTR pszPath) /* [O] converted path */ +{ HRESULT hr; WCHAR szBuildPath[MAX_PATH], szTemp[MAX_PATH]; DWORD folder = nFolder & CSIDL_FOLDER_MASK; CSIDL_Type type; int ret; - TRACE("%p,%p,nFolder=0x%04x\n", hwndOwner,pszPath,nFolder); + TRACE("%p,%p,nFolder=0x%04x,%s\n", hwndOwner,pszPath,nFolder,debugstr_w(pszSubPath)); /* Windows always NULL-terminates the resulting path regardless of success * or failure, so do so first */ if (pszPath) *pszPath = '\0'; + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) return E_INVALIDARG; + if ((SHGFP_TYPE_CURRENT != dwFlags) && (SHGFP_TYPE_DEFAULT != dwFlags)) + return E_INVALIDARG; szTemp[0] = 0; type = CSIDL_Data[folder].type; switch (type) @@ -1742,12 +1809,23 @@ HRESULT WINAPI SHGetFolderPathW( hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath); else strcpyW(szBuildPath, szTemp); + + if (FAILED(hr)) goto end; + + if(pszSubPath) { + /* make sure the new path does not exceed th bufferlength + * rememebr to backslash and the termination */ + if(MAX_PATH < (lstrlenW(szBuildPath) + lstrlenW(pszSubPath) + 2)) { + hr = HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE); + goto end; + } + PathAppendW(szBuildPath, pszSubPath); + PathRemoveBackslashW(szBuildPath); + } /* Copy the path if it's available before we might return */ if (SUCCEEDED(hr) && pszPath) strcpyW(pszPath, szBuildPath); - if (FAILED(hr)) goto end; - /* if we don't care about existing directories we are ready */ if(nFolder & CSIDL_FLAG_DONT_VERIFY) goto end; @@ -1758,7 +1836,7 @@ HRESULT WINAPI SHGetFolderPathW( */ if (!(nFolder & CSIDL_FLAG_CREATE)) { - hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + hr = HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); goto end; } diff --git a/include/shlobj.h b/include/shlobj.h index 8dbccb7..159e85a 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -54,6 +54,9 @@ DWORD WINAPI SHFormatDrive(HWND,UINT,UINT,UINT); void WINAPI SHFree(LPVOID); BOOL WINAPI GetFileNameFromBrowse(HWND,LPSTR,DWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR); HRESULT WINAPI SHGetInstanceExplorer(IUnknown**); +HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR); +HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR); +#define SHGetFolderPathAndSubDir WINELIB_NAME_AW(SHGetFolderPathAndSubDir); BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR); BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR); #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
1
0
0
0
Maarten Lankhorst : quartz: Change longlong printfs.
by Alexandre Julliard
21 Apr '08
21 Apr '08
Module: wine Branch: master Commit: 810a933f68fe458b19f7734794206151e4c3b38e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=810a933f68fe458b19f773479…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 18 22:23:19 2008 -0700 quartz: Change longlong printfs. --- dlls/quartz/dsoundrender.c | 4 +++- dlls/quartz/filtergraph.c | 3 ++- dlls/quartz/waveparser.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 9bcb417..4a90bb3 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -263,7 +263,9 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) ERR("Cannot get sample time (%x)\n", hr); if (This->rtLastStop != tStart && (IMediaSample_IsDiscontinuity(pSample) == S_FALSE)) - FIXME("Unexpected discontinuity: Last: %lld, tStart: %lld\n", This->rtLastStop, tStart); + FIXME("Unexpected discontinuity: Last: %u.%03u, tStart: %u.%03u\n", + (DWORD)(This->rtLastStop / 10000000), (DWORD)((This->rtLastStop / 10000)%1000), + (DWORD)(tStart / 10000000), (DWORD)((tStart / 10000)%1000)); This->rtLastStop = tStop; if (IMediaSample_IsPreroll(pSample) == S_OK) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index ee31068..c4b31f7 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2079,7 +2079,8 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, else *pCurrent = This->position; LeaveCriticalSection(&This->cs); - TRACE("Time: %lld.%03lld\n", *pCurrent / 10000000, (*pCurrent / 10000)%1000); + + TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent / 10000)%1000)); return S_OK; } diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 5aef9ef..8f51c8f 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -393,7 +393,7 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) pWAVEParser->Parser.mediaSeeking.llCurrent = 0; pWAVEParser->Parser.mediaSeeking.llStop = pWAVEParser->Parser.mediaSeeking.llDuration = bytepos_to_duration(pWAVEParser, pWAVEParser->EndOfFile); - TRACE("Duration: %lld seconds\n", pWAVEParser->Parser.mediaSeeking.llDuration / (LONGLONG)10000000); + TRACE("Duration: %u seconds\n", (DWORD)(pWAVEParser->Parser.mediaSeeking.llDuration / (LONGLONG)10000000)); This->rtStop = pWAVEParser->EndOfFile; This->rtStart = pWAVEParser->StartOfFile;
1
0
0
0
Maarten Lankhorst : quartz: Only drop Preroll samples after obtaining its time.
by Alexandre Julliard
21 Apr '08
21 Apr '08
Module: wine Branch: master Commit: 9d9bf6f158cd8e9a734fddb311f3aee30ba4d486 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d9bf6f158cd8e9a734fddb31…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 18 22:04:55 2008 -0700 quartz: Only drop Preroll samples after obtaining its time. --- dlls/quartz/dsoundrender.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 963ec16..9bcb417 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -245,12 +245,6 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) * pause completion here, but for sound playing a single frame doesn't make sense */ - if (IMediaSample_IsPreroll(pSample) == S_OK) - { - TRACE("Preroll!\n"); - return S_OK; - } - if (This->state == State_Paused) return S_FALSE; @@ -272,6 +266,12 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) FIXME("Unexpected discontinuity: Last: %lld, tStart: %lld\n", This->rtLastStop, tStart); This->rtLastStop = tStop; + if (IMediaSample_IsPreroll(pSample) == S_OK) + { + TRACE("Preroll!\n"); + return S_OK; + } + cbSrcStream = IMediaSample_GetActualDataLength(pSample); TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, cbSrcStream);
1
0
0
0
Maarten Lankhorst : quartz: Add more seek entries and fix a time continuity bug.
by Alexandre Julliard
21 Apr '08
21 Apr '08
Module: wine Branch: master Commit: c1a4acde0153626095685ff1c97287cf25004087 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1a4acde0153626095685ff1c…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Apr 18 22:21:59 2008 -0700 quartz: Add more seek entries and fix a time continuity bug. --- dlls/quartz/mpegsplit.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 9af8973..008dcca 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -53,7 +53,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); #define MPEG_AUDIO_HEADER 1 #define MPEG_NO_HEADER 0 -#define SEEK_INTERVAL (ULONGLONG)(30 * 10000000) /* Add an entry every 30 seconds */ +#define SEEK_INTERVAL (ULONGLONG)(10 * 10000000) /* Add an entry every 10 seconds */ struct seek_entry { ULONGLONG bytepos; @@ -216,6 +216,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, BYTE** fbuf, DWORD *flen, IMed if (This->remaining_bytes) { DWORD towrite = min(This->remaining_bytes, *flen); + LONGLONG foo; hr = copy_data(pCurrentSample, fbuf, flen, towrite); if (FAILED(hr)) @@ -228,6 +229,11 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, BYTE** fbuf, DWORD *flen, IMed if (This->remaining_bytes) return hr; + /* Restore the time in the time variable. This->position now points + * to the NEW timestamp which is slightly off + */ + IMediaSample_GetTime(pCurrentSample, &time, &foo); + /* Optimize: Try appending more samples to the stream */ goto out_append; }
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
128
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Results per page:
10
25
50
100
200