Example #1
0
/**
 *	@brief	Set the aspect ratio of the TV/monitor.
 *
 *	@param wm		Pointer to a wiimote_t structure.
 *	@param aspect	Either WIIUSE_ASPECT_16_9 or WIIUSE_ASPECT_4_3
 */
void wiiuse_set_aspect_ratio(struct wiimote_t* wm, enum aspect_t aspect) {
	if (!wm)	return;

	wm->ir.aspect = aspect;

	if (aspect == WIIUSE_ASPECT_4_3) {
		wm->ir.vres[0] = WM_ASPECT_4_3_X;
		wm->ir.vres[1] = WM_ASPECT_4_3_Y;
	} else {
		wm->ir.vres[0] = WM_ASPECT_16_9_X;
		wm->ir.vres[1] = WM_ASPECT_16_9_Y;
	}

	/* reset the position offsets */
	wiiuse_set_ir_position(wm, wm->ir.pos);
}
bool CryVR_WiimoteManagerPlugin::SetIrPosition( bool above )
{
    if ( init && found > 0 )
    {
        int i = 0;
        ir_position_t pos = WIIUSE_IR_ABOVE;

        if ( !above )
        {
            pos = WIIUSE_IR_BELOW;
        }

        for ( ; i < MAX_WIIMOTES; ++i )
        {
            wiiuse_set_ir_position( wiimotes[0], pos );
        }

        return true;
    }

    return false;
}
Example #3
0
/**
 * Notify wiiuse that the sensor bar is below your screen.
 * @param id the id of the wiimote concerned
 */
JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarBelowScreen
(JNIEnv *env, jobject obj, jint id) {
	wiiuse_set_ir_position(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), WIIUSE_IR_BELOW);
}
Example #4
0
/**
 * Notify wiiuse that the sensor bar is above your screen.
 * @param id the id of the wiimote concerned
 */
JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setSensorBarAboveScreen
(JNIEnv *env, jobject obj, jint id) {
	wiiuse_set_ir_position(wiimotes[id-1], WIIUSE_IR_ABOVE);
}
Example #5
0
void Wiimote::setIrPosition(enum ir_position_t pos)
{
    wiiuse_set_ir_position(this->wm, pos);
}