ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Main.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Main.pm (file contents):
Revision 1.18 by root, Wed Jan 18 15:31:51 2012 UTC vs.
Revision 1.22 by root, Sun Nov 4 02:13:53 2012 UTC

33use AnyEvent::Socket (); 33use AnyEvent::Socket ();
34use AnyEvent::DNS (); 34use AnyEvent::DNS ();
35 35
36use Compress::LZF; 36use Compress::LZF;
37use JSON::XS; 37use JSON::XS;
38use Urlader;
38 39
39use DC; 40use DC;
40 41
41sub crash($;$) { 42sub crash($;$) {
42 # nop at compiletime 43 # nop at compiletime
44 45
45BEGIN { 46BEGIN {
46 $SIG{__DIE__} = sub { 47 $SIG{__DIE__} = sub {
47 return if $^S; # quick reject 48 return if $^S; # quick reject
48 49
49 # return if there are any eval contexts in the csall stack 50 # return if there are any eval contexts in the call stack
50 for my $i (0..999) { 51 for my $i (0..999) {
51 my ($sub, $is_require) = (caller $i)[3, 7] 52 my ($sub, $is_require) = (caller $i)[3, 7]
52 or last; 53 or last;
53 return if $sub eq "(eval)" && !$is_require; 54 return if $sub eq "(eval)" && !$is_require;
54 } 55 }
688 ::message { markup => "Server has no newer version." }; 689 ::message { markup => "Server has no newer version." };
689 } 690 }
690 } else { 691 } else {
691 ::message { markup => "Server does not support software update." }; 692 ::message { markup => "Server does not support software update." };
692 } 693 }
693
694# $self->register_face_handler ($exp_table, sub {
695# my ($face) = @_;
696
697# $self->{exp_table} = $self->{json_coder}->decode (delete $face->{data});
698# $_->() for values %{ $self->{on_exp_update} || {} };
699# });
700 694
701 () 695 ()
702 }); 696 });
703} 697}
704 698
2660 DC::set_theme $CFG->{uitheme}; 2654 DC::set_theme $CFG->{uitheme};
2661 2655
2662 DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT; 2656 DC::SDL_InitSubSystem DC::SDL_INIT_VIDEO if $SDL_REINIT;
2663 $SDL_REINIT = 0; 2657 $SDL_REINIT = 0;
2664 2658
2665 @SDL_MODES = DC::SDL_ListModes 8, $CFG->{disable_alpha} ? 0 : 8; 2659 @SDL_MODES = DC::SDL_ListModes 8, $CFG->{disable_alpha} ? 0 : 2;
2666 @SDL_MODES = DC::SDL_ListModes 8, 8 unless @SDL_MODES; 2660 @SDL_MODES = DC::SDL_ListModes 8, 8 unless @SDL_MODES;
2667 @SDL_MODES = DC::SDL_ListModes 5, 0 unless @SDL_MODES; 2661 @SDL_MODES = DC::SDL_ListModes 5, 0 unless @SDL_MODES;
2668 @SDL_MODES or DC::fatal "Unable to find a usable video mode\n(hardware accelerated opengl fullscreen)"; 2662 @SDL_MODES or DC::fatal "Unable to find a usable video mode\n(hardware accelerated opengl fullscreen)";
2669 2663
2670 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES; 2664 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines