File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ std::string getLocale()
696696 * @param ev SDL event.
697697 * @return Is quitting necessary?
698698 */
699- bool CrossPlatform:: isQuitShortcut (const SDL_Event &ev)
699+ bool isQuitShortcut (const SDL_Event &ev)
700700{
701701#ifdef _WIN32
702702 // Alt + F4
Original file line number Diff line number Diff line change @@ -224,9 +224,12 @@ void Game::run()
224224 }
225225 break ;
226226 case SDL_VIDEORESIZE :
227- Options::setInt (" displayWidth" , _event.resize .w );
228- Options::setInt (" displayHeight" , _event.resize .h );
229- _screen->setResolution (_event.resize .w , _event.resize .h );
227+ if (Options::getBool (" allowResize" ))
228+ {
229+ Options::setInt (" displayWidth" , _event.resize .w );
230+ Options::setInt (" displayHeight" , _event.resize .h );
231+ _screen->setResolution (_event.resize .w , _event.resize .h );
232+ }
230233 break ;
231234 case SDL_MOUSEMOTION :
232235 case SDL_MOUSEBUTTONDOWN :
Original file line number Diff line number Diff line change @@ -597,14 +597,17 @@ void SavedGame::setTime(GameTime time)
597597 */
598598int SavedGame::getId (const std::string &name)
599599{
600- int id = _ids[name];
601- _ids[name]++;
602- if (id == 0 )
600+ std::map<std::string, int >::iterator i = _ids.find (name);
601+ if (i != _ids.end ())
603602 {
604- _ids[name]++;
605- id++;
603+ i->second ++;
604+ return i->second ;
605+ }
606+ else
607+ {
608+ _ids[name] = 2 ;
609+ return 1 ;
606610 }
607- return id;
608611}
609612
610613/* *
You can’t perform that action at this time.
0 commit comments