Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 11:02:36 AM (16 years ago)
Author:
rgrieder
Message:
  • updated msvc files
  • hack-fixed a hack that probably wasn't even known to be a c++ hack. Proper fixing requires an expert ;)
Location:
code/branches/network/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/core/InputBuffer.h

    r1446 r1449  
    6666            {
    6767                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', KeyCode::Unassigned};
     68                *((int*)(&newListener.listener_)) = (int)(listener);
     69
    6870                this->listeners_.insert(this->listeners_.end(), newListener);
    6971            }
     
    7274            {
    7375                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', KeyCode::Unassigned};
     76                *((int*)(&newListener.listener_)) = (int)(listener);
    7477                this->listeners_.insert(this->listeners_.end(), newListener);
    7578            }
     
    7982            {
    8083                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, false, _char, KeyCode::Unassigned};
     84                *((int*)(&newListener.listener_)) = (int)(listener);
    8185                this->listeners_.insert(this->listeners_.end(), newListener);
    8286            }
     
    8589            {
    8690                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, false, _char, KeyCode::Unassigned};
     91                *((int*)(&newListener.listener_)) = (int)(listener);
    8792                this->listeners_.insert(this->listeners_.end(), newListener);
    8893            }
     
    9297            {
    9398                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, true, true, '\0', key};
     99                *((int*)(&newListener.listener_)) = (int)(listener);
    94100                this->listeners_.insert(this->listeners_.end(), newListener);
    95101            }
     
    98104            {
    99105                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, true, true, '\0', key};
     106                *((int*)(&newListener.listener_)) = (int)(listener);
    100107                this->listeners_.insert(this->listeners_.end(), newListener);
    101108            }
  • code/branches/network/src/core/Shell.cc

    r1447 r1449  
    102102        {
    103103            this->inputBuffer_->unregisterListener(this);
     104            // TODO: may be very dangerous. InputManager already deletes InputBuffer instance!!!
    104105            delete this->inputBuffer_;
    105106        }
Note: See TracChangeset for help on using the changeset viewer.