Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: ANNOUNCE: VdrTetris-Plugin-0.2.2



Clemens Kirchgatterer wrote:
> 
> "Reinhard Walter Buchner" <rw.buchner@freenet.de> wrote:
> 
> > I have the following problem with your new plugin:
> >
> > I modded my VDR code, so that all plugins are NOT
> > placed in the main menu, but rather in a submenu
> > called plugins (which of course is available via the
> > main menu). (VDR=1.1.17Mod)
> >
> > I cannot start your newest game (no response). If I
> > place it back on the main menu it works w/o a flaw.
> > Your 0.2.0 (didn't try the 0.2.1) worked great in my
> > config. Any ideas, what this could be? All other
> > plugins also work great:
> 
> i guess this has something to do with the base class used in either
> plugin. currently i have no idea what could be wrong on my side, so i
> cc'ed also to klaus, hoping for a comment.
> 
> anyway, you may try to declare ~GameTetris() and Show() (lines 29 & 30)
> in plugin.cpp as virtual, so they look like this:
> 
> class GameTetris : public cOsdObject {
> public:
>    virtual ~GameTetris()   { tetris_stop(); }
>    virtual void Show(void) { tetris_start(x, y, s, c); }
>    eOSState ProcessKey(eKeys Key);
> };
> 
> note, that i don't expect this to work! ;-) but you could try anyway.

I guess Reinhard didn't completely implement in his mod what VDR does
in its cMenuMain::ProcessKey() function. In menu.c you can see the following:

    case osPlugin:     {
                         cMenuPluginItem *item = (cMenuPluginItem *)Get(Current());
                         if (item) {
                            cPlugin *p = cPluginManager::GetPlugin(item->PluginIndex())
                            if (p) {
                               cOsdObject *menu = p->MainMenuAction();
                               if (menu) {
                                  if (menu->IsMenu())
                                     return AddSubMenu((cOsdMenu *)menu);
                                  else {
                                     pluginOsdObject = menu;
                                     return osPlugin;
                                     }
                                  }
                               }
                            }
                         state = osEnd;
                       }
                       break;

So, Reinhard, if you don't do this in your modded version, plugins that
are derived directly from cOsdObject (and use the Show() function to bring
up their own OSD) won't work. Others, that are derived from cOsdMenu, will work;
so what you are observing is possible, but it's not the Tetris plugin's fault.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index