Previous 15994 Revisions Next

r8068 Tuesday 18th May, 2010 at 08:20:32 UTC by Robbbert
[MESSUI] Fixed corruption of ini files.
1. Running any driver would cause the paths to be reset to default
2. If it crashed, the paths would be missing.
[src/osd/winui]mui_opts.c

src/osd/winui/mui_opts.c
r8067r8068
479479            }
480480         }
481481      }
482
482#ifndef MESS
483483      // if is_global is FALSE, blacklist global options
484484      if (entrylist->name && !is_global && IsGlobalOption(entrylist->name))
485485         good_option = FALSE;
486
486#endif
487487      if (good_option)
488488      {
489489         memcpy(entries, entrylist, sizeof(options_entry));
r8067r8068
22892289   {
22902290      filerr = core_fopen(filename, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
22912291      if (filerr == FILERR_NONE)
2292      {   
2292      {
22932293         #ifdef MESS
22942294         options_output_ini_file(opts, file);   /* required for MESS */
22952295         #else
r8067r8068
27342734   /* if we have a valid game driver, parse game-specific INI files */
27352735   if (driver != NULL)
27362736   {
2737#ifndef MESS
27372738      const game_driver *parent = driver_get_clone(driver);
27382739      const game_driver *gparent = (parent != NULL) ? driver_get_clone(parent) : NULL;
27392740
r8067r8068
27932794      {
27942795         return opts;
27952796      }
2796
2797#endif
27972798      ui_parse_ini_file(opts, driver->name);
27982799
27992800      if (opt_type == OPTIONS_GAME)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team