From 0721baaf003d102d1e410006ba741dcbe5696b4d Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 1 Nov 2014 19:44:23 +0100 Subject: [PATCH] Remove windows debugging code --- vepgsummary.cc | 83 +++++++++++++++++++++++++------------------------- video.cc | 3 +- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/vepgsummary.cc b/vepgsummary.cc index 8a76def..84531e7 100644 --- a/vepgsummary.cc +++ b/vepgsummary.cc @@ -173,7 +173,6 @@ int VEpgSummary::handleCommand(int command) if (command==Remote::RED) { if (!channel) return 2; - MessageBox(0, "test", "test", 0); Log::getInstance()->log("VEpgSummary", Log::DEBUG, "ID %lu TIME %lu DURATION %lu TITLE %s", event->id, event->time, event->duration, event->title); VEpgSetTimer* vs = new VEpgSetTimer(event, channel); vs->draw(); @@ -206,50 +205,50 @@ int VEpgSummary::handleCommand(int command) void VEpgSummary::processMessage(Message* m) { - if (m->message == Message::MOUSE_MOVE) - { - if (tabbar.mouseMove((m->parameter >> 16) - getScreenX(), (m->parameter & 0xFFFF) - getScreenY())) - { - BoxStack::getInstance()->update(this); - } - } - else if (m->message == Message::MOUSE_LBDOWN) - { - int cancel = true; - int x = (m->parameter >> 16) - getScreenX(); - int y = (m->parameter & 0xFFFF) - getScreenY(); - - if ((boxRed.getX() <= x) && (boxRed.getX() + (int)boxRed.getWidth() >= x) && - (boxRed.getY() <= y) && (boxRed.getY() + (int)boxRed.getHeight() >= y)) { - BoxStack::getInstance()->handleCommand(Remote::RED); - cancel = false; + if (m->message == Message::MOUSE_MOVE) + { + if (tabbar.mouseMove((m->parameter >> 16) - getScreenX(), (m->parameter & 0xFFFF) - getScreenY())) + { + BoxStack::getInstance()->update(this); + } } - - - if (cancel && tabbar.mouseLBDOWN((m->parameter >> 16) - getScreenX(), (m->parameter & 0xFFFF) - getScreenY())) + else if (m->message == Message::MOUSE_LBDOWN) { - BoxStack::getInstance()->update(this); - cancel = false; + int cancel = true; + int x = (m->parameter >> 16) - getScreenX(); + int y = (m->parameter & 0xFFFF) - getScreenY(); + + if ((boxRed.getX() <= x) && (boxRed.getX() + (int)boxRed.getWidth() >= x) && + (boxRed.getY() <= y) && (boxRed.getY() + (int)boxRed.getHeight() >= y)) { + BoxStack::getInstance()->handleCommand(Remote::RED); + cancel = false; + } + + + if (cancel && tabbar.mouseLBDOWN((m->parameter >> 16) - getScreenX(), (m->parameter & 0xFFFF) - getScreenY())) + { + BoxStack::getInstance()->update(this); + cancel = false; + } + if (cancel) + { + //check if press is outside this view! then simulate cancel + int x=(m->parameter>>16)-getScreenX(); + int y=(m->parameter&0xFFFF)-getScreenY(); + if (x<0 || y <0 || x>(int)getWidth() || y>(int)getHeight()) + { + BoxStack::getInstance()->handleCommand(Remote::BACK); //simulate cancel press + } + } + } else if (m->message == Message::MOUSE_SCROLL) + { + if (tabbar.mouseAndroidScroll((m->tag >> 16) - getScreenX(), (m->tag & 0xFFFF) - getScreenY(), + (short)(m->parameter >> 16), (short)(m->parameter & 0xFFFF))) + { + BoxStack::getInstance()->update(this); + return; + } } - if (cancel) - { - //check if press is outside this view! then simulate cancel - int x=(m->parameter>>16)-getScreenX(); - int y=(m->parameter&0xFFFF)-getScreenY(); - if (x<0 || y <0 || x>(int)getWidth() || y>(int)getHeight()) - { - BoxStack::getInstance()->handleCommand(Remote::BACK); //simulate cancel press - } - } - } else if (m->message == Message::MOUSE_SCROLL) - { - if (tabbar.mouseAndroidScroll((m->tag >> 16) - getScreenX(), (m->tag & 0xFFFF) - getScreenY(), - (short)(m->parameter >> 16), (short)(m->parameter & 0xFFFF))) - { - BoxStack::getInstance()->update(this); - return; - } - } } diff --git a/video.cc b/video.cc index 8403b10..5ab6330 100644 --- a/video.cc +++ b/video.cc @@ -52,7 +52,7 @@ Video* Video::getInstance() { return instance; } -#include + // For legacy implementations bool Video::setVideoDisplay(VideoDisplay display) { @@ -61,7 +61,6 @@ bool Video::setVideoDisplay(VideoDisplay display) if (display.fallbackMode == None || display.fallbackMode == Window) return false; // No Effect applyMode=display.fallbackMode; } - MessageBox(0, "videodisplay", "videodisplay", 0); switch (applyMode) { case Fullscreen: { setMode(mode); -- 2.39.5