Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2753


Ignore:
Timestamp:
Mar 6, 2009, 7:02:07 PM (15 years ago)
Author:
rgrieder
Message:

Signalhandler should not append to orxonox_crash.log but write to the file.
Also removed the XAutoKeyRepeat re-enabling feature because we don't modify XAutoKeyRepeat anymore.

Location:
code/trunk/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/SignalHandler.cc

    r2731 r2753  
    5353namespace orxonox
    5454{
    55     bool SignalHandler::bXAutoKeyRepeatOn_ = false;
    56 
    5755    /**
    5856     * register signal handlers for SIGSEGV and SIGABRT
     
    6563      this->filename = filename;
    6664
    67       // prepare for restoring XAutoKeyRepeat
    68       Display* display;
    69       if ((display = XOpenDisplay(0)))
    70       {
    71         XKeyboardState oldState;
    72         XGetKeyboardControl(display, &oldState);
    73         if (oldState.global_auto_repeat == AutoRepeatModeOn)
    74           bXAutoKeyRepeatOn_ = true;
    75         else
    76           bXAutoKeyRepeatOn_ = false;
    77         XCloseDisplay(display);
    78       }
    79       else
    80       {
    81         std::cout << "Warning: couldn't open X display to restore XAutoKeyRepeat." << std::endl;
    82         bXAutoKeyRepeatOn_ = false;
    83       }
    84 
    85 
    8665      // make sure doCatch is only called once without calling dontCatch
    8766      assert( sigRecList.size() == 0 );
     
    146125          sigName = "SIGILL";
    147126          break;
    148       }
    149 
    150       if (bXAutoKeyRepeatOn_)
    151       {
    152         std::cout << "Trying to restore XAutoKeyRepeat" << std::endl;
    153         Display* display;
    154         if ((display = XOpenDisplay(0)))
    155         {
    156           XAutoRepeatOn(display);
    157           XCloseDisplay(display);
    158         }
    159127      }
    160128
     
    326294      bt.insert(0, timeString);
    327295
    328       FILE * f = fopen( getInstance().filename.c_str(), "a" );
     296      FILE * f = fopen( getInstance().filename.c_str(), "w" );
    329297
    330298      if ( !f )
  • code/trunk/src/util/SignalHandler.h

    r2710 r2753  
    9191        std::string appName;
    9292        std::string filename;
    93 
    94         // used to turn on KeyAutoRepeat if OIS crashes
    95         static bool bXAutoKeyRepeatOn_;
    9693    };
    9794}
Note: See TracChangeset for help on using the changeset viewer.