- Timestamp:
- Dec 7, 2005, 1:58:39 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gtk_gui/gui_audio.cc
r5298 r5953 42 42 { 43 43 CheckButton* enableSound; //!< A Ckeckbutton for enabling Sound. 44 Slider* audioChannels; //!< A Slider for the count of audio-channels. 44 45 Slider* musicVolume; //!< A Slider for music volume. 45 46 Slider* effectsVolume; //!< A Slider for effects volume. … … 51 52 enableSound->saveability(); 52 53 audioBox->fill(enableSound); 54 55 Label* audioChannelsLabel = new Label(CONFIG_NAME_AUDIO_CHANNELS); 56 audioBox->fill(audioChannelsLabel); 57 audioChannels = new Slider(CONFIG_NAME_AUDIO_CHANNELS, 0, 32); 58 audioChannels->setFlagName("channels", "c", 32); 59 audioChannels->setDescription("Sets the count of channels in the game"); 60 audioChannels->saveability(); 61 audioBox->fill (audioChannels); 62 63 53 64 Label* musicVolumeLabel = new Label(CONFIG_NAME_MUSIC_VOLUME); 54 65 audioBox->fill(musicVolumeLabel); … … 58 69 musicVolume->saveability(); 59 70 audioBox->fill (musicVolume); 71 60 72 Label* effectsVolumeLabel = new Label (CONFIG_NAME_EFFECTS_VOLUME); 61 73 audioBox->fill (effectsVolumeLabel); -
trunk/src/lib/parser/ini_parser/ini_parser.cc
r5952 r5953 125 125 FILE* stream; //< The stream we use to read the file. 126 126 int lineCount = 0; //< The Count of lines. 127 128 127 129 128 if (this->fileName != NULL) … … 448 447 { 449 448 std::list<IniEntry>::const_iterator entry = this->getEntryIT(entryName, sectionName); 450 if ( !strcmp((*entry).name, entryName))449 if (entry != NULL && !strcmp((*entry).name, entryName)) 451 450 return (*entry).value; 452 451 PRINTF(2)("Entry '%s' in section '%s' not found.\n", entryName, sectionName); … … 618 617 if (!strcmp((*entry).name, entryName)) 619 618 break; 620 return entry; 619 if (entry == (*section).entries.end()) 620 return NULL; 621 else 622 return entry; 621 623 } 622 624 … … 638 640 if (!strcmp((*entry).name, entryName)) 639 641 break; 640 return entry; 642 if (entry == (*section).entries.end()) 643 return NULL; 644 else 645 return entry; 641 646 } 642 647 -
trunk/src/lib/sound/sound_engine.cc
r5944 r5953 97 97 void SoundEngine::loadSettings(IniParser* iniParser) 98 98 { 99 const char* channels = iniParser->getVar(CONFIG_NAME_AUDIO_CHANNELS, CONFIG_SECTION_AUDIO, "32"); 100 this->maxSourceCount = atoi(channels); 99 101 const char* musicVolume = iniParser->getVar(CONFIG_NAME_MUSIC_VOLUME, CONFIG_SECTION_AUDIO, "80"); 100 102 this->musicVolume = atof(musicVolume)/100.0;
Note: See TracChangeset
for help on using the changeset viewer.