[aseprite] 100/134: Fix regression: --help doesn't work on Windows

Tobias Hansen thansen at moszumanska.debian.org
Sat Mar 14 17:10:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 41c56051026e4e0e3dbbbeb99ebed061b68cf64c
Author: David Capello <davidcapello at gmail.com>
Date:   Fri Dec 5 02:25:49 2014 -0300

    Fix regression: --help doesn't work on Windows
    
    base::SystemConsole must be created before any std::cout/printf() is used
---
 src/app/app.cpp   | 2 --
 src/app/app.h     | 2 --
 src/main/main.cpp | 7 ++++++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 70d26f2..62aaa2b 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -420,8 +420,6 @@ void App::run()
 
   // Start shell to execute scripts.
   if (m_isShell) {
-    m_systemConsole.prepareShell();
-
     if (m_modules->m_scriptingEngine.supportEval()) {
       Shell shell;
       shell.run(m_modules->m_scriptingEngine);
diff --git a/src/app/app.h b/src/app/app.h
index 32e0554..7639b74 100644
--- a/src/app/app.h
+++ b/src/app/app.h
@@ -22,7 +22,6 @@
 
 #include "base/signal.h"
 #include "base/string.h"
-#include "base/system_console.h"
 #include "base/unique_ptr.h"
 #include "raster/pixel_format.h"
 
@@ -95,7 +94,6 @@ namespace app {
 
     static App* m_instance;
 
-    base::SystemConsole m_systemConsole;
     base::UniquePtr<ui::GuiSystem> m_guiSystem;
     Modules* m_modules;
     LegacyModules* m_legacy;
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 794962c..9459e9e 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -28,6 +28,7 @@
 #include "base/exception.h"
 #include "base/memory.h"
 #include "base/memory_dump.h"
+#include "base/system_console.h"
 #include "she/error.h"
 #include "she/scoped_handle.h"
 #include "she/system.h"
@@ -68,7 +69,7 @@ int app_main(int argc, char* argv[])
   try {
     base::MemoryDump memoryDump;
     MemLeak memleak;
-
+    base::SystemConsole systemConsole;
     app::AppOptions options(argc, const_cast<const char**>(argv));
     she::ScopedHandle<she::System> system(she::create_system());
     app::App app;
@@ -81,6 +82,10 @@ int app_main(int argc, char* argv[])
     }
 
     app.initialize(options);
+
+    if (options.startShell())
+      systemConsole.prepareShell();
+
     app.run();
     return 0;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list