--- deliantra/Deliantra-Client/DC/Main.pm 2014/12/24 06:12:21 1.28 +++ deliantra/Deliantra-Client/DC/Main.pm 2018/11/19 00:56:08 1.31 @@ -76,6 +76,8 @@ use DC::MapWidget; use DC::Macro; +# printf "%5d %5d %5d %5d\n", $_, DC::minpot $_, DC::ld32 $_, 2 << ((DC::ld32 $_ - 1)); + $SIG{QUIT} = sub { Carp::cluck "QUIT" }; $SIG{PIPE} = 'IGNORE'; @@ -1542,7 +1544,7 @@ if ($DELIANTRA_DEBUG & 16) { $BW_WATCHER = EV::periodic 0, 1, 0, sub { return unless $CONN; - debug sprintf "%8.2gKB/s", $CONN->{octets_in} / 1e3; + debug sprintf "%8.2gkB/s", $CONN->{octets_in} / 1e3; $CONN->{octets_in} = 0; }; } else { @@ -2030,7 +2032,7 @@ text => $CFG->{output_rate}, tooltip => "The maximum bandwidth in bytes per second that the server should not exceed " . "when sending data. When 0 or unset, the server " - . "default will be used, which is usually around 100kb/s. Most servers will " + . "default will be used, which is usually around 100kB/s. Most servers will " . "dynamically find an optimal rate, so adjust this only when necessary.", on_changed => sub { $CFG->{output_rate} = $_[1]; 1 }, ); @@ -2606,7 +2608,7 @@ if ($CONN) { open_quit_dialog; } else { - EV::unloop EV::UNLOOP_ALL; + EV::break EV::BREAK_ALL; } }], ]); @@ -2987,7 +2989,7 @@ $SDL_CB[DC::SDL_QUIT] = sub { crash "SDL_QUIT"; - EV::unloop EV::UNLOOP_ALL; + EV::break EV::BREAK_ALL; }; $SDL_CB[DC::SDL_VIDEORESIZE] = sub { }; $SDL_CB[DC::SDL_VIDEOEXPOSE] = sub { @@ -3030,7 +3032,7 @@ ############################################################################# $SIG{INT} = $SIG{TERM} = sub { - EV::unloop; + EV::break; #d# TODO calling exit here hangs the process in some futex }; @@ -3157,7 +3159,7 @@ debug_toggle 0; delete $SIG{__DIE__}; - EV::loop; + EV::run; DC::save_cfg if $CFG->{config_autosave};