[Scummvm-devel] Device capabilities

Paul Gilbert paulfgilbert at gmail.com
Sat Mar 15 18:47:00 CET 2014


Based on the previous discussion I had, I'm leaning towards having a device
capability run-time function, as David propounded. I agree that it could
cause some minor confusion on the part of the user, but I see it as
negligable. After all, users are generally likely to either permanently
have a mouse plugged in on their system or not. They're not likely to be
continually plugging in and taking out the mouse, so I don't see them as
really getting confused by the different handling. Also keep in mind that
mouse specific behaviour is the way the originals work, so I'm more
comfortable with allowing the original behaviour to work if at all
possible, and falling back on non-mouse behaviour at run-time as a last
resort.

As to the final point, about there not being many places where this is
relevant, I concede that it isn't needed for many places, but the same
could be said originally for mouse wheel support. Now the fact that it's
present has meant that multiple different game engines added support for it
specially. Voyeur is just the latest engine that could benefit from a has
mouse check; there could be others in the future.

The question is really, I would hope, if someone more familiar with the
different offline ports could come up with a pull request that properly
implements the functionality. Even if it's a default base that returns true
for a 'kHasMouse' constant, and has overrides for the tablet-y ports that
overrides it to always return false. Individual porters could then replace
that with proper mouse checks later. That shouldn't be too much of an
interference in core functionality, should it?

Paul.



On Sat, Mar 15, 2014 at 11:59 AM, Johannes Schickel <lordhoto at gmail.com>wrote:

> On 03/15/2014 04:36 PM, D G Turner wrote:
> > Johannes,
> >    I do agree that it is a bit more than just defining a generic
> >    define for the preprocessor i.e. PLATFORM_HAS_MOUSE ?
> >
> >    But there is a problem with platforms which _could_ have a mouse.
> >
>
> My idea would be similar to dreammaster's and simply use a define
> "PLATFORM_HAS_NO_MOUSE" (or similarly named) which enables code which
> doesn't rely on the precision/mouse specifics and define that for all
> platforms where no mouse *might* be present/we don't require a mouse. In
> general reporting absense of a mouse should give us less problems than
> reporting presense. The reason is that the code path for "no mouse
> present" should also work with a mouse.
>
> What I don't like about having both supported is that I find it
> confusing if input handling would suddenly change depending on whether
> you plug in a mouse or not.
>
> Last but not least, in the course of the discussion it seems we have two
> different places at hand where any of this is really relevant. So, in
> conformance with the KISS-principle [1] it seems overly complicated to
> come up with some API to handle this and adapt all ports to implement it
> etc.
>
> Greetings,
> Johannes
>
> [1]: https://en.wikipedia.org/wiki/KISS_principle
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20140315/d5bd193d/attachment.html>


More information about the Scummvm-devel mailing list