aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorHubert Maier2019-11-10 15:07:44 +0100
committerDavid Turner2019-11-10 17:28:15 +0000
commit994967cfed63f377cff2f2f897b6d6e10699e667 (patch)
treef6791f46f30b5b28423022c7b75b946e0a71a5f6 /backends/platform
parentdb367845d3c24d51df2bf07cc4686bc92d05fc8d (diff)
downloadscummvm-rg350-994967cfed63f377cff2f2f897b6d6e10699e667.tar.gz
scummvm-rg350-994967cfed63f377cff2f2f897b6d6e10699e667.tar.bz2
scummvm-rg350-994967cfed63f377cff2f2f897b6d6e10699e667.zip
AMIGAOS4: Clean up and increase stack cookie
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/sdl/amigaos/amigaos-main.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index ba1171751c..d0990a63c9 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -31,15 +31,15 @@
int main(int argc, char *argv[]) {
- // 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
+ // The following will gather the application name and add the binary path
+ // to a variable in AmigaOS4's ENV(ARC) system. It will then be placed in
+ // AppPaths, so that ScummVM becomes AmiUpdate aware.
const char *const appname = "ScummVM";
BPTR lock;
APTR oldwin;
- // Obtain a lock to the home directory
+ // Obtain a lock to the home directory.
if ((lock = IDOS->GetProgramDir())) {
TEXT progpath[2048];
TEXT apppath[1024] = "AppPaths";
@@ -49,36 +49,36 @@ 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 );
}
}
- // Set up a stack cookie to avoid crashes from a stack set too low
- static const char *stack_cookie __attribute__((used)) = "$STACK: 600000";
+ // Set up a stack cookie to avoid crashes from a stack set too low.
+ static const char *stack_cookie __attribute__((used)) = "$STACK: 1024000";
- // Create our OSystem instance
+ // Create our OSystem instance.
g_system = new OSystem_AmigaOS();
assert(g_system);
- // Pre initialize the backend
+ // Pre-initialize the backend.
((OSystem_AmigaOS *)g_system)->init();
#ifdef DYNAMIC_MODULES
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
+ // Free OSystem.
g_system->destroy();
return res;