int DeviceGetUIType();

 

Gets the type of user interface.

 

Return Value

 

Returns a zero value if the current user interface is iPhone, one if the user interface is iPad.

 

Remarks

 

DeviceGetUIType() gets the user interface type for the device.

Possible return values are:

 

Value

Description

0

iPhone

1

iPad

 

Windows Simulator NOTE: To provide values for the Windows Simulator, be sure to edit C:\DragonFireSDK\DragonFireSDK.ini and modify the value for UIType in the Device section.

 

Availability

 

Available in DragonFireSDK 1.4 and later.

 

Example

 

#include "DragonFireSDK.h"

 

int MyFont;

int UITypeText;

 

int Value;

char TextBuffer[100];

 

void AppMain()

{  

  LandscapeMode();

 

  MyFont = FontAdd("Helvetica", "Regular", 18, 0x00FF00);

 

  Value=DeviceGetUIType();

  if (Value==0)

     sprintf(TextBuffer, "UI Type: iPhone");

  else

     sprintf(TextBuffer, "UI Type: iPad");

  UITypeText = TextAdd(10, 280, TextBuffer, MyFont);

}

 

//===============================================

void OnTimer()

{

 

}

 

//===============================================

void AppExit()

{

 

}