From 0972c83752832c6f901534432851011d304fc8b9 Mon Sep 17 00:00:00 2001 From: jval1972 Date: Sat, 30 Apr 2022 13:00:26 +0300 Subject: [PATCH] Fix problem when starting from different folder than the executable https://www.doomworld.com/forum/topic/92113-delphidoom-207734-udmf-umapinfo-mbf21-apr-28-2022/?do=findComment&comment=2487932 --- Base/m_argv.pas | 4 ++++ Doom32.dof | 2 +- Doom_what's new.txt | 2 ++ Heretic_what's new.txt | 2 ++ Hexen_what's new.txt | 2 ++ Strife_what's new.txt | 2 ++ 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Base/m_argv.pas b/Base/m_argv.pas index 28228b54..5567cc3b 100644 --- a/Base/m_argv.pas +++ b/Base/m_argv.pas @@ -238,6 +238,9 @@ procedure M_InitArgv; myargc := i + 1; exit; end; + if myargv[i] <> '' then + if fexists(myargv[i]) then + myargv[i] := fexpand(myargv[i]); end; defargv := DEFARGVFILENAME; @@ -257,6 +260,7 @@ procedure M_InitArgv; cmdln := cmdln + ' ' + myargv[i]; printf('%s'#13#10, [cmdln]); + ChDir(fpath(myargv[0])); end; //============================================================================== diff --git a/Doom32.dof b/Doom32.dof index d0e87bca..f4e4f88c 100644 --- a/Doom32.dof +++ b/Doom32.dof @@ -100,7 +100,7 @@ Conditionals=DOOM;OPTIMIZE_FOR_SPEED; DebugSourceDirs=.\Base\;F:\DelphiDoom_Release\DelphiDoom_Src\Src\Doom\ UsePackages=0 [Parameters] -RunParams=rDDVOX-0.41.7.zip RDVXTEST41.zip +RunParams=RDDVOX-0.41.7_b.zip ..\doom\RDVXTEST41.zip HostApplication= Launcher= UseLauncher=0 diff --git a/Doom_what's new.txt b/Doom_what's new.txt index 18570a16..03fac4f7 100644 --- a/Doom_what's new.txt +++ b/Doom_what's new.txt @@ -1,3 +1,5 @@ +Fix problem when starting from different folder than the executable. (https://www.doomworld.com/forum/topic/92113-delphidoom-207734-udmf-umapinfo-mbf21-apr-28-2022/?do=findComment&comment=2487932) + Version 2.0.7 build 734 - (20220428) ----------------------- Fixed problem in wide status bar when changing screen resolution (software rendering). diff --git a/Heretic_what's new.txt b/Heretic_what's new.txt index a021eb76..f2915ce9 100644 --- a/Heretic_what's new.txt +++ b/Heretic_what's new.txt @@ -1,3 +1,5 @@ +Fix problem when starting from different folder than the executable. (https://www.doomworld.com/forum/topic/92113-delphidoom-207734-udmf-umapinfo-mbf21-apr-28-2022/?do=findComment&comment=2487932) + Version 2.0.7 build 734 - (20220428) ----------------------- Corrections to external textures caching in software rendering mode. diff --git a/Hexen_what's new.txt b/Hexen_what's new.txt index 2551909b..08afe714 100644 --- a/Hexen_what's new.txt +++ b/Hexen_what's new.txt @@ -1,3 +1,5 @@ +Fix problem when starting from different folder than the executable. (https://www.doomworld.com/forum/topic/92113-delphidoom-207734-udmf-umapinfo-mbf21-apr-28-2022/?do=findComment&comment=2487932) + Version 2.0.7 build 734 - (20220428) ----------------------- Corrections to external textures caching in software rendering mode. diff --git a/Strife_what's new.txt b/Strife_what's new.txt index 5ed9248b..0e024793 100644 --- a/Strife_what's new.txt +++ b/Strife_what's new.txt @@ -1,3 +1,5 @@ +Fix problem when starting from different folder than the executable. (https://www.doomworld.com/forum/topic/92113-delphidoom-207734-udmf-umapinfo-mbf21-apr-28-2022/?do=findComment&comment=2487932) + Version 2.0.7 build 734 - (20220428) ----------------------- Corrections to external textures caching in software rendering mode.