mail[Wesnoth-commits] r33583 - in /trunk: changelog src/game.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 13, 2009 - 01:13:
Author: soliton
Date: Fri Mar 13 01:13:06 2009
New Revision: 33583

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33583&view=rev
Log:
* properly force game config reloading; fixes bug #13123: When you're 
downloading add-ons they do not appear in campaigns list until BfW restarted

Modified:
    trunk/changelog
    trunk/src/game.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=33583&r1=33582&r2=33583&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Fri Mar 13 01:13:06 2009
@@ -9,6 +9,8 @@
    * Fix an assertion failure when an unexpected mouse button was used
      (bug #13126)
    * Fixed bug #13161: Inactive weapon special name and description not used
+   * Fixed bug #13123: When you're downloading add-ons they do not appear in
+     campaigns list until BfW restarted
  * Miscellaneous and bug fixes:
    * Fix another campaign replay bug (#13139)
    * Fix WML [advancefrom] bug (#13176)

Modified: trunk/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=33583&r1=33582&r2=33583&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Fri Mar 13 01:13:06 2009
@@ -126,7 +126,7 @@
        game_display& disp();
 
        bool init_video();
-       bool init_config();
+       bool init_config(const bool force=false);
        bool init_language();
        bool play_test();
        bool play_multiplayer_mode();
@@ -163,7 +163,7 @@
        game_controller(const game_controller&);
        void operator=(const game_controller&);
 
-       void load_game_cfg();
+       void load_game_cfg(const bool force=false);
        void reset_translations();
        void set_unit_data();
 
@@ -577,14 +577,14 @@
        return true;
 }
 
-bool game_controller::init_config()
+bool game_controller::init_config(const bool force)
 {
        cache_.clear_defines();
 
        // make sure that multiplayer mode is set if command line parameter 
is selected
        if (multiplayer_mode_)
                cache_.add_define("MULTIPLAYER");
-       load_game_cfg();
+       load_game_cfg(force);
 
        game_config::load_config(game_config_.child("game_config"));
        hotkey::deactivate_all_scopes();
@@ -1214,7 +1214,7 @@
                cache_.recheck_filetree_checksum();
                old_defines_map_.clear();
                clear_binary_paths_cache();
-               init_config();
+               init_config(true);
        }
 
 void game_controller::start_wesnothd()
@@ -1475,10 +1475,10 @@
 
 }
 
-void game_controller::load_game_cfg()
+void game_controller::load_game_cfg(const bool force)
 {
        gui::set_background_dirty();
-       if (!game_config_.empty()
+       if (!game_config_.empty() && !force
                        && old_defines_map_ == cache_.get_preproc_map())
                return; // game_config already holds requested config in 
memory
        old_defines_map_ = cache_.get_preproc_map();




Related Messages


Powered by MHonArc, Updated Fri Mar 13 01:40:27 2009