Add support for flipping the instrument panel vertically on screen (if
we want to do a full screen panel on a device that is mounted upside down.)
This commit is contained in:
parent
d2ba5b1883
commit
9238050068
4 changed files with 9 additions and 4 deletions
|
@ -254,7 +254,7 @@ void FGKR_87::update( double dt ) {
|
|||
// Radio
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( on_off_vol_btn >= 0.01 ) {
|
||||
if ( on_off_vol_btn >= 0.05 ) {
|
||||
// buttons
|
||||
if ( adf_btn == 0 ) {
|
||||
ant_mode = 1;
|
||||
|
|
|
@ -272,6 +272,7 @@ FGPanel::update (double dt)
|
|||
_x_offset = fgGetInt("/sim/panel/x-offset");
|
||||
_y_offset = fgGetInt("/sim/panel/y-offset");
|
||||
_jitter = fgGetFloat("/sim/panel/jitter");
|
||||
_flipx = fgGetBool("/sim/panel/flip-x");
|
||||
|
||||
// Do nothing if the panel isn't visible.
|
||||
if ( !fgPanelVisible() ) {
|
||||
|
@ -330,8 +331,11 @@ FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
|
|||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
if ( _flipx ) {
|
||||
gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
|
||||
} else {
|
||||
gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
|
||||
// gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
|
||||
}
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
|
|
|
@ -197,6 +197,7 @@ private:
|
|||
int _y_offset;
|
||||
int _view_height;
|
||||
float _jitter;
|
||||
bool _flipx;
|
||||
|
||||
const SGPropertyNode * _xsize_node;
|
||||
const SGPropertyNode * _ysize_node;
|
||||
|
|
|
@ -318,7 +318,7 @@ void FGSteam::_CatchUp()
|
|||
More subtle flaw is having it not move or a travel limit
|
||||
occasionally due to some dirt in the tube or on the ball.
|
||||
*/
|
||||
d = - current_aircraft.fdm_state->get_A_Z_pilot();
|
||||
d = -current_aircraft.fdm_state->get_A_Z_pilot();
|
||||
if ( d < 1 ) d = 1;
|
||||
set_lowpass ( & the_TC_rad,
|
||||
current_aircraft.fdm_state->get_A_Y_pilot () / d,
|
||||
|
|
Loading…
Add table
Reference in a new issue