[Scummvm-cvs-logs] scummvm master -> 005030ee231ca4b39144bbf823a1bb08cf64bb53
sev-
sev at scummvm.org
Fri May 13 12:21:10 CEST 2016
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d9d5ea40df AMIGAOS: Preparations for use with AmiUpdate
3e756da308 Code Formatting fixes
4bad45cfd6 Remove periods
0f11864e8a Fix identation again
005030ee23 Merge pull request #755 from raziel-/patch-2
Commit: d9d5ea40df3e8e85c8298dfff3b293cd664d4fd4
https://github.com/scummvm/scummvm/commit/d9d5ea40df3e8e85c8298dfff3b293cd664d4fd4
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2016-04-28T21:24:12+03:00
Commit Message:
AMIGAOS: Preparations for use with AmiUpdate
Adding a bit of code to make ScummVM AmiUpdate aware.
Everything else will be dealt with through a (yet to finish) AmigaOS installer script and the entries in AmiUpdate's database.
I'd like to ask for hints regarding
- Code Formatting
- Optimizations
- Comments
- Obivous errors
or
- Ill-designed code.
It's not much code, but i'm sure i still messed up glorious either way
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 65da6bb..7117efc 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -24,13 +24,44 @@
#if defined(__amigaos4__)
+#include "backends/fs/amigaos4/amigaos4-fs.h"
#include "backends/platform/sdl/amigaos/amigaos.h"
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
int main(int argc, char *argv[]) {
- // Set up a stack cookie to avoid crashes due to too few stack set by users
+ // The following will gather the application name and add the install path
+ // to a variable in AmigaOS4's ENV(ARC) system. It will be placed in AppPaths
+ // so that ScummVM can become AmiUpdate aware
+ const char *const appname = "ScummVM";
+
+ 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 );
+ }
+ }
+
+ // Set up a stack cookie to avoid crashes from a stack set too low
static const char *stack_cookie __attribute__((used)) = "$STACK: 600000";
// Create our OSystem instance
@@ -44,7 +75,7 @@ int main(int argc, char *argv[]) {
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
#endif
- // Invoke the actual ScummVM main entry point:
+ // Invoke the actual ScummVM main entry point
int res = scummvm_main(argc, argv);
// Free OSystem
Commit: 3e756da3084a54f685151bad3cbabd76f8b5d843
https://github.com/scummvm/scummvm/commit/3e756da3084a54f685151bad3cbabd76f8b5d843
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2016-04-29T14:06:02+03:00
Commit Message:
Code Formatting fixes
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 7117efc..07143a6 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";
Commit: 4bad45cfd6fea3a5756d9b9c14bcf4b99d82d0b0
https://github.com/scummvm/scummvm/commit/4bad45cfd6fea3a5756d9b9c14bcf4b99d82d0b0
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2016-04-29T14:08:54+03:00
Commit Message:
Remove periods
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 07143a6..1f58aaa 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -49,14 +49,14 @@ int main(int argc, char *argv[]) {
sizeof(progpath),
DN_FULLPATH)) {
- // Stop any "Insert volume..." type requesters.
+ // Stop any "Insert volume..." type requesters
oldwin = IDOS->SetProcWindow((APTR)-1);
- // Finally, set the variable to the path the executable was run from.
+ // 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.
+ // Turn system requesters back on
IDOS->SetProcWindow( oldwin );
}
}
Commit: 0f11864e8ad23de6ab62397d75e0e9373270a703
https://github.com/scummvm/scummvm/commit/0f11864e8ad23de6ab62397d75e0e9373270a703
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2016-04-29T17:13:44+03:00
Commit Message:
Fix identation again
I should stop c&p'ing
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 1f58aaa..291c4c7 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -49,15 +49,15 @@ int main(int argc, char *argv[]) {
sizeof(progpath),
DN_FULLPATH)) {
- // Stop any "Insert volume..." type requesters
- oldwin = IDOS->SetProcWindow((APTR)-1);
+ // 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 );
+ // 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 );
+ // Turn system requesters back on
+ IDOS->SetProcWindow( oldwin );
}
}
Commit: 005030ee231ca4b39144bbf823a1bb08cf64bb53
https://github.com/scummvm/scummvm/commit/005030ee231ca4b39144bbf823a1bb08cf64bb53
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-13T12:21:05+02:00
Commit Message:
Merge pull request #755 from raziel-/patch-2
AMIGAOS: Preparations for use with AmiUpdate
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
More information about the Scummvm-git-logs
mailing list