[Scummvm-devel] Device capabilities

D G Turner d.g.turner at ntlworld.com
Sat Mar 15 16:36:13 CET 2014


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.

  To take the example of the LURE engine, the original has menus
  which behave in a way which is hard to use with anything apart from
  a mouse, LURE_CLICKABLE_MENUS was added to cope with this.

  It changes the engine menu behaviour to differ from the original, but
  in a way which allows the menus to be used on touchscreen and other
  absolute devices, but we want to keep the original behaviour with
  mouse enable platforms.

  The problem comes with devices / platforms which _could_ have a mouse,
  but don't generally... i.e. Dreamcast, Wii and some others.

  If we use the define and preprocessor, this is fixed at compile time
  and thus either one or the other mode is required on the build, which
  is suboptimal, as is making multiple builds.

  HMM... Thinking about this, I think the problem is actually more with
  the LURE engine. This was added before we had "engine specific
  options" tab added to the GUI.

  I think the solution is that the LURE engine should be changed to make
  the engine behaviour modifyable at runtime using a engine-option.

  The default value of that option for a platform/build can be set using
  the defines and then we have covered the more likely case and people
  who attach mice to their Dreamcast or Wii can change this...

  Though this is still a minor problem for Dreamcast as the current GUI
  doesn't allow you to modify options...
  but I think this may be the right path to take.

  We could still do the "overkill" solution in this case well as it
  would allow the switch to occur automatically by the platform
  detecting the presence of an attached mouse at runtime engine start.

  Thoughts?

  Anyway, will work up a Pull Request for discussion...
Thanks,
David Turner

On 15/03/14 15:10, Johannes Schickel wrote:
> Uhm. That sounds overkill. I mean even if you can get a mouse on 
> platforms which would define something like "DEVICE_HAS_MOUSE" (though 
> we should think of a better name) it should be fine to simply use the 
> mouseless codepath because it will still work with it?
> 
> // Johannes





More information about the Scummvm-devel mailing list