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

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.60 by root, Tue Aug 19 21:48:28 2008 UTC vs.
Revision 1.61 by root, Fri Aug 22 18:20:17 2008 UTC

1596 1 1596 1
1597 }, 1597 },
1598 ); 1598 );
1599 1599
1600 $vbox->add (new DC::UI::FancyFrame 1600 $vbox->add (new DC::UI::FancyFrame
1601 label => "Registering", 1601 label => "How to Play",
1602 min_h => 200, 1602 min_h => 200,
1603 child => (new DC::UI::Label valign => 0, ellipsise => 0, 1603 child => (new DC::UI::Label valign => 0, ellipsise => 0,
1604 markup => 1604 markup =>
1605 "First select a suitable video resolution in the Graphics tab, above.\n\n"
1606 . "Then register a new account (or use an existibg one if you have one). "
1605 "To register a new account, choose a username that hasn't been taken yet and " 1607 . "To register an account, choose a username that hasn't been taken yet and "
1606 . "try to log-in. Follow the instructions in the Log tab in the message window.", 1608 . "try to log-in. Follow the instructions in the Log tab in the message window.",
1607 ), 1609 ),
1608 ); 1610 );
1609 1611
1610 $vbox 1612 $vbox
2209 @SDL_MODES = DC::SDL_ListModes 5, 0 unless @SDL_MODES; 2211 @SDL_MODES = DC::SDL_ListModes 5, 0 unless @SDL_MODES;
2210 @SDL_MODES or DC::fatal "Unable to find a usable video mode\n(hardware accelerated opengl fullscreen)"; 2212 @SDL_MODES or DC::fatal "Unable to find a usable video mode\n(hardware accelerated opengl fullscreen)";
2211 2213
2212 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES; 2214 @SDL_MODES = sort { $a->[0] * $a->[1] <=> $b->[0] * $b->[1] } @SDL_MODES;
2213 2215
2214 if (!exists $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) { 2216 if (!defined $CFG->{sdl_mode} or $CFG->{sdl_mode} > $#SDL_MODES) {
2215 $CFG->{sdl_mode} = 0; 2217 $CFG->{sdl_mode} = 0; # lowest resolution by default
2218
2219 # now choose biggets mode <= 1024x768
2216 for (reverse 0 .. $#SDL_MODES) { 2220 for (0 .. $#SDL_MODES) {
2217 $CFG->{sdl_mode} = $_ if $SDL_MODES[$_][0] * $SDL_MODES[$_][1] >= 800 * 600; 2221 if ($SDL_MODES[$_][0] * $SDL_MODES[$_][1] <= 1024 * 768) {
2222 $CFG->{sdl_mode} = $_;
2223 }
2218 } 2224 }
2219 } 2225 }
2220 2226
2221 my ($old_w, $old_h) = ($WIDTH, $HEIGHT); 2227 my ($old_w, $old_h) = ($WIDTH, $HEIGHT);
2222 2228
2551 DC::DB::open_db; 2557 DC::DB::open_db;
2552 2558
2553 DC::UI::set_layout ($::CFG->{layout}); 2559 DC::UI::set_layout ($::CFG->{layout});
2554 2560
2555 my %DEF_CFG = ( 2561 my %DEF_CFG = (
2556 sdl_mode => 0, 2562 sdl_mode => undef,
2557 fullscreen => 1, 2563 fullscreen => 1,
2558 fast => 0, 2564 fast => 0,
2559 force_opengl11 => undef, 2565 force_opengl11 => undef,
2560 disable_alpha => 0, 2566 disable_alpha => 0,
2561 smooth_movement => 1, 2567 smooth_movement => 1,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines