TESTBED: Enable mouse event handling for QuickTime interactivity

This commit is contained in:
Krish 2024-06-27 17:05:26 +05:30 committed by Eugene Sandulenko
parent e4624cf95b
commit 01c2def795

View File

@ -134,6 +134,20 @@ Common::Error Videotests::videoTest(Common::SeekableReadStream *stream, const Co
Common::Event event;
while (g_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
((Video::QuickTimeDecoder *)video)->handleMouseButton(true, event.mouse.x, event.mouse.y);
break;
case Common::EVENT_LBUTTONUP:
((Video::QuickTimeDecoder *)video)->handleMouseButton(false);
break;
case Common::EVENT_MOUSEMOVE:
((Video::QuickTimeDecoder *)video)->handleMouseMove(event.mouse.x, event.mouse.y);
break;
default:
break;
}
if (Engine::shouldQuit()) {
video->close();
delete video;