John Wilund’s SrcEdit has had problems identifying the Treo 600′s 5way navigator – we managed to fix that a few days ago. John allowed me to share his routine with all of you:

Please have a look:

// From the Handspring headers // HsExtCommon.h
#ifndef hsFtrCreator
#define hsFtrCreator 'hsEx'
#endif
#ifndef hsFtrIDNavigationSupported // HsExtCommon.h
#define hsFtrIDNavigationSupported 14
#endif´
#ifndef sysFtrNumUIHardwareFlags // SystemMgr.h
#define sysFtrNumUIHardwareFlags 27
#endif
#ifndef sysFtrNumUIHardwareHas5Way // HsKeyCommon.h
#define sysFtrNumUIHardwareHas5Way 0x00000001
#endif

UInt32 val;
if (FtrGet (hsFtrCreator, hsFtrIDNavigationSupported, &val) == errNone)
// 5-Way Rocker

if (FtrGet (sysFileCSystem, sysFtrNumUIHardwareFlags, &val) == errNone)
{
if (val & sysFtrNumUIHardwareHas5Way)
// 5-Way Rocker
}

I just wonder what Treos the first and what Treos the second statement will find, respectively...

Related posts:

  1. Determining if your app runs on a Zodiac
  2. Fixing 5way navigation distortion – or – how to prevent the blue ring from fuxating your modal form
  3. Clie users urgently needed for SrcEdit
  4. SrcEdit updated for improved Treo compatibility
  5. A SrcEdit version where the Alt key works on a Treo 600

One Response to “Identifiying a 5way navigator reliably”

  1. BTW this code has been updated in SrcEdit to better detect 5way. Check srcedit’s web site: http://trac.brainsware.org/srcedit/

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

© 2012 TamsPalm - the Palm OS / web OS Blog Suffusion theme by Sayontan Sinha