diff options
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/amigaos/amigaos-main.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp index 7117efc310..07143a6bca 100644 --- a/backends/platform/sdl/amigaos/amigaos-main.cpp +++ b/backends/platform/sdl/amigaos/amigaos-main.cpp @@ -39,27 +39,27 @@ int main(int argc, char *argv[]) { BPTR lock; APTR oldwin; - // Obtain the lock to the home directory - if(( lock = IDOS->GetProgramDir() )) { - TEXT progpath[2048]; - TEXT apppath[1024] = "AppPaths"; - - if( IDOS->DevNameFromLock( lock, - progpath, - sizeof(progpath), - DN_FULLPATH )) { - - // Stop any "Insert volume..." type requesters - oldwin = IDOS->SetProcWindow((APTR)-1); - - // Finally, set the variable to the path the executable was run from - IDOS->AddPart( apppath, appname, 1024); - IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR ); - - // Turn system requesters back on - IDOS->SetProcWindow( oldwin ); - } + // Obtain a lock to the home directory + if ((lock = IDOS->GetProgramDir())) { + TEXT progpath[2048]; + TEXT apppath[1024] = "AppPaths"; + + if (IDOS->DevNameFromLock(lock, + progpath, + sizeof(progpath), + DN_FULLPATH)) { + + // Stop any "Insert volume..." type requesters. + oldwin = IDOS->SetProcWindow((APTR)-1); + + // Finally, set the variable to the path the executable was run from. + IDOS->AddPart( apppath, appname, 1024); + IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR ); + + // Turn system requesters back on. + IDOS->SetProcWindow( oldwin ); } + } // Set up a stack cookie to avoid crashes from a stack set too low static const char *stack_cookie __attribute__((used)) = "$STACK: 600000"; |