File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 1- #![ cfg_attr ( not ( debug_assertions ) , windows_subsystem = "windows" ) ]
1+ #![ windows_subsystem = "windows" ]
22#![ allow( non_snake_case) ]
33
44mod backend;
55mod background;
66mod compact;
77mod compression;
8+ mod config;
89mod folder;
910mod gui;
1011mod persistence;
11- mod config;
12+
13+ use winapi:: um:: wincon:: { AttachConsole , FreeConsole , ATTACH_PARENT_PROCESS } ;
1214
1315fn main ( ) {
16+ let mut rc = 0 ;
17+
18+ // Enable console printing with Windows subsystem
19+ unsafe {
20+ AttachConsole ( ATTACH_PARENT_PROCESS ) ;
21+ }
22+
1423 if let Err ( e) = std:: panic:: catch_unwind ( gui:: spawn_gui) {
1524 eprintln ! ( "Unhandled panic: {:?}" , e) ;
25+ rc = 1 ;
26+ }
1627
17- std:: process:: exit ( 1 ) ;
28+ unsafe {
29+ FreeConsole ( ) ;
1830 }
31+
32+ std:: process:: exit ( rc) ;
1933}
You can’t perform that action at this time.
0 commit comments