mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 10:20:50 +00:00
Fix regression: --help doesn't work on Windows
base::SystemConsole must be created before any std::cout/printf() is used
This commit is contained in:
parent
dc5fcd625a
commit
41c5605102
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user