Shinobi Library - LCD Function

pdLcdGetDirection

Detects the LCD screen orientation

FORMAT

Sint32 pdLcdGetDirection( port )
Uint32 port

PARAMETER

 port  Port number 

RETURN

 PDD_LCD_DIRECTION_NORMAL  Normal 
 PDD_LCD_DIRECTION_FLIP  Upside down 
 PDD_LCD_DIRECTION_LEFT  Rotated 90[degrees] left 
 PDD_LCD_DIRECTION_RIGHT  Rotated 90[degrees] right 

DESCRIPTION

Returns an indication of the orientation of the LCD connection to the controller.

The following values are specified for port.

 PDD_PORT_A1  Extension socket 1 on port A 
 PDD_PORT_A2  Extension socket 2 on port A 
 PDD_PORT_B1  Extension socket 1 on port B 
 PDD_PORT_B2  Extension socket 2 on port B 
 PDD_PORT_C1  Extension socket 1 on port C 
 PDD_PORT_C2  Extension socket 2 on port C 
 PDD_PORT_D1  Extension socket 1 on port D 
 PDD_PORT_D2  Extension socket 2 on port D 


EXAMPLE

  Sint32 dir;
  Uint32 flag;
  dir = pdLcdGetDirection(PDD_PORT_A1);
  switch (dir) {
  case PDD_LCD_DIRECTION_NORMAL:     /* Normal */
    flag = PDD_LCD_FLAG_NOFLIP;
    break;
  case PDD_LCD_DIRECTION_FLIP:       /* Because the LCD is upside down, */
    flag = PDD_LCD_FLAG_HVFLIP;    /* the data is sent upside down */
    break;
  default:                           /* If the LCD is oriented sideways */
    flag = PDD_LCD_FLAG_NOFLIP;    /* the data is sent     */
    return;                        /* as is         */
  }
  pdVmsLcdWrite(PDD_PORT_A1, cgdata, flag);

NOTE

When you insert visual memory in the extension socket of the standard controller installed in Dreamcast, the display is flipped.

pdLcdGetDirection
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999