mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
RECORDER: Give name to recoder priority. Added middle button storing.
This commit is contained in:
parent
a4029a8e94
commit
1d50a31830
@ -74,6 +74,8 @@ void readRecord(SeekableReadStream *inFile, uint32 &diff, Event &event, uint32 &
|
||||
case EVENT_RBUTTONUP:
|
||||
case EVENT_WHEELUP:
|
||||
case EVENT_WHEELDOWN:
|
||||
case EVENT_MBUTTONDOWN:
|
||||
case EVENT_MBUTTONUP:
|
||||
event.mouse.x = inFile->readSint16LE();
|
||||
event.mouse.y = inFile->readSint16LE();
|
||||
break;
|
||||
@ -103,6 +105,8 @@ void writeRecord(WriteStream *outFile, uint32 diff, const Event &event, uint32 m
|
||||
case EVENT_RBUTTONUP:
|
||||
case EVENT_WHEELUP:
|
||||
case EVENT_WHEELDOWN:
|
||||
case EVENT_MBUTTONDOWN:
|
||||
case EVENT_MBUTTONUP:
|
||||
outFile->writeSint16LE(event.mouse.x);
|
||||
outFile->writeSint16LE(event.mouse.y);
|
||||
break;
|
||||
@ -219,7 +223,7 @@ void EventRecorder::init() {
|
||||
}
|
||||
|
||||
g_system->getEventManager()->getEventDispatcher()->registerSource(this, false);
|
||||
g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 1, false, true);
|
||||
g_system->getEventManager()->getEventDispatcher()->registerObserver(this, EventManager::kEventRecorderPriority, false, true);
|
||||
}
|
||||
|
||||
void EventRecorder::deinit() {
|
||||
|
@ -383,7 +383,12 @@ public:
|
||||
* Priority of the event manager, for now it's lowest since it eats
|
||||
* *all* events, we might to change that in the future though.
|
||||
*/
|
||||
kEventManPriority = 0
|
||||
kEventManPriority = 0,
|
||||
/**
|
||||
* Priority of the event recorder. It has to go after event manager
|
||||
* in order to record events generated by it
|
||||
*/
|
||||
kEventRecorderPriority = 1
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user