From: DaveG <da...@us...> - 2006-06-24 21:30:37
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32266/src/client Modified Files: pscharcontrol.cpp pscharcontrol.h Log Message: getting rid of the dirty flag and just saving on changes Index: pscharcontrol.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/pscharcontrol.cpp,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -d -r1.156 -r1.157 *** pscharcontrol.cpp 17 Jun 2006 16:20:41 -0000 1.156 --- pscharcontrol.cpp 24 Jun 2006 21:30:32 -0000 1.157 *************** *** 548,552 **** event_mouseclick = csevMouseClick(eventname_reg,0); - dirty = false; ready = false; } --- 548,551 ---- *************** *** 554,559 **** psCharController::~psCharController() { - if (dirty) - SaveKeys(); } --- 553,556 ---- *************** *** 754,760 **** bool psCharController::RemapTrigger( const char* name, psControl::Device device, uint button, uint32 mods ) { ! bool result = controls.MapTrigger(name,device,button,mods); ! if (result) dirty = true; ! return result; } --- 751,758 ---- bool psCharController::RemapTrigger( const char* name, psControl::Device device, uint button, uint32 mods ) { ! bool changed = controls.MapTrigger(name,device,button,mods); ! if (changed) ! SaveKeys(); ! return changed; } Index: pscharcontrol.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/pscharcontrol.h,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** pscharcontrol.h 10 Jun 2006 12:24:23 -0000 1.75 --- pscharcontrol.h 24 Jun 2006 21:30:32 -0000 1.76 *************** *** 210,214 **** void SaveKeys(); ///< Save custom trigger mappings - bool dirty; ///< Do the mappings need saving? bool ready; ///< Ready to process events? --- 210,213 ---- |